|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.townleyenterprises.swing.AbstractUIBuilder
This class provides a convenient base class for concrete implementations of the UIBuilder interface.
| Field Summary | |
static java.lang.String |
MAINMENU
this is the property name used to look up the main menu bar description |
| Constructor Summary | |
AbstractUIBuilder(java.util.Map actions)
The constructor takes a map of Action instances which are to be associated with the menu items. |
|
| Method Summary | |
abstract javax.swing.JMenu |
buildMenu(java.lang.String key)
This method builds a given menu based on the appropriate key value. |
javax.swing.JMenuBar |
buildMenuBar()
This method will build a completely initialized menu bar from the input source using the default MANIMENU key. |
abstract javax.swing.JMenuBar |
buildMenuBar(java.lang.String key)
This method will build a completely initialized menu bar from the input source. |
javax.swing.JMenuItem |
buildMenuItem(java.lang.String key)
This method builds a menu item based on the given key. |
protected abstract javax.swing.JMenuItem |
buildMenuItemHelper(java.lang.String key)
This method must be implemented by derived classes. |
javax.swing.Action |
getAction(java.lang.String key)
This method is used to retrieve the action for the specified key in the actions specified in the constructor. |
javax.swing.JMenuItem |
getMenuItem(java.lang.String key)
This method is used to retrieve a menu item instance created by the abstract builder. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String MAINMENU
| Constructor Detail |
public AbstractUIBuilder(java.util.Map actions)
actions - the action map| Method Detail |
public javax.swing.JMenuBar buildMenuBar()
buildMenuBar in interface UIBuilderpublic abstract javax.swing.JMenuBar buildMenuBar(java.lang.String key)
buildMenuBar in interface UIBuilderkey - the menu bar key
public abstract javax.swing.JMenu buildMenu(java.lang.String key)
buildMenu in interface UIBuilderkey - the key for the menu
public final javax.swing.JMenuItem buildMenuItem(java.lang.String key)
UIBuilder
buildMenuItem in interface UIBuilderkey - the key for the menu item
public javax.swing.Action getAction(java.lang.String key)
key - the key of the action
public javax.swing.JMenuItem getMenuItem(java.lang.String key)
key - the key of the menu item to retrieve
protected abstract javax.swing.JMenuItem buildMenuItemHelper(java.lang.String key)
buildMenuItem(java.lang.String)
method, but it is used to ensure that the menu items get
registered.
key - the menu item key
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||