org.norvelle.textcite.gui.action
Class CopyTextAction

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

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

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

Author:
Erik Norvelle

Field Summary
protected  Citation citation
           
 
Constructor Summary
CopyTextAction(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
 

Field Detail

citation

protected Citation citation
Constructor Detail

CopyTextAction

public CopyTextAction(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