Interface EditActionHandler
- 
- All Known Implementing Classes:
- AbstractEditActionHandler,- BlockActionHandler,- CodeEditorEditActionHandler,- CommonEditActionHandler,- CopyPasteHandler,- DelegatingEditActionHandler,- JavaJsBridgeEditActionHandler,- JTableEditActionHandler,- JTextComponentEditActionHandler,- PythonTextAreaEditActionHandler,- ReportingResourceWorkspace.ReportDesignerEditActionHandler,- SfcEditActionHandler
 
 public interface EditActionHandlerAn EditActionHandler is a class that handles common actions you'd find under an "edit" menu, like cut, copy, paste, and delete. This is used so that all workspaces and focused frames can share the same GUI elements for these actions, and simply 1) handle the actions and 2) tell the system whether or not they are currently enabled.- See Also:
- ResourceWorkspace.getEditActionHandler()
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddChangeListener(javax.swing.event.ChangeListener listener)Add a change listener that will be notified when this handler's responses to the "can-" functions will have changed.booleancanCopy()Can this edit action handler handle the copy action, given its current selection? Note that if this andcanDelete()both return true, the cut action will also be enabled.booleancanDelete()Can this edit action handler handle the delete action, given its current selection? Note that if this andcanCopy()both return true, the cut action will also be enabled.booleancanPaste(java.awt.datatransfer.Clipboard clipboard)Can this action handler handle a paste given the data flavors currently available in the clipboard?default booleancanRename()Can this action handler handle the rename action, given its current selection.java.awt.datatransfer.TransferabledoCopy()Called when the copy action is performed.java.awt.datatransfer.TransferabledoCut()Called when the cut action is performed.voiddoDelete()Called when the delete action is performedvoiddoPaste(java.awt.datatransfer.Transferable clipboardContents)Called when the paste action is performeddefault voiddoRename()Called when the rename action is performedvoidremoveChangeListener(javax.swing.event.ChangeListener listener)
 
- 
- 
- 
Method Detail- 
addChangeListenervoid addChangeListener(javax.swing.event.ChangeListener listener) Add a change listener that will be notified when this handler's responses to the "can-" functions will have changed.
 - 
removeChangeListenervoid removeChangeListener(javax.swing.event.ChangeListener listener) 
 - 
canDeleteboolean canDelete() Can this edit action handler handle the delete action, given its current selection? Note that if this andcanCopy()both return true, the cut action will also be enabled.
 - 
canCopyboolean canCopy() Can this edit action handler handle the copy action, given its current selection? Note that if this andcanDelete()both return true, the cut action will also be enabled.
 - 
canPasteboolean canPaste(java.awt.datatransfer.Clipboard clipboard) Can this action handler handle a paste given the data flavors currently available in the clipboard?
 - 
canRenamedefault boolean canRename() Can this action handler handle the rename action, given its current selection.- Returns:
- true, if the node can be renamed
 
 - 
doRenamedefault void doRename() Called when the rename action is performed
 - 
doDeletevoid doDelete() Called when the delete action is performed
 - 
doCopyjava.awt.datatransfer.Transferable doCopy() Called when the copy action is performed.- Returns:
- the current selection as a Transferable, or null if the copy failed. Will be added to the system clipboard.
 
 - 
doCutjava.awt.datatransfer.Transferable doCut() Called when the cut action is performed.- Returns:
- the current selection as a Transferable, or null if the cut failed. Will be added to the system clipboard.
 
 - 
doPastevoid doPaste(java.awt.datatransfer.Transferable clipboardContents) Called when the paste action is performed- Parameters:
- clipboardContents- The current contents of the clipboard to paste.
 
 
- 
 
-