public abstract class BeanAction
extends CookieAction
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 :
performCapability| Modifier | Constructor and Description |
|---|---|
protected |
BeanAction(java.lang.Class capabilityClass)
Creates a new BeanAction linked a the given
capabilityClass
and with default mode MODE_ANY |
protected |
BeanAction(java.lang.Class capabilityClass,
int mode)
Creates a new BeanAction linked a the given
capabilityClass
and with the given mode |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Class[] |
cookieClasses()
Returns the set of capabilities supported by this action.
|
javax.swing.JButton |
createJButton()
returns a Button that can invoke this action, and that is enabled or disabled
properly.
|
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 int |
mode() |
protected void |
performAction(Node[] activatedNodes)
Standard perform action extended by actually activated nodes.
|
protected abstract void |
performCapability(GPNode node,
Capability capability)
Performs the capability for the given node.
|
protected boolean |
surviveFocusChange() |
protected BeanAction(java.lang.Class capabilityClass)
capabilityClass
and with default mode MODE_ANYcapabilityClass - the capability class associated with this actionprotected BeanAction(java.lang.Class capabilityClass,
int mode)
capabilityClass
and with the given modecapabilityClass - the capability class associated with this actionmode - the mode of this action (see modes in CookieAction)public java.lang.String getName()
public HelpCtx getHelpCtx()
public javax.swing.JButton createJButton()
protected java.lang.String iconResource()
protected java.lang.Class[] cookieClasses()
protected boolean surviveFocusChange()
protected int mode()
protected void performAction(Node[] activatedNodes)
activatedNodes - gives array of actually activated nodes.org.openide.util.actions.CookieAction#performActionprotected abstract void performCapability(GPNode node, Capability capability) throws java.lang.reflect.InvocationTargetException
node - the node for which the capability is performedcapability - the capability to performjava.lang.reflect.InvocationTargetException