extra.ui
Class MenuBar

java.lang.Object
  |
  +--waba.ui.Control
        |
        +--extra.ui.MenuBar

public class MenuBar
extends Control

This is a standard palm menu bar.


Constructor Summary
MenuBar()
          Construct a new empty menu bar of default size
MenuBar(Vector menus)
          Construct a new menu bar with the given menus
 
Method Summary
 void add(Menu menu)
          Add a new Menu to the menu bar
 boolean drawList(Graphics g)
           
 Menu getSelected()
          Gets the currently selected Menu
 int getSelectedIndex()
          Get the index of the currently selected Menu
 void hide()
          Hide the bar
 void onEvent(Event event)
          Process pen and key events to this component
 void onPaint(Graphics g)
          Called to draw the control.
 void show()
          Show this menu bar 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

MenuBar

public MenuBar()
Construct a new empty menu bar of default size

MenuBar

public MenuBar(Vector menus)
Construct a new menu bar with the given menus
Parameters:
menus - a vector of Menu
Method Detail

add

public void add(Menu menu)
Add a new Menu to the menu bar
Parameters:
name - the Menu to add

getSelected

public Menu getSelected()
Gets the currently selected Menu

getSelectedIndex

public int getSelectedIndex()
Get the index of the currently selected Menu

onPaint

public void onPaint(Graphics g)
Description copied from class: Control
Called to draw the control. When this method is called, the graphics object passed has been translated into the coordinate system of the control and the area behind the control has already been painted. The background is painted by the top-level window control.
Overrides:
onPaint in class Control
Following copied from class: waba.ui.Control
Parameters:
g - the graphics object for drawing
See Also:
Graphics

drawList

public boolean drawList(Graphics g)

show

public void show()
Show this menu bar up

hide

public void hide()
Hide the bar

onEvent

public void onEvent(Event event)
Process pen and key events to this component
Overrides:
onEvent in class Control
Parameters:
event - the event to process