Public Member Functions | |
String | getName () |
HelpCtx | getHelpCtx () |
JButton | createJButton () |
Protected Member Functions | |
BeanAction (Class capabilityClass) | |
BeanAction (Class capabilityClass, int mode) | |
String | iconResource () |
Class[] | cookieClasses () |
boolean | surviveFocusChange () |
int | mode () |
void | performAction (final Node[] activatedNodes) |
abstract void | performCapability (GPNode node, Capability capability) throws InvocationTargetException |
Generic action that should be used as a parent class for all actions linked to beans in the GP Platform.
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) :
getName
iconResource
Subclasses must overwrite the following abstract methods :
performCapability
cern.gp.actions.support.BeanAction.BeanAction | ( | Class | capabilityClass | ) | [protected] |
Creates a new BeanAction linked a the given capabilityClass
and with default mode MODE_ANY
capabilityClass | the capability class associated with this action |
cern.gp.actions.support.BeanAction.BeanAction | ( | Class | capabilityClass, | |
int | mode | |||
) | [protected] |
Creates a new BeanAction linked a the given capabilityClass
and with the given mode
capabilityClass | the capability class associated with this action | |
mode | the mode of this action (see modes in CookieAction ) |
Class [] cern.gp.actions.support.BeanAction.cookieClasses | ( | ) | [protected] |
Returns the set of capabilities supported by this action. Currently this action only support one single capability (named cookie in NetBeans).
JButton cern.gp.actions.support.BeanAction.createJButton | ( | ) |
returns a Button that can invoke this action, and that is enabled or disabled properly. This is analogous to getMenuItemPresenter() or getToolBarPresenter()
HelpCtx cern.gp.actions.support.BeanAction.getHelpCtx | ( | ) |
Help context where to find more about the action.
String cern.gp.actions.support.BeanAction.getName | ( | ) |
Human presentable name of the action. This should be presented as an item in a menu.
Reimplemented in cern.gp.actions.AcceptAction, cern.gp.actions.CopyAction, cern.gp.actions.DeleteAction, cern.gp.actions.EditAction, cern.gp.actions.RemoveAction, cern.gp.actions.StopAction, and cern.gp.actions.ViewAction.
String cern.gp.actions.support.BeanAction.iconResource | ( | ) | [protected] |
Returns the pathname of the icon to use to display this action
Reimplemented in cern.gp.actions.RemoveAction, and cern.gp.actions.StopAction.
int cern.gp.actions.support.BeanAction.mode | ( | ) | [protected] |
void cern.gp.actions.support.BeanAction.performAction | ( | final Node[] | activatedNodes | ) | [protected] |
Standard perform action extended by actually activated nodes.
activatedNodes | gives array of actually activated nodes. |
References cern.gp.actions.support.BeanAction.performCapability().
abstract void cern.gp.actions.support.BeanAction.performCapability | ( | GPNode | node, | |
Capability | capability | |||
) | throws InvocationTargetException [protected, pure virtual] |
Performs the capability for the given node.
node | the node for which the capability is performed | |
capability | the capability to perform |
Implemented in cern.gp.actions.AcceptAction, cern.gp.actions.CopyAction, cern.gp.actions.DeleteAction, cern.gp.actions.EditAction, cern.gp.actions.RemoveAction, cern.gp.actions.StopAction, cern.gp.actions.support.BeanActionSupport, and cern.gp.actions.ViewAction.
Referenced by cern.gp.actions.support.BeanAction.performAction().
boolean cern.gp.actions.support.BeanAction.surviveFocusChange | ( | ) | [protected] |
Reimplemented in cern.gp.actions.CopyAction, and cern.gp.actions.DeleteAction.