public class ActionUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static javax.swing.Action |
actionForComp(TopComponent tc,
java.lang.Class action)
helper method, creates an action that is "connected" to the nodes inside a TopComponent.
|
static javax.swing.JComponent |
addJButtons(javax.swing.JComponent comp,
java.lang.Class[] actionClasses)
Deprecated.
-- tell us (proj-gp-dev@cern.ch) if you really need it!
|
static javax.swing.JButton |
createJButton(java.lang.Class actionClass)
creates a JButton for the action class.
|
static javax.swing.JButton |
createJButton(SystemAction act)
Deprecated.
-- use
#createJButton(Action) |
static javax.swing.JButton |
createJButton(TopComponent tc,
java.lang.Class actionClass)
creates a JButton for the action class that listens to Nodes in the specified TopComponent.
|
static javax.swing.JPanel |
createJButtonPanel(java.lang.Class[] actionClasses)
creates a JPanel with JButtons for the actions specified.
|
static javax.swing.JPanel |
createJButtonPanel(TopComponent tc,
java.lang.Class[] actionClasses)
creates a JPanel with JButtons for action classes that listen to Nodes in the specified TopComponent.
|
static javax.swing.ImageIcon |
getBlankIcon()
utility method, returns a blank icon, can be used if an existing icon shall be "hidden"
|
public static javax.swing.JButton createJButton(java.lang.Class actionClass)
public static javax.swing.JButton createJButton(TopComponent tc, java.lang.Class actionClass)
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 TopComponentpublic static javax.swing.JButton createJButton(SystemAction act)
#createJButton(Action)createJButton(Class)
If you find you need to use this action, please do not create actions yourself,
use the SystemAction#get(java.lang.Class) or {@link #actionForComp(TopComponent, Class)} instead.for more explanationspublic static javax.swing.JPanel createJButtonPanel(java.lang.Class[] actionClasses)
public static javax.swing.JPanel createJButtonPanel(TopComponent tc, java.lang.Class[] actionClasses)
tc - the TopComponent that contains the nodes (typically this is an Explorer)actionClasses - actions supported by one or more of the nodes in the TopComponentpublic static javax.swing.JComponent addJButtons(javax.swing.JComponent comp,
java.lang.Class[] actionClasses)
public static javax.swing.ImageIcon getBlankIcon()
public static javax.swing.Action actionForComp(TopComponent tc, java.lang.Class action)
tc - the TopComponent (e.g. Explorer) to connect toaction - the action class