jcontrol.ui.vole.menu
Class MultiImageMenu

java.lang.Object
  extended by jcontrol.ui.vole.Component
      extended by jcontrol.ui.vole.menu.Menu
          extended by 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) Copyright 2003-2007 DOMOLOGIC GmbH


Field Summary
 
Fields inherited from class jcontrol.ui.vole.menu.Menu
m_inactive, m_items, m_lastSelectedIndex, m_listener, m_repaint, m_selectedIndex
 
Fields inherited from class jcontrol.ui.vole.Component
eventQueue, focusOwner, font, g, height, listener, parent, visible, width, x, y
 
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.
 void paint()
          Repaints the menu.
 
Methods inherited from class jcontrol.ui.vole.menu.Menu
addMenuItem, addMenuItem, enableMenuItem, getActiveItemCount, getSelectedIndex, hasNextOrPrev, isMenuItemEnabled, remove, removeMenuItem, select, select, selectNextOrPrev, setActionListener, setFont, setParent
 
Methods inherited from class jcontrol.ui.vole.Component
getBounds, getParent, isVisible, onActionEvent, removeFocus, requestFocus, setBounds, setGraphics, setVisible, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, getClass, notifyAll, toString, wait
 
Methods inherited from interface jcontrol.ui.vole.menu.MenuInterface
setGraphics
 

Constructor Detail

MultiImageMenu

public MultiImageMenu(int x,
                      int y,
                      int width,
                      int height,
                      int maxVisibleItems)
Constructor for MultiImageMenu.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width
height - the height
maxVisibleItems - the number of visible menu items, images will be clipped to the same size to fit into the menu's bounds.
Method Detail

paint

public void paint()
Repaints the menu.

Specified by:
paint in interface MenuInterface
Specified by:
paint in class Menu
See Also:
Menu.paint()

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.