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.
| Constructor | Description |
|---|---|
PasteAction() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
actionPerformed(java.awt.event.ActionEvent ev) |
|
protected boolean |
asynchronous() |
|
javax.swing.Action |
createContextAwareInstance(org.openide.util.Lookup actionContext) |
|
java.lang.Object |
getActionMapKey() |
|
org.openide.util.HelpCtx |
getHelpCtx() |
|
javax.swing.JMenuItem |
getMenuPresenter() |
|
java.lang.String |
getName() |
|
org.openide.util.datatransfer.PasteType[] |
getPasteTypes() |
Get all paste types.
|
javax.swing.JMenuItem |
getPopupPresenter() |
|
protected java.lang.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, setEnabledgetActionPerformer, getSurviveFocusChange, performAction, setActionPerformer, setSurviveFocusChangeclone, getClass, notify, notifyAll, toString, wait, wait, waitaddNotify, addPropertyChangeListener, equals, finalize, findObject, findObject, firePropertyChange, getLock, getProperty, hashCode, putProperty, putProperty, readExternal, removeNotify, removePropertyChangeListener, reset, writeExternal, writeReplaceprotected void initialize()
initialize in class org.openide.util.actions.CallbackSystemActionpublic java.lang.String getName()
getName in class org.openide.util.actions.SystemActionpublic org.openide.util.HelpCtx getHelpCtx()
getHelpCtx in class org.openide.util.actions.SystemActionprotected java.lang.String iconResource()
iconResource in class org.openide.util.actions.SystemActionpublic javax.swing.JMenuItem getMenuPresenter()
getMenuPresenter in class org.openide.util.actions.CallableSystemActionpublic javax.swing.JMenuItem getPopupPresenter()
getPopupPresenter in class org.openide.util.actions.CallableSystemActionpublic javax.swing.Action createContextAwareInstance(org.openide.util.Lookup actionContext)
createContextAwareInstance in class org.openide.util.actions.CallbackSystemActionpublic java.lang.Object getActionMapKey()
getActionMapKey in class org.openide.util.actions.CallbackSystemActionpublic void actionPerformed(java.awt.event.ActionEvent ev)
actionPerformed in class org.openide.util.actions.CallbackSystemActionprotected 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 nullpublic org.openide.util.datatransfer.PasteType[] getPasteTypes()
nullBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.