| java.lang.Object org.underworldlabs.swing.util.MenuBuilder
MenuBuilder | public class MenuBuilder (Code) | | A helper class for creating menu items.
author: Takis Diakoumis version: $Revision: 1.5 $ |
Method Summary | |
public JMenu | createMenu(String sText, int acceleratorKey) Creates the required menu.
The menu item is initialised with a name and
key mnemonic. | public JMenuItem | createMenuItem(JMenu menu, int iType, String sText, ImageIcon image, int acceleratorKey, String sToolTip, Action a) | public JMenuItem | createMenuItem(JMenu menu, int iType, String sText, ImageIcon image, int acceleratorKey, String sToolTip, Action a, String actionCommand) Creates the required menu item.
The menu item is associated with a JMenu ,
a name, an image icon, a key mnemonic and a tool tip. | public JMenuItem | createMenuItem(JMenu menu, int iType, Action action) | public JMenuItem | createMenuItem(JMenu menu, String sText, int iType, String sToolTip) | public JMenuItem | createMenuItem(JMenu menu, int iType, int acceleratorKey, String sToolTip, Action a) | public JMenuItem | createMenuItem(JMenu menu, int iType, String sToolTip, Action a) |
ITEM_CHECK | final public static int ITEM_CHECK(Code) | | A JCheckBoxMenuItem menu item
|
ITEM_PLAIN | final public static int ITEM_PLAIN(Code) | | A JMenuItem menu item
|
ITEM_RADIO | final public static int ITEM_RADIO(Code) | | A JRadioButtonMenuItem menu item
|
MenuBuilder | public MenuBuilder()(Code) | | Creates a new MenuBuilder object
|
createMenu | public JMenu createMenu(String sText, int acceleratorKey)(Code) | | Creates the required menu.
The menu item is initialised with a name and
key mnemonic.
Parameters: sText - The name of this menu Parameters: acceleratorKey - The keyboard mnemonic associatedwith this menu The constructed JMenu |
createMenuItem | public JMenuItem createMenuItem(JMenu menu, int iType, String sText, ImageIcon image, int acceleratorKey, String sToolTip, Action a, String actionCommand)(Code) | | Creates the required menu item.
The menu item is associated with a JMenu ,
a name, an image icon, a key mnemonic and a tool tip.
Parameters: menu - The JMenu that this menu itemwill be associated with Parameters: iType - The type of menu item to be constructed(see public fields) Parameters: sText - The name of this menu item Parameters: image - The image icon to be displayed with this menu item Parameters: acceleratorKey - The keyboard mnemonic associated with themenu item Parameters: sToolTip - The tool tip associated with the menu item The constructed JMenuItem |
|
|