Public Member Functions | Protected Member Functions

cern.gp.actions.support.BeanAction Class Reference

Inheritance diagram for cern.gp.actions.support.BeanAction:
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 cern.gp.actions.ViewAction

List of all members.

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

Detailed Description

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) :

Subclasses must overwrite the following abstract methods :

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

Constructor & Destructor Documentation

cern.gp.actions.support.BeanAction.BeanAction ( Class  capabilityClass  )  [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
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

Parameters:
capabilityClass the capability class associated with this action
mode the mode of this action (see modes in CookieAction)

Member Function Documentation

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).

Returns:
set of needed cookies
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()

Returns:
a button connected to this action
HelpCtx cern.gp.actions.support.BeanAction.getHelpCtx (  ) 

Help context where to find more about the action.

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

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

Returns:
the name of the action

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

Returns:
the pathname of the icon

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.

See also:
org.openide.util.actions.CookieAction.performAction
Parameters:
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.

Parameters:
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]

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