T - The Component extension whose edit
actions will be handledpublic abstract class CommonEditActionHandler<T extends java.awt.Component> extends AbstractEditActionHandler
Components. The canCopy(),
canDelete(), and canPaste(Clipboard) methods return
true when the injected component is the focus owner. The
doCut() method essentially delegates to EditActionHandler.doCopy() and
EditActionHandler.doDelete()listenerList| Constructor and Description |
|---|
CommonEditActionHandler(T component)
Constructor for injecting the
Component
extension |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCopy()
Can this edit action handler handle the copy action, given its current selection? Note that if this and
EditActionHandler.canDelete() both return true, the cut action will also be enabled. |
boolean |
canDelete()
Can this edit action handler handle the delete action, given its current selection? Note that if this and
EditActionHandler.canCopy() both return true, the cut action will also be enabled. |
boolean |
canPaste(java.awt.datatransfer.Clipboard clipboard)
Can this action handler handle a paste given the data flavors currently available in the clipboard?
|
java.awt.datatransfer.Transferable |
doCut()
Called when the cut action is performed.
|
T |
getComponent()
Getter for the
Component extension which was
injected during construction |
addChangeListener, fireChangeEvent, removeChangeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdoCopy, doDelete, doPastepublic CommonEditActionHandler(T component) throws java.lang.NullPointerException
Component
extensioncomponent - The Component extension to injectjava.lang.NullPointerException - if the component is nullpublic T getComponent()
Component extension which was
injected during constructionComponent extension which was
injected during constructionpublic boolean canDelete()
EditActionHandlerEditActionHandler.canCopy() both return true, the cut action will also be enabled.public boolean canCopy()
EditActionHandlerEditActionHandler.canDelete() both return true, the cut action will also be enabled.public boolean canPaste(java.awt.datatransfer.Clipboard clipboard)
EditActionHandlerpublic java.awt.datatransfer.Transferable doCut()
EditActionHandlerTransferable, or null if the cut failed. Will be added to the
system clipboard.