jcontrol.ui.vole.menu
Class TextMenu
java.lang.Object
|
+--jcontrol.ui.vole.Component
|
+--jcontrol.ui.vole.menu.Menu
|
+--jcontrol.ui.vole.menu.TextMenu
- All Implemented Interfaces:
- MenuInterface
- public class TextMenu
- extends Menu
The class TextMenu
implements a simple graphical text-based
scrolling menu.
(C) DOMOLOGIC Home Automation GmbH 2003
- Version:
- 1.0
- Author:
- Marcus Timmermann
Constructor Summary |
TextMenu(int x,
int y,
int width,
int height)
Constructor for TextMenu. |
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 TextMenu. |
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 |
TextMenu
public TextMenu(int x,
int y,
int width,
int height)
- Constructor for TextMenu.
- Parameters:
x
- the menu's x positiony
- the menu's y positionwidth
- the widthheight
- the height
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 TextMenu.
- Overrides:
setFont
in class Component
- Parameters:
font
- The new font.