|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--waba.ui.Control
|
+--extra.ui.Menu
This is a standard palm menu. Use this Menu with MenuBar. A large amaount of code was stolen from List.
| Constructor Summary | |
Menu()
Construct a new empty menu of default size |
|
Menu(String[] items)
Construct a new menu with the given items. |
|
Menu(Vector items)
Construct a new menu |
|
| Method Summary | |
void |
add(String name)
Add a new item to the end of the menu. |
boolean |
calcSizes()
|
void |
drawList(Graphics g)
|
String |
getSelected()
Gets the text of the currently selected item |
int |
getSelectedIndex()
Get the index of the currently selected item |
void |
hide()
Hide the menu |
void |
onEvent(Event event)
Process pen and key events to this component |
void |
onPaint(Graphics g)
Called to draw the control. |
void |
setSelectedIndex(int i)
Sets the currently selected index |
void |
show(int x)
Show this menu up |
| Methods inherited from class waba.ui.Control |
addTimer, contains, createGraphics, getFontMetrics, getNext, getParent, getRect, postEvent, removeTimer, repaint, setRect |
| Methods inherited from class java.lang.Object |
equals, hashCode, toString |
| Constructor Detail |
public Menu()
public Menu(Vector items)
options - an array of the items availablepublic Menu(String[] items)
options - an array of the menu items available| Method Detail |
public void add(String name)
name - the item to addpublic String getSelected()
public int getSelectedIndex()
public void setSelectedIndex(int i)
i - the index of the item to selectpublic boolean calcSizes()
public void onPaint(Graphics g)
ControlonPaint in class Controlwaba.ui.Controlg - the graphics object for drawingGraphicspublic void drawList(Graphics g)
public void show(int x)
x - the x-position to start the menupublic void hide()
public void onEvent(Event event)
onEvent in class Controlevent - the event to process
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||