|
WUI : API |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.westofj.wui.Widget org.westofj.wui.WAbstractButton org.westofj.wui.WMenuElement org.westofj.wui.WMenu
A menu groups menu elements into a hierarchical tree.
Constructor Summary | |
WMenu()
Constructs an empty menu. |
|
WMenu(String text)
Constructs an empty menu with the specified label. |
|
WMenu(WDisplayable text)
Constructs an empty menu with the specified label. |
Method Summary | |
void |
add(WMenuElement element)
Adds a menu element to the menu. |
WMenuElement |
getElement(int position)
Returns the menu element at the specified position. |
int |
getElementCount()
Returns the number of elements contained within this menu element. |
List |
getSubElements()
Returns the sub-menu elements of this menu element. |
void |
insert(WMenuElement element,
int position)
Inserts the specified menu element into the menu at the specified position. |
Methods inherited from class org.westofj.wui.WMenuElement |
render, renderModifier |
Methods inherited from class org.westofj.wui.WAbstractButton |
addActionListener, getActionCommand, getText, getText, handleParams, hasActionListeners, isEnabled, press, removeActionListener, setActionCommand, setEnabled, setText, setText |
Methods inherited from class org.westofj.wui.Widget |
addChangeListener, getRunner, handleNoParams, hasChangeListeners, removeChangeListener, stateChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WMenu()
public WMenu(String text)
text
- the label of the menu.public WMenu(WDisplayable text)
text
- the label of the menu.Method Detail |
public void add(WMenuElement element)
element
- the menu element to add to the menu.public WMenuElement getElement(int position)
position
- the position of the menu element.
public int getElementCount()
WMenuElement
getElementCount
in class WMenuElement
public List getSubElements()
WMenuElement
getSubElements
in class WMenuElement
public void insert(WMenuElement element, int position)
element
- the menu element to add to the menu.position
- the position to place the menu element at within the menu.
|
Copyright (c) 2003 West of J - All rights reserved. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |