jcontrol.ui.vole.menu
Class MenuBar

java.lang.Object
  |
  +--jcontrol.ui.vole.Component
        |
        +--jcontrol.ui.vole.menu.Menu
              |
              +--jcontrol.ui.vole.menu.MenuBar
All Implemented Interfaces:
MenuInterface

public class MenuBar
extends Menu

The class MenuBar implements a simple menu bar.

(C) DOMOLOGIC Home Automation GmbH 2003

Version:
1.0
Author:
Marcus Timmermann

Field Summary
static int BOTTOM
           
static int TOP
           
 
Fields inherited from class jcontrol.ui.vole.menu.Menu
activeIndex, inactives, items, listener, oldActiveIndex
 
Fields inherited from class jcontrol.ui.vole.Component
focusOwner, font, g, height, parent, visible, width, x, y
 
Constructor Summary
MenuBar(int x, int y, int width, int height, int position)
          Constructor for MenuBar.
 
Method Summary
 boolean onKeyEvent(KeyEvent e)
          If a KeyEvent accurs, this method is called.
protected  void paint(boolean all)
           
 void setFont(jcontrol.io.Resource font)
          Set the font for this component.
 
Methods inherited from class jcontrol.ui.vole.menu.Menu
addMenuItem, addMenuItem, enableMenuItem, getActiveItemCount, getSelectedIndex, hasNextOrPrev, isMenuItemEnabled, paint, remove, removeMenuItem, select, select, selectNextOrPrev, setActionListener, setParent
 
Methods inherited from class jcontrol.ui.vole.Component
getBounds, getParent, isVisible, onActionEvent, removeFocus, requestFocus, setBounds, setGraphics, setLocation, setVisible, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, notifyAll, wait
 
Methods inherited from interface jcontrol.ui.vole.menu.MenuInterface
setGraphics
 

Field Detail

BOTTOM

public static final int BOTTOM
See Also:
Constant Field Values

TOP

public static final int TOP
See Also:
Constant Field Values
Constructor Detail

MenuBar

public MenuBar(int x,
               int y,
               int width,
               int height,
               int position)
Constructor for MenuBar.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width
height - the height
position - TOP or BOTTOM
Method Detail

onKeyEvent

public boolean onKeyEvent(KeyEvent e)
If a KeyEvent accurs, this method is called.

Specified by:
onKeyEvent in interface MenuInterface
Overrides:
onKeyEvent in class Menu
Parameters:
e - the KeyEvent.
Returns:
false if the KeyEvent was consumed, true otherwise.

paint

protected void paint(boolean all)
Specified by:
paint in class Menu
See Also:
Menu.paint(boolean)

setFont

public void setFont(jcontrol.io.Resource font)
Set the font for this component.

Overrides:
setFont in class Component
Parameters:
font - The new font.