public final class PasteAction extends CallbackSystemAction
topcomponent.getActionMap ().put (javax.swing.text.DefaultEditorKit.pasteAction, theActualAction);or by using the now deprecated
setPasteTypes
and setActionPerformer
methods.
There is a special support for more than one type of paste to be enabled at once.
If the theActualAction
returns array of actions from
getValue ("delegates")
than those actions are offered as
subelements by the paste action presenter.
Presenter.Menu, Presenter.Popup, Presenter.Toolbar
PROP_ENABLED, PROP_ICON
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 and Description |
---|
PasteAction() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent ev) |
protected boolean |
asynchronous() |
Action |
createContextAwareInstance(Lookup actionContext) |
Object |
getActionMapKey() |
HelpCtx |
getHelpCtx() |
JMenuItem |
getMenuPresenter() |
String |
getName() |
PasteType[] |
getPasteTypes()
Get all paste types.
|
JMenuItem |
getPopupPresenter() |
protected String |
iconResource() |
protected void |
initialize() |
void |
setPasteTypes(PasteType[] types)
Deprecated.
Use
TopComponent.getActionMap ().put (javax.swing.text.DefaultEditorKit.pasteAction, yourPasteAction);
If you want register more paste types then use an action which delegates to
an array of PasteAction or also can delegate to an array of
org.openide.util.datatransfer.PasteType . |
getActionPerformer, getSurviveFocusChange, performAction, setActionPerformer, setSurviveFocusChange
getToolbarPresenter
clearSharedData, createPopupMenu, createToolbarPresenter, get, getIcon, getIcon, getValue, isEnabled, linkActions, putValue, setEnabled, setIcon
addNotify, addPropertyChangeListener, equals, finalize, findObject, findObject, firePropertyChange, getLock, getProperty, hashCode, putProperty, putProperty, readExternal, removeNotify, removePropertyChangeListener, reset, writeExternal, writeReplace
clone, getClass, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
protected void initialize()
initialize
in class CallbackSystemAction
public String getName()
getName
in class SystemAction
public HelpCtx getHelpCtx()
getHelpCtx
in interface HelpCtx.Provider
getHelpCtx
in class SystemAction
protected String iconResource()
iconResource
in class SystemAction
public JMenuItem getMenuPresenter()
getMenuPresenter
in interface Presenter.Menu
getMenuPresenter
in class CallableSystemAction
public JMenuItem getPopupPresenter()
getPopupPresenter
in interface Presenter.Popup
getPopupPresenter
in class CallableSystemAction
public Action createContextAwareInstance(Lookup actionContext)
createContextAwareInstance
in interface ContextAwareAction
createContextAwareInstance
in class CallbackSystemAction
public Object getActionMapKey()
getActionMapKey
in class CallbackSystemAction
public void actionPerformed(ActionEvent ev)
actionPerformed
in interface ActionListener
actionPerformed
in class CallbackSystemAction
protected boolean asynchronous()
asynchronous
in class CallableSystemAction
@Deprecated public void setPasteTypes(PasteType[] types)
TopComponent.getActionMap ().put (javax.swing.text.DefaultEditorKit.pasteAction, yourPasteAction);
If you want register more paste types then use an action which delegates to
an array of PasteAction
or also can delegate to an array of
org.openide.util.datatransfer.PasteType
.types
- the new types to allow, or null
public PasteType[] getPasteTypes()
null