Static Public Member Functions | |
static JButton | createJButton (Class actionClass) |
static JButton | createJButton (TopComponent tc, Class actionClass) |
static JButton | createJButton (SystemAction act) |
static JButton | createJButton (Action act) |
static JPanel | createJButtonPanel (Class[] actionClasses) |
static JPanel | createJButtonPanel (TopComponent tc, Class[] actionClasses) |
static JComponent | addJButtons (JComponent comp, Class[] actionClasses) |
static ImageIcon | getBlankIcon () |
static Action | actionForComp (TopComponent tc, Class action) |
A few utility methods for Actions. This is partly an extension to the functionality in openide.awt.Actions.
static Action cern.gp.actions.support.ActionUtils.actionForComp | ( | TopComponent | tc, | |
Class | action | |||
) | [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
tc | the TopComponent (e.g. Explorer) to connect to | |
action | the action class |
References org.openide.windows.TopComponent.getLookup().
Referenced by cern.gp.actions.support.ActionUtils.createJButton().
static JComponent cern.gp.actions.support.ActionUtils.addJButtons | ( | JComponent | comp, | |
Class[] | actionClasses | |||
) | [static] |
Utility method, adds JButtons corresponding to the actionClasses to a JComponent
References cern.gp.actions.support.ActionUtils.createJButton().
Referenced by cern.gp.actions.support.ActionUtils.createJButtonPanel().
static JButton cern.gp.actions.support.ActionUtils.createJButton | ( | Action | act | ) | [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.
static JButton cern.gp.actions.support.ActionUtils.createJButton | ( | SystemAction | act | ) | [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.
static JButton cern.gp.actions.support.ActionUtils.createJButton | ( | TopComponent | tc, | |
Class | actionClass | |||
) | [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)
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 |
References cern.gp.actions.support.ActionUtils.actionForComp(), and cern.gp.actions.support.ActionUtils.createJButton().
static JButton cern.gp.actions.support.ActionUtils.createJButton | ( | Class | actionClass | ) | [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.
Referenced by cern.gp.actions.support.ActionUtils.addJButtons(), cern.gp.actions.support.ActionUtils.createJButton(), and cern.gp.actions.support.ActionUtils.createJButtonPanel().
static JPanel cern.gp.actions.support.ActionUtils.createJButtonPanel | ( | TopComponent | tc, | |
Class[] | actionClasses | |||
) | [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).
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 |
References cern.gp.actions.support.ActionUtils.createJButton(), and cern.gp.actions.support.ActionUtils.createJButtonPanel().
static JPanel cern.gp.actions.support.ActionUtils.createJButtonPanel | ( | Class[] | actionClasses | ) | [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
References cern.gp.actions.support.ActionUtils.addJButtons().
Referenced by cern.gp.actions.support.ActionUtils.createJButtonPanel().
static ImageIcon cern.gp.actions.support.ActionUtils.getBlankIcon | ( | ) | [static] |
utility method, returns a blank icon, can be used if an existing icon shall be "hidden"