moka.x
Class MenuBar

java.lang.Object
  extended bymoka.lang.Object
      extended bymoka.event.EventListener
          extended bymoka.x.Component
              extended bymoka.x.Container
                  extended bymoka.x.MenuBar

public class MenuBar
extends Container

The MenuBar class represents a menu bar bound to a frame. In order to associate the menu bar with a Frame object, call the frame's setMenuBar method.

Since:
MDK2.1

Field Summary
 
Fields inherited from class moka.x.Container
child, tail
 
Fields inherited from class moka.x.Component
enabled, height, listen, mnemonic, next, parent, prev, visible, width, x, y
 
Constructor Summary
MenuBar()
          Constructs a newly allocated MenuBar.
 
Method Summary
 void add(Menu m)
          Adds the specified Menu to this MenuBar.
 void paintForeground()
          Paints the foreground of the MenuBar.
 void remove(Menu m)
          Removes the specified Menu from this MenuBar.
 void update()
          Updates the disposition of the Menus on the Menubar.
 
Methods inherited from class moka.x.Container
add, checkMnemonic, clean, empty, onPaint, onRefresh, paintChildren, remove, repaintChildren, toFront, use
 
Methods inherited from class moka.x.Component
bottom, center, eventTriggered, finalize, isCursorOver, left, move, paint, right, setBounds, setEnabled, setHeight, setMnemonic, setVisible, setWidth, setX, setY, top
 
Methods inherited from class moka.event.EventListener
eventTriggered
 
Methods inherited from class moka.lang.Object
equals, getClassName, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MenuBar

public MenuBar()
Constructs a newly allocated MenuBar.

Method Detail

paintForeground

public void paintForeground()
Paints the foreground of the MenuBar.

Overrides:
paintForeground in class Container

add

public void add(Menu m)
Adds the specified Menu to this MenuBar.

Parameters:
m - the Menu to add to this MenuBar.

update

public void update()
Updates the disposition of the Menus on the Menubar.


remove

public void remove(Menu m)
Removes the specified Menu from this MenuBar.

Parameters:
m - the Menu to remove from this MenuBar