Package com.bc.ceres.swing.actions
Class PasteAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- com.bc.ceres.swing.actions.AbstractSystemAction
-
- com.bc.ceres.swing.actions.AbstractSelectionAction
-
- com.bc.ceres.swing.actions.PasteAction
-
- All Implemented Interfaces:
SelectionChangeListener
,FlavorListener
,ActionListener
,Serializable
,Cloneable
,EventListener
,Action
public class PasteAction extends AbstractSelectionAction implements FlavorListener
A generic 'paste' action.- Since:
- Ceres 0.10
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
-
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
-
Constructor Summary
Constructors Constructor Description PasteAction(SelectionManager selectionManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
void
flavorsChanged(FlavorEvent e)
protected void
handleInsertProblem(Exception e)
boolean
isExecutable()
Checks if a selection context exists.void
selectionChanged(SelectionChangeEvent event)
A selection change occurred.-
Methods inherited from class com.bc.ceres.swing.actions.AbstractSelectionAction
getClipboard, getSelection, getSelectionContext, selectionContextChanged
-
Methods inherited from class com.bc.ceres.swing.actions.AbstractSystemAction
actionPerformed, loadIcon, updateState
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Constructor Detail
-
PasteAction
public PasteAction(SelectionManager selectionManager)
-
-
Method Detail
-
isExecutable
public boolean isExecutable()
Description copied from class:AbstractSelectionAction
Checks if a selection context exists. Overrides should first test the return value ofsuper.isExecutable()
.- Overrides:
isExecutable
in classAbstractSelectionAction
- Returns:
true
, if so.
-
execute
public void execute()
- Specified by:
execute
in classAbstractSystemAction
-
selectionChanged
public void selectionChanged(SelectionChangeEvent event)
Description copied from interface:SelectionChangeListener
A selection change occurred.- Specified by:
selectionChanged
in interfaceSelectionChangeListener
- Overrides:
selectionChanged
in classAbstractSelectionAction
- Parameters:
event
- The selection event.
-
flavorsChanged
public void flavorsChanged(FlavorEvent e)
- Specified by:
flavorsChanged
in interfaceFlavorListener
-
handleInsertProblem
protected void handleInsertProblem(Exception e)
-
-