org.norvelle.textcite.gui.action
Class CopyReferenceAction

java.lang.Object
  extended by org.norvelle.textcite.gui.action.CopyReferenceAction
All Implemented Interfaces:
java.awt.datatransfer.ClipboardOwner, java.awt.event.ActionListener, java.util.EventListener

public class CopyReferenceAction
extends java.lang.Object
implements java.awt.event.ActionListener, java.awt.datatransfer.ClipboardOwner

CopyReferenceAction: An Action class that can be assigned directly to a JMenuItem or ToolbarButton, that copies the selected Citation's reference to the clipboard

Author:
Erik Norvelle

Constructor Summary
CopyReferenceAction(Citation c)
          Construct the Action
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent arg0)
          Perform the clipboard copy
 void lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
          Needed to implement the ClipboardOwner interface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyReferenceAction

public CopyReferenceAction(Citation c)
Construct the Action

Parameters:
c - The Citation whose text will be copied
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent arg0)
Perform the clipboard copy

Specified by:
actionPerformed in interface java.awt.event.ActionListener

lostOwnership

public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,
                          java.awt.datatransfer.Transferable contents)
Needed to implement the ClipboardOwner interface

Specified by:
lostOwnership in interface java.awt.datatransfer.ClipboardOwner