|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.tkuhn.swing.actions.ActionUtils
public class ActionUtils
This class is a repository for static functions that operate on
Action
s and help using Collection
s of
Action
s.
Action
Method Summary | |
---|---|
static javax.swing.JMenu |
addAll(javax.swing.JMenu menu,
java.util.Collection<javax.swing.Action> actions)
Adds all Action objects in the given Collection
to the given JMenu |
static javax.swing.JToolBar |
addAll(javax.swing.JToolBar toolBar,
java.util.Collection<javax.swing.Action> actions)
Adds all Action objects in the given Collection
to the given JToolBar |
static ActionComponentFactory |
getMenuActionComponentFactory()
Get the ActionComponentFactory usable for adding
Action s to a JMenu. |
static ActionComponentFactory |
getToolBarActionComponentFactory()
Get the ActionComponentFactory usable for adding
Action s to a JToolBar. |
static javax.swing.JComponent |
registerAllKeys(javax.swing.JComponent component,
java.util.Collection<javax.swing.Action> actions)
Registers the key shortcuts of all Actions objects in the
given Collection with the given JComponent . |
static void |
setMenuActionComponentFactory(ActionComponentFactory factory)
Set the ActionComponentFactory used when adding
Action s to a JMenu. |
static void |
setToolBarActionComponentFactory(ActionComponentFactory factory)
Set the ActionComponentFactory used when adding
Action s to a JToolBar. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static javax.swing.JComponent registerAllKeys(javax.swing.JComponent component, java.util.Collection<javax.swing.Action> actions)
Actions
objects in the
given Collection
with the given JComponent
. To
achieve that the values of Action.ACTION_COMMAND_KEY
and
Action.ACCELERATOR_KEY
are queried for every
Action
Then the key-shortcut is mapped with the command
String as identifier in the InputMap
of the component and
the identifier is mapped with the Action
in the
ActionMap
of the component.
component
- the JComponent
to map the key shortcuts with.actions
- a Collection
that may contain some
Action
s.
public static javax.swing.JToolBar addAll(javax.swing.JToolBar toolBar, java.util.Collection<javax.swing.Action> actions)
Action
objects in the given Collection
to the given JToolBar
toolBar
- the toolbar to add the actions toactions
- a Collection
that may contain some
Action
s.
public static javax.swing.JMenu addAll(javax.swing.JMenu menu, java.util.Collection<javax.swing.Action> actions)
Action
objects in the given Collection
to the given JMenu
menu
- the menu to add the actions toactions
- a Collection
that may contain some
Action
s.
public static void setToolBarActionComponentFactory(ActionComponentFactory factory)
ActionComponentFactory
used when adding
Action
s to a JToolBar.
factory
- New value of property toolBarActionComponentFactory.public static void setMenuActionComponentFactory(ActionComponentFactory factory)
ActionComponentFactory
used when adding
Action
s to a JMenu.
factory
- New value of property menuActionComponentFactory.public static ActionComponentFactory getToolBarActionComponentFactory()
ActionComponentFactory
usable for adding
Action
s to a JToolBar.
public static ActionComponentFactory getMenuActionComponentFactory()
ActionComponentFactory
usable for adding
Action
s to a JMenu.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |