|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bbn.openmap.MapHandlerChild | +--com.bbn.openmap.OMComponent | +--com.bbn.openmap.gui.menu.MenuList
The MenuList is a component that creates a set of JMenus from Properties, and can provide a JMenuBar or JMenu with those JMenus. Used by the MapPanel.
The MenuList can be used in lieu of defining the OpenMap MenuBar and each Menu in the openmap.components property. The MenuList can be defined instead, with the menus it should create. It has one property:
menulist.menus=menu1 menu2 menu3 menu1.class=classname of menu1 menu2.class=classname of menu2 menu3.class=classname of menu3When the MenuList.setBeanContext() method gets called, the MenuList will add its menus to that MapHandler/BeanContext. By default, the MenuList will provide an OpenMap MenuBar when asked for a JMenuBar, which will figure out if one of the child menus is a HelpMenu and place it at the end of the MenuBar menus.
Field Summary | |
protected javax.swing.JMenu |
menu
|
protected MenuBar |
menuBar
|
protected java.util.LinkedList |
menus
|
static java.lang.String |
MenusProperty
|
Fields inherited from class com.bbn.openmap.OMComponent |
i18n, propertyPrefix |
Fields inherited from class com.bbn.openmap.MapHandlerChild |
beanContextChildSupport |
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Constructor Summary | |
MenuList()
Create an empty MenuList. |
Method Summary | |
javax.swing.JMenu |
getMenu()
Get a JMenu with JMenus on it as sub-menus. |
javax.swing.JMenuBar |
getMenuBar()
Get a MenuBar with JMenus on it. |
java.util.Properties |
getProperties(java.util.Properties props)
PropertyConsumer interface method. |
java.util.Properties |
getPropertyInfo(java.util.Properties props)
PropertyConsumer interface method. |
void |
setBeanContext(java.beans.beancontext.BeanContext bc)
Called when the MenuList is added to the MapHandler/BeanContext. |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
The MenuList will look for the "menus" property and build its menus. |
Methods inherited from class com.bbn.openmap.OMComponent |
getPropertyPrefix, setProperties, setPropertyPrefix |
Methods inherited from class com.bbn.openmap.MapHandlerChild |
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener |
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 MenusProperty
protected java.util.LinkedList menus
protected MenuBar menuBar
protected javax.swing.JMenu menu
Constructor Detail |
public MenuList()
Method Detail |
public javax.swing.JMenuBar getMenuBar()
public javax.swing.JMenu getMenu()
public void setProperties(java.lang.String prefix, java.util.Properties props)
setProperties
in interface PropertyConsumer
setProperties
in class OMComponent
prefix
- the token to prefix the property namesprops
- the Properties
objectpublic java.util.Properties getProperties(java.util.Properties props)
getProperties
in interface PropertyConsumer
getProperties
in class OMComponent
props
- a Properties object to load the PropertyConsumer
properties into. If props equals null, then a new
Properties object should be created.
public java.util.Properties getPropertyInfo(java.util.Properties props)
getPropertyInfo
in interface PropertyConsumer
getPropertyInfo
in class OMComponent
props
- a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.
public void setBeanContext(java.beans.beancontext.BeanContext bc) throws java.beans.PropertyVetoException
setBeanContext
in interface java.beans.beancontext.BeanContextChild
setBeanContext
in class MapHandlerChild
java.beans.PropertyVetoException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |