jcontrol.ui.vole.menu
Class MultiImageMenu
java.lang.Object
|
+--jcontrol.ui.vole.Component
|
+--jcontrol.ui.vole.menu.Menu
|
+--jcontrol.ui.vole.menu.MultiImageMenu
- All Implemented Interfaces:
- MenuInterface
- public class MultiImageMenu
- extends Menu
The class MultiImageMenu
implements a menu with
several images. Menu items must be specified as image names.
(C) DOMOLOGIC Home Automation GmbH 2003
- Version:
- 1.0
- Author:
- Marcus Timmermann
Constructor Summary |
MultiImageMenu(int x,
int y,
int width,
int height,
int maxVisibleItems)
Constructor for MultiImageMenu. |
Method Summary |
boolean |
onKeyEvent(KeyEvent e)
If a KeyEvent accurs, this method is called. |
protected void |
paint(boolean all)
Repaints the menu. |
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, setFont, setGraphics, setLocation, setVisible, transferFocus, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, notifyAll, wait |
MultiImageMenu
public MultiImageMenu(int x,
int y,
int width,
int height,
int maxVisibleItems)
- Constructor for MultiImageMenu.
- Parameters:
x
- the x coordinatey
- the y coordinatewidth
- the widthheight
- the heightmaxVisibleItems
- the number of visible menu items, images will be
clipped to the same size to fit into the menu's bounds.
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)
- Repaints the menu.
- Specified by:
paint
in class Menu
- Parameters:
all
- if true, all is repainted, otherwise only if shift has changed