ActionListener
, Externalizable
, Serializable
, EventListener
, Action
, org.openide.util.actions.Presenter
, org.openide.util.actions.Presenter.Menu
, org.openide.util.actions.Presenter.Popup
, org.openide.util.actions.Presenter.Toolbar
, org.openide.util.ContextAwareAction
, org.openide.util.HelpCtx.Provider
public final class PasteAction
extends org.openide.util.actions.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.
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 | Description |
---|---|
PasteAction() |
Modifier and Type | Method | Description |
---|---|---|
void |
actionPerformed(ActionEvent ev) |
|
protected boolean |
asynchronous() |
|
Action |
createContextAwareInstance(org.openide.util.Lookup actionContext) |
|
Object |
getActionMapKey() |
|
org.openide.util.HelpCtx |
getHelpCtx() |
|
JMenuItem |
getMenuPresenter() |
|
String |
getName() |
|
org.openide.util.datatransfer.PasteType[] |
getPasteTypes() |
Get all paste types.
|
JMenuItem |
getPopupPresenter() |
|
protected String |
iconResource() |
|
protected void |
initialize() |
|
void |
setPasteTypes(org.openide.util.datatransfer.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 . |
accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
getActionPerformer, getSurviveFocusChange, performAction, setActionPerformer, setSurviveFocusChange
clone, getClass, notify, notifyAll, toString, wait, wait, wait
addNotify, addPropertyChangeListener, equals, finalize, findObject, findObject, firePropertyChange, getLock, getProperty, hashCode, putProperty, putProperty, readExternal, removeNotify, removePropertyChangeListener, reset, writeExternal, writeReplace
protected void initialize()
initialize
in class org.openide.util.actions.CallbackSystemAction
public String getName()
getName
in class org.openide.util.actions.SystemAction
public org.openide.util.HelpCtx getHelpCtx()
getHelpCtx
in interface org.openide.util.HelpCtx.Provider
getHelpCtx
in class org.openide.util.actions.SystemAction
protected String iconResource()
iconResource
in class org.openide.util.actions.SystemAction
public JMenuItem getMenuPresenter()
getMenuPresenter
in interface org.openide.util.actions.Presenter.Menu
getMenuPresenter
in class org.openide.util.actions.CallableSystemAction
public JMenuItem getPopupPresenter()
getPopupPresenter
in interface org.openide.util.actions.Presenter.Popup
getPopupPresenter
in class org.openide.util.actions.CallableSystemAction
public Action createContextAwareInstance(org.openide.util.Lookup actionContext)
createContextAwareInstance
in interface org.openide.util.ContextAwareAction
createContextAwareInstance
in class org.openide.util.actions.CallbackSystemAction
public Object getActionMapKey()
getActionMapKey
in class org.openide.util.actions.CallbackSystemAction
public void actionPerformed(ActionEvent ev)
actionPerformed
in interface ActionListener
actionPerformed
in class org.openide.util.actions.CallbackSystemAction
protected boolean asynchronous()
asynchronous
in class org.openide.util.actions.CallableSystemAction
@Deprecated public void setPasteTypes(org.openide.util.datatransfer.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 org.openide.util.datatransfer.PasteType[] getPasteTypes()
null
Built on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.