public abstract class NodeAction
extends org.openide.util.actions.NodeAction
Subclasses should overwrite the following methods in order to provide custom name and icon (if not overwritten a generic name and icon will be used) :
getNameiconResourceSubclasses must overwrite the following abstract methods :
performAction(GPNode[])
The action will only be enable if at least one GPNode is in the selection. It is possible to change the behavior of
the enable by overriding the enable method.
| Modifier | Constructor and Description |
|---|---|
protected |
NodeAction()
Creates a new BeanAction linked a the given
capabilityClass
and with default mode MODE_ANY |
| Modifier and Type | Method and Description |
|---|---|
javax.swing.JButton |
createJButton()
returns a Button that can invoke this action, and that is enabled or disabled
properly.
|
protected boolean |
enable(Node[] activatedNodes)
The action will only be enabled if at least one GPNode is selected.
|
HelpCtx |
getHelpCtx()
Help context where to find more about the action.
|
java.lang.String |
getName()
Human presentable name of the action.
|
protected java.lang.String |
iconResource()
Returns the pathname of the icon to use to display this action
|
protected void |
performAction(Node[] activatedNodes)
Standard perform action extended by actually activated nodes.
|
protected boolean |
surviveFocusChange() |
protected NodeAction()
capabilityClass
and with default mode MODE_ANYcapabilityClass - the capability class associated with this actionpublic java.lang.String getName()
public HelpCtx getHelpCtx()
public javax.swing.JButton createJButton()
protected java.lang.String iconResource()
protected boolean surviveFocusChange()
protected boolean enable(Node[] activatedNodes)
activatedNodes - gives array of actually activated nodes.org.openide.util.actions.NodeAction#enableprotected void performAction(Node[] activatedNodes)
activatedNodes - gives array of actually activated nodes.org.openide.util.actions.NodeAction#performAction