Package jam.demo.menus
Class DemoMenuFactory
java.lang.Object
jam.demo.menus.DemoMenuFactory
- All Implemented Interfaces:
MenuFactory
- Version:
- $Id: DemoMenuFactory.java 840 2007-11-09 04:52:39Z twobeers $ Created on 24 February 2005, 17:12:11
- Author:
- Andrew Rambaut
-
Field Summary
FieldsFields inherited from interface jam.framework.MenuFactory
CENTER, LEFT, RIGHT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGive the name of this menu.int
Returns the preferred alignment of the menu in the menu bar.void
populateMenu
(JMenu menu, AbstractFrame frame) This method should populate the menu with menu items.
-
Field Details
-
FIRST
- See Also:
-
SECOND
- See Also:
-
-
Constructor Details
-
DemoMenuFactory
public DemoMenuFactory()
-
-
Method Details
-
getMenuName
Description copied from interface:MenuFactory
Give the name of this menu. If multiple MenuFactories are registered with the same name, then these will be appended into a single actual menu.- Specified by:
getMenuName
in interfaceMenuFactory
-
populateMenu
Description copied from interface:MenuFactory
This method should populate the menu with menu items. Reference can be made to the frame in order to get Actions.- Specified by:
populateMenu
in interfaceMenuFactory
-
getPreferredAlignment
public int getPreferredAlignment()Description copied from interface:MenuFactory
Returns the preferred alignment of the menu in the menu bar. This should be one of MenuFactory.LEFT, MenuFactory.CENTER or MenuFactory.RIGHT.- Specified by:
getPreferredAlignment
in interfaceMenuFactory
- Returns:
- the alignment
-