| java.lang.Object org.apache.batik.util.gui.resource.ResourceManager org.apache.batik.util.gui.resource.MenuFactory
All known Subclasses: com.projity.menu.ExtMenuFactory,
MenuFactory | public class MenuFactory extends ResourceManager (Code) | | This class represents a menu factory which builds
menubars and menus from the content of a resource file.
The resource entries format is (for a menubar named 'MenuBar'):
MenuBar = Menu1 Menu2 ...
Menu1.type = RADIO | CHECK | MENU | ITEM
Menu1 = Item1 Item2 - Item3 ...
Menu1.text = text
Menu1.icon = icon_name
Menu1.mnemonic = mnemonic
Menu1.accelerator = accelerator
Menu1.action = action_name
Menu1.selected = true | false
Menu1.enabled = true | false
...
mnemonic is a single character
accelerator is of the form: mod+mod+...+X
where mod is Shift, Meta, Alt or Ctrl
'-' represents a separator
All entries are optional except the '.type' entry
Consecutive RADIO items are put in a ButtonGroup
author: Stephane Hillion version: $Id: MenuFactory.java,v 1.1 2007/08/15 23:28:28 suricate Exp $ |
MenuFactory | public MenuFactory(ResourceBundle rb, ActionMap am)(Code) | | Creates a new menu factory
Parameters: rb - the resource bundle that contains the menu bardescription. Parameters: am - the actions to add to menu items |
toKeyStroke | protected KeyStroke toKeyStroke(String str)(Code) | | Translate a string into a key stroke.
See the class comment for details
Parameters: str - a string |
|
|