|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.brains2b.swingext.gui.GuiItemFactory
public class GuiItemFactory
Factory class to create Swing components mostly from an Action
GuiItem.MenuItem.showIcon
will define if the menu item shows the Icon from the ActionGuiItem.Button.showIcon
will define if a button shows the Icon from the ActionGuiItem.Button.showText
will define if a button shows the Text from the Action (default to true)JMenu
does not allow setting the mnemonic directly.
Method Summary | |
---|---|
static javax.swing.JMenu |
createMenu(java.lang.String label,
char mnemonic)
Create a JMenu with a mnemonic |
static javax.swing.JMenuItem |
createMenuItem(javax.swing.JMenuItem parent,
javax.swing.Action action)
Create a JMenuItem on the basis of an Action and add it to the parent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final javax.swing.JMenu createMenu(java.lang.String label, char mnemonic)
label
- String, the label for this menumnemonic
- char, the mnemonic for this JMenu
JMenuItem
public static final javax.swing.JMenuItem createMenuItem(javax.swing.JMenuItem parent, javax.swing.Action action)
Action
and add it to the parent.
If UIManager
property GuiItem.MenuItem.showIcon
is
set the JMenuItem will show an Icon if it is part of the Action.
The accelerator is copied from the Action seperatly, because it is not used from the Action directly.
Note: While JMenu is just another JMenuItem you can add JMenuItem's to any JMenu, or to a JMenuItem
parent
- JMenuItem, the menu item to add this menu item to.action
- Action, the action to create the JMenuItem from.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |