public class JTextComponentEditActionHandler extends CommonEditActionHandler<javax.swing.text.JTextComponent>
EditActionHandler for JTextComponents which takes care of the basic Copy / Cut / Paste / Delete
actions.listenerList| Constructor and Description |
|---|
JTextComponentEditActionHandler(javax.swing.text.JTextComponent component)
Constructor for injecting the
JTextComponent |
| Modifier and Type | Method and Description |
|---|---|
java.awt.datatransfer.Transferable |
doCopy()
Called when the copy action is performed.
|
void |
doDelete()
Called when the delete action is performed
|
void |
doPaste(java.awt.datatransfer.Transferable clipboardContents)
Called when the paste action is performed
|
canCopy, canDelete, canPaste, doCut, getComponentaddChangeListener, fireChangeEvent, removeChangeListenerpublic JTextComponentEditActionHandler(javax.swing.text.JTextComponent component)
throws java.lang.NullPointerException
JTextComponentcomponent - The JTextComponent to
injectjava.lang.NullPointerException - if the JTextComponent
is nullpublic void doDelete()
EditActionHandlerpublic java.awt.datatransfer.Transferable doCopy()
EditActionHandlerTransferable, or null if the copy failed. Will be added to
the system clipboard.public void doPaste(java.awt.datatransfer.Transferable clipboardContents)
EditActionHandlerclipboardContents - The current contents of the clipboard to paste.