dsto.dfc.swt.dnd
Class CmdPasteObject

java.lang.Object
  extended by dsto.dfc.util.BasicPropertyEventSource
      extended by dsto.dfc.swt.commands.AbstractCommand
          extended by dsto.dfc.swt.commands.AbstractPasteCommand
              extended by dsto.dfc.swt.dnd.CmdPasteObject
All Implemented Interfaces:
Command, Copyable, JavaBean, PropertyEventSource, Serializable, Cloneable

public class CmdPasteObject
extends AbstractPasteCommand

Command to paste an object from the clipboard. Clients may either subclass and override pasteObject(Object[]) or listen for command executed events.

Author:
Matthew Phillips
See Also:
CmdCopyObject, Serialized Form

Field Summary
 
Fields inherited from class dsto.dfc.swt.commands.AbstractCommand
NO_ICON
 
Constructor Summary
CmdPasteObject(org.eclipse.swt.dnd.Transfer objectTransfer)
          Create a new instance.
 
Method Summary
 void execute()
          Execute the command.
protected  void pasteObject(Object[] objects)
          Paste object(s) from the clipboard.
 void setTransfer(org.eclipse.swt.dnd.Transfer transfer)
           
 
Methods inherited from class dsto.dfc.swt.commands.AbstractCommand
addCommandListener, clone, createDefaultDisplayName, fireCommandExecuted, fireCommandExecuted, getAccelerator, getContextMenuGroup, getDescription, getDisplayName, getGroupInView, getIcon, getLogString, getMainMenuGroup, getMnemonic, getName, getToolbarGroup, isEnabled, isInteractive, removeCommandListener, setAccelerator, setContextMenuGroup, setDescription, setDisplayName, setEnabled, setIcon, setInteractive, setMainMenuGroup, setMnemonic, setName, setToolbarGroup
 
Methods inherited from class dsto.dfc.util.BasicPropertyEventSource
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeSource, removePropertyChangeListener, setPropertyChangeSource
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface dsto.dfc.util.PropertyEventSource
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

CmdPasteObject

public CmdPasteObject(org.eclipse.swt.dnd.Transfer objectTransfer)
Create a new instance.

Parameters:
objectTransfer - The SWT Transfer type. eg an instance of DataObjectTransfer.
Method Detail

setTransfer

public void setTransfer(org.eclipse.swt.dnd.Transfer transfer)

execute

public void execute()
Description copied from interface: Command
Execute the command. Commands should fire CommandListener.commandExecuted(CommandEvent) when executed.

Specified by:
execute in interface Command
Specified by:
execute in class AbstractCommand

pasteObject

protected void pasteObject(Object[] objects)
Paste object(s) from the clipboard. Default action is to fire command executed event with objects as data. Subclasses may override.



Copyright © 2008 Commonwealth of Australia