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, getComponent
addChangeListener, fireChangeEvent, removeChangeListener
public JTextComponentEditActionHandler(javax.swing.text.JTextComponent component) throws java.lang.NullPointerException
JTextComponent
component
- The JTextComponent
to
injectjava.lang.NullPointerException
- if the JTextComponent
is nullpublic void doDelete()
EditActionHandler
public java.awt.datatransfer.Transferable doCopy()
EditActionHandler
Transferable
, or null if the copy failed. Will be added to
the system clipboard.public void doPaste(java.awt.datatransfer.Transferable clipboardContents)
EditActionHandler
clipboardContents
- The current contents of the clipboard to paste.