|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.awt.Actions
Supporting class for manipulation with menu and toolbar presenters.
Nested Class Summary | |
static class |
Actions.CheckboxMenuItem
CheckboxMenuItem extends the java.awt.CheckboxMenuItem and adds a connection to boolean state actions. |
static class |
Actions.MenuItem
Extension of Swing menu item with connection to system actions. |
static class |
Actions.SubMenu
SubMenu provides easy way of displaying submenu items based on SubMenuModel. |
static interface |
Actions.SubMenuModel
Interface for the creating Actions.SubMenu. |
static class |
Actions.ToolbarButton
Component shown in toolbar, representing an action. |
static class |
Actions.ToolbarToggleButton
The Component for BooleeanState action that is to be shown in a toolbar. |
Constructor Summary | |
Actions()
|
Method Summary | |
static void |
connect(AbstractButton button,
Action action)
Connects buttons to action. |
static void |
connect(AbstractButton button,
BooleanStateAction action)
Connects buttons to action. |
static void |
connect(AbstractButton button,
SystemAction action)
Deprecated. Use connect(AbstractButton, Action) instead. |
static void |
connect(JCheckBoxMenuItem item,
BooleanStateAction action,
boolean popup)
Attaches checkbox menu item to boolean state action. |
static void |
connect(JMenuItem item,
Action action,
boolean popup)
Attaches menu item to an action. |
static void |
connect(JMenuItem item,
SystemAction action,
boolean popup)
Deprecated. Use connect(JMenuItem, Action, boolean) instead. |
static String |
cutAmpersand(String text)
Removes an ampersand from a text string; commonly used to strip out unneeded mnemonics. |
static String |
findKey(SystemAction action)
Method that finds the keydescription assigned to this action. |
static void |
setMenuText(AbstractButton item,
String text,
boolean useMnemonic)
Deprecated. Use either AbstractButton.setText(java.lang.String) or Mnemonics.setLocalizedText(AbstractButton, String) as appropriate. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Actions()
Method Detail |
public static String findKey(SystemAction action)
action
- action to find key for
public static void connect(JMenuItem item, SystemAction action, boolean popup)
connect(JMenuItem, Action, boolean)
instead.
item
- menu itemaction
- actionpopup
- create popup or menu itempublic static void connect(JMenuItem item, Action action, boolean popup)
item
- menu itemaction
- actionpopup
- create popup or menu itempublic static void connect(JCheckBoxMenuItem item, BooleanStateAction action, boolean popup)
item
- menu itemaction
- actionpopup
- create popup or menu itempublic static void connect(AbstractButton button, SystemAction action)
connect(AbstractButton, Action)
instead.
button
- the buttonaction
- the actionpublic static void connect(AbstractButton button, Action action)
SystemAction.iconResource()
for more details.
button
- the buttonaction
- the actionpublic static void connect(AbstractButton button, BooleanStateAction action)
button
- the buttonaction
- the actionpublic static void setMenuText(AbstractButton item, String text, boolean useMnemonic)
AbstractButton.setText(java.lang.String)
or Mnemonics.setLocalizedText(AbstractButton, String)
as appropriate.
item
- AbstractButtontext
- new labeluseMnemonic
- if true and '&' char found in new text, next char is used
as Mnemonic.public static String cutAmpersand(String text)
The current implementation behaves in the same way regardless of locale. In case of a conflict it would be necessary to change the behavior based on the current locale.
text
- a localized label that may have mnemonic information in it
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |