|
||||||||||
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
public class 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 java.util.List<javax.swing.JMenu> |
menuList
|
static java.lang.String |
MenuNameProperty
|
static java.lang.String |
MenusProperty
|
protected java.lang.String |
name
|
Fields inherited from class com.bbn.openmap.OMComponent |
---|
i18n, propertyPrefix |
Fields inherited from class com.bbn.openmap.MapHandlerChild |
---|
beanContextChildSupport, isolated |
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Constructor Summary | |
---|---|
MenuList()
Create an empty MenuList. |
Method Summary | |
---|---|
void |
add(javax.swing.JMenu menu)
|
void |
findAndInit(java.lang.Object obj)
The findAndInit method has been made non-abstract, because it now calls this method for every object that is in the iterator it receives. |
void |
findAndUndo(java.lang.Object obj)
The childrenRemoved has been changed to go through its iterator to call this method with every object. |
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.lang.String |
getName()
|
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 |
setName(java.lang.String name)
|
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, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setIsolated |
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
public static final java.lang.String MenuNameProperty
protected java.util.List<javax.swing.JMenu> menuList
protected java.lang.String name
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
public void findAndInit(java.lang.Object obj)
MapHandlerChild
findAndInit
in interface LightMapHandlerChild
findAndInit
in class MapHandlerChild
public void findAndUndo(java.lang.Object obj)
MapHandlerChild
findAndUndo
in interface LightMapHandlerChild
findAndUndo
in class MapHandlerChild
public void add(javax.swing.JMenu menu)
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |