|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cosylab.gui.components.util.Actions
public final class Actions
Convenience class with set of utilities to help work with Action instances. Supports enhencments to Action framework by Abeans.
If ActionList contains null action, than separator menu item is used.
| Nested Class Summary | |
|---|---|
static class |
Actions.ListenerForMenu
DOCUMENT ME! |
| Field Summary | |
|---|---|
static java.lang.String |
LARGE_ICON
Action value key for large icon image. |
static javax.swing.Action |
SEPARATOR
Action, which is used as placeholder for separator menu item. |
| Constructor Summary | |
|---|---|
Actions()
|
|
| Method Summary | |
|---|---|
static javax.swing.AbstractButton |
createButton(javax.swing.Action action)
Creates a button using the provided action. |
static javax.swing.JButton |
createButton(ActionList info)
Constructs a button from the provided ActionList. |
static javax.swing.JMenu |
createMenu(ActionList actions)
Constructs a menu with the given actions as menu items. |
static javax.swing.JMenu |
createMenu(ActionList actions,
int orientation)
Constructs a menu with given actions as menu items. |
static javax.swing.JMenuBar |
createMenuBar(ActionList actions)
Constructs a menu bar with the give actions. |
static javax.swing.JComponent |
createMenuComponent(javax.swing.Action action)
Creates new JMenuItem or JSeparator, depending
on provided action. |
static javax.swing.JComponent |
createMenuComponent(javax.swing.Action action,
boolean radio,
int orientation)
Creates new JMenuItem or JSeparator, depending
on provided action. |
static javax.swing.JMenuItem |
createMenuItem(javax.swing.Action action)
Creates new JMenuItem. |
static javax.swing.JMenuItem |
createMenuItem(javax.swing.Action action,
boolean radio)
Creates new JMenuItem. |
static javax.swing.JMenuItem |
createMenuItem(ActionList actions)
Creates a menu item with the given action. |
static javax.swing.JMenuItem |
createMenuItem(ActionList actions,
boolean radio)
Creates a menu item with the given action. |
static javax.swing.JPopupMenu |
createPopupMenu(ActionList info)
Creates a popup menu with the given actions. |
static boolean |
isSeparator(javax.swing.Action action)
Returns true if action should be mapped to separator menu
item. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String LARGE_ICON
public static final javax.swing.Action SEPARATOR
| Constructor Detail |
|---|
public Actions()
| Method Detail |
|---|
public static javax.swing.AbstractButton createButton(javax.swing.Action action)
action -
public static javax.swing.JButton createButton(ActionList info)
info -
public static javax.swing.JMenuItem createMenuItem(javax.swing.Action action)
JMenuItem. If action is null or
has SEPARATORvalue true, null is
returned.
action - action for which menu item should be created
JMenuItem or null if action is
null or has SEPARATORvalue
truepublic static javax.swing.JComponent createMenuComponent(javax.swing.Action action)
JMenuItem or JSeparator, depending
on provided action. If action is null or has
SEPARATORvalue true, then is reckognized as
separator and instance of JSeparator with provided
orientation is returned.
Same as createMenuComponent(Action action, boolean radio, int
orientation) with false for radio and
SwingConstants.HORIZONTAL for orientation.
action - action for which menu item should be created
JMenuItem or JSeparator if action is
null or has SEPARATORvalue
true
public static javax.swing.JComponent createMenuComponent(javax.swing.Action action,
boolean radio,
int orientation)
JMenuItem or JSeparator, depending
on provided action. If action is null or has
SEPARATORvalue true, then is reckognized as
separator and instance of JSeparator with provided
orientation is returned.
action - action for which menu item should be createdradio - if true then JRadioButtonMenuItem
is createdorientation - orientation used to
JMenuItem or JSeparator if action is
null or has SEPARATORvalue
true
public static javax.swing.JMenuItem createMenuItem(javax.swing.Action action,
boolean radio)
JMenuItem. If action is null or
has SEPARATORvalue true, null is
returned.
action - action for which menu item should be createdradio - if true then JRadioButtonMenuItem
is created
JMenuItem or null if action is
null or has SEPARATORvalue
truepublic static boolean isSeparator(javax.swing.Action action)
true if action should be mapped to separator menu
item.
action -
true if action should be mapped to separator menu
itempublic static javax.swing.JPopupMenu createPopupMenu(ActionList info)
info - actions to be included in the popup
public static javax.swing.JMenuItem createMenuItem(ActionList actions)
actions -
public static javax.swing.JMenuItem createMenuItem(ActionList actions,
boolean radio)
actions - radio - if true the menu item will be a radio button
public static javax.swing.JMenu createMenu(ActionList actions)
actions - menu items actions
public static javax.swing.JMenu createMenu(ActionList actions,
int orientation)
actions - menu items actionsorientation -
public static javax.swing.JMenuBar createMenuBar(ActionList actions)
actions -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||