org.argouml.uml.diagram.ui
Class ActionSaveDiagramToClipboard

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.argouml.uml.diagram.ui.ActionSaveDiagramToClipboard
All Implemented Interfaces:
Action, ActionListener, ClipboardOwner, Cloneable, EventListener, Serializable

public class ActionSaveDiagramToClipboard
extends AbstractAction
implements ClipboardOwner

This class copies a diagram to the system clipboard, this functionality will only work with Java1.4, but it will compile with 1.3. It can be put into GEF as it is rather generic.

Since:
argoUML version 0.15.2, Created on 19 October 2003, 08:36
See Also:
Swing Drag and Drop , Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.AbstractAction
 
Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ActionSaveDiagramToClipboard()
           
 
Method Summary
 void actionPerformed(ActionEvent actionEvent)
          get diagram image and put in system clipboard.
private  Image getImage()
          get image from gef
 void lostOwnership(Clipboard clipboard, Transferable transferable)
          do nothing
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionSaveDiagramToClipboard

public ActionSaveDiagramToClipboard()
Method Detail

actionPerformed

public void actionPerformed(ActionEvent actionEvent)
get diagram image and put in system clipboard.

Specified by:
actionPerformed in interface ActionListener
See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)

getImage

private Image getImage()
get image from gef


lostOwnership

public void lostOwnership(Clipboard clipboard,
                          Transferable transferable)
do nothing

Specified by:
lostOwnership in interface ClipboardOwner
See Also:
ClipboardOwner.lostOwnership( java.awt.datatransfer.Clipboard, java.awt.datatransfer.Transferable)


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook