Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

cern::gp::actions::support::ActionUtils Class Reference

List of all members.

Static Public Member Functions

JButton createJButton (Class actionClass)
JButton createJButton (TopComponent tc, Class actionClass)
JButton createJButton (SystemAction act)
JButton createJButton (Action act)
JPanel createJButtonPanel (Class[] actionClasses)
JPanel createJButtonPanel (TopComponent tc, Class[] actionClasses)
JComponent addJButtons (JComponent comp, Class[] actionClasses)
ImageIcon getBlankIcon ()
Action actionForComp (TopComponent tc, Class action)

Private Member Functions

 ActionUtils ()

Static Private Attributes

ImageIcon BLANK_ICON = null

Detailed Description

A few utility methods for Actions. This is partly an extension to the functionality in openide.awt.Actions.

Author:
Vito Baggiolini
Version:
Revision
1.2
Date
2006/09/25 08:52:36


Constructor & Destructor Documentation

cern::gp::actions::support::ActionUtils::ActionUtils  )  [inline, private]
 

do not instantiate


Member Function Documentation

Action cern::gp::actions::support::ActionUtils::actionForComp TopComponent  tc,
Class  action
[inline, static]
 

helper method, creates an action that is "connected" to the nodes inside a TopComponent. This makes it possible to create Action Buttons that listen to nodes in an Explorer but are located outside the Explorer's TopComponent

Parameters:
tc the TopComponent (e.g. Explorer) to connect to
action the action class
Returns:
the Context aware Action instance
Since:
2.0.5

JComponent cern::gp::actions::support::ActionUtils::addJButtons JComponent  comp,
Class[]  actionClasses
[inline, static]
 

Utility method, adds JButtons corresponding to the actionClasses to a JComponent

Returns:
the JComponent passed as first paraameter, with the buttons added
Deprecated:
-- tell us (proj-gp-dev@cern.ch) if you really need it!

JButton cern::gp::actions::support::ActionUtils::createJButton Action  act  )  [inline, static]
 

creates a JButton for the Action itself. You should not need to use this method, rather use createJButton(Class) If you find you need to use this action, please do not create actions yourself, use the or #actionForComp(TopComponent, Class) instead.

See also:
createJButton(Class) for more explanations
Returns:
a JButton
Since:
2.0.5

JButton cern::gp::actions::support::ActionUtils::createJButton SystemAction  act  )  [inline, static]
 

creates a JButton for the SystemAction itself. You should not need to use this method, rather use createJButton(Class) If you find you need to use this action, please do not create actions yourself, use the or #actionForComp(TopComponent, Class) instead.

See also:
createJButton(Class) for more explanations
Returns:
a JButton
Deprecated:
-- use createJButton(Action)

JButton cern::gp::actions::support::ActionUtils::createJButton TopComponent  tc,
Class  actionClass
[inline, static]
 

creates a JButton for the action class that listens to Nodes in the specified TopComponent. This is useful, e.g. when you want to place the JButton in a separate TopComponent (i.e. not in the Explorer TopComponent itself)

Parameters:
tc the TopComponent that contains the nodes (typically this is an Explorer)
actionClass an action supported by one or more of the nodes in the TopComponent
Returns:
a JButton
Since:
2.0.5

JButton cern::gp::actions::support::ActionUtils::createJButton Class  actionClass  )  [inline, static]
 

creates a JButton for the action class. This button takes its icon, description, shortcut etc from the action class. It is enabled whenever the action is enabled.

Returns:
a JButton

JPanel cern::gp::actions::support::ActionUtils::createJButtonPanel TopComponent  tc,
Class[]  actionClasses
[inline, static]
 

creates a JPanel with JButtons for action classes that listen to Nodes in the specified TopComponent. This is useful, e.g.when you want to place the Buttons in a separate TopComponent (i.e. not in the Explorer TopComponent itself).

Parameters:
tc the TopComponent that contains the nodes (typically this is an Explorer)
actionClasses actions supported by one or more of the nodes in the TopComponent
Returns:
a JButton
Since:
2.0.5

JPanel cern::gp::actions::support::ActionUtils::createJButtonPanel Class[]  actionClasses  )  [inline, static]
 

creates a JPanel with JButtons for the actions specified. The JPanel uses a FlowLayout. If you don't like the JPanel, you can create the JPanel (or other component) yourself and use addJButtons

Returns:
JPanel the panel containing the buttons

ImageIcon cern::gp::actions::support::ActionUtils::getBlankIcon  )  [inline, static]
 

utility method, returns a blank icon, can be used if an existing icon shall be "hidden"


Member Data Documentation

ImageIcon cern::gp::actions::support::ActionUtils::BLANK_ICON = null [static, private]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:08:13 2009 for ACS Java API by doxygen 1.3.8