|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--jv.objectGui.PsMethodMenu
|
+--jv.project.PgGeometry_Menu
Add specific menu items to 'method' menu in control panel to invoke methods from menu.
For example, each geometry may have a menu class derived PgGeometry_Menu
which adds additional menu items and sub menus. When the geometry is the current geometry in the
viewer, then its set of method menus is added to the menu bar of the control window.
Each geometry may add a set of menu items to submenus of the 'method' menu.
Usage:
In the init() method add new menu entries as follows:
addMenu("Menu-Name");
addMenuItem("Menu-Name", "Menu-Item-Name");
The submenu is created if it does not exist.
Catch menu events in the applyMethod(String name) using:
if (name.equals("Menu-Item-Name"))
// invoke method related with "Menu-Item-Name".
PsMethodMenu, Serialized Form| Field Summary | |
static java.lang.String[] |
m_geometryMethod
|
static int |
MTHD_PRINT_ALL
|
static int |
MTHD_UPDATE
|
| Constructor Summary | |
PgGeometry_Menu()
|
|
| Method Summary | |
boolean |
applyMethod(java.lang.String aMethod)
Invoke action determined by current string. |
void |
init(PsObject anObject)
Register the target geometry, and subclasses should register all menu items and submenus. |
| Methods inherited from class jv.objectGui.PsMethodMenu |
actionPerformed, addMenu, addMenu, addMenuItem, addMenuItem, clone, getFather, getIndexOfMethod, getLanguage, getMenu, getMenuItem, getName, hasMenu, hasMenuItem, itemStateChanged, removeMenu, removeMenuItem, setName, setParent, update |
| Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jv.object.PsUpdateIf |
getFather, getName, setParent, update |
| Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
| Field Detail |
public static final int MTHD_UPDATE
public static final int MTHD_PRINT_ALL
public static final java.lang.String[] m_geometryMethod
| Constructor Detail |
public PgGeometry_Menu()
| Method Detail |
public void init(PsObject anObject)
PsMethodMenuinit in class PsMethodMenujv.objectGui.PsMethodMenuargument - used by subclasses to specify object on which action shall be executed.public boolean applyMethod(java.lang.String aMethod)
PsMethodMenufalse, and should be overwritten by subclasses.applyMethod in class PsMethodMenu
|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||