Public Member Functions | Protected Member Functions

cern.gp.actions.support.NodeAction Class Reference

Inheritance diagram for cern.gp.actions.support.NodeAction:
cern.gp.actions.support.ContextAction

List of all members.

Public Member Functions

String getName ()
HelpCtx getHelpCtx ()
JButton createJButton ()

Protected Member Functions

 NodeAction ()
String iconResource ()
boolean surviveFocusChange ()
boolean enable (Node[] activatedNodes)
void performAction (final Node[] activatedNodes)
abstract void performAction (GPNode[] activatedNodes)

Detailed Description

Generic action that should be used as a parent class for all actions linked to nodes 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) :

Subclasses must overwrite the following abstract methods :

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.

Version:
Revision:
1.2
Date:
2006/09/25 08:52:36
Author:
Lionel Mestre

Constructor & Destructor Documentation

cern.gp.actions.support.NodeAction.NodeAction (  )  [protected]

Creates a new BeanAction linked a the given capabilityClass and with default mode MODE_ANY

Parameters:
capabilityClass the capability class associated with this action

Member Function Documentation

JButton cern.gp.actions.support.NodeAction.createJButton (  ) 

returns a Button that can invoke this action, and that is enabled or disabled properly. This is analogous to getMenuItemPresenter() or getToolBarPresenter()

Returns:
a button connected to this action
boolean cern.gp.actions.support.NodeAction.enable ( Node[]  activatedNodes  )  [protected]

The action will only be enabled if at least one GPNode is selected.

See also:
org.openide.util.actions.NodeAction.enable
Parameters:
activatedNodes gives array of actually activated nodes.
HelpCtx cern.gp.actions.support.NodeAction.getHelpCtx (  ) 

Help context where to find more about the action.

Returns:
the help context for this action
String cern.gp.actions.support.NodeAction.getName (  ) 

Human presentable name of the action. This should be presented as an item in a menu.

Returns:
the name of the action
String cern.gp.actions.support.NodeAction.iconResource (  )  [protected]

Returns the pathname of the icon to use to display this action

Returns:
the pathname of the icon
abstract void cern.gp.actions.support.NodeAction.performAction ( GPNode[]  activatedNodes  )  [protected, pure virtual]

Performs the action for the given nodes.

Parameters:
activatedNodes the non null (possibly empty) array of nodes selected at the moment the action has been triggered

Implemented in cern.gp.actions.support.ContextAction.

void cern.gp.actions.support.NodeAction.performAction ( final Node[]  activatedNodes  )  [protected]

Standard perform action extended by actually activated nodes. Only actual instance of GPNode are taking into account by this implementation. The other are ignored.

See also:
org.openide.util.actions.NodeAction.performAction
Parameters:
activatedNodes gives array of actually activated nodes.
boolean cern.gp.actions.support.NodeAction.surviveFocusChange (  )  [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties