|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MenuInterface
This interface is the main interface used by jcontrol.ui.vole.Menu
.
The meaning of this interface is to avoid loading the Menu class into a JControl device
even if no menu is used only because the menu is referenced by jcontrol.ui.vole.Frame
by default.
By referencing this interface instead of the (abstract) menu class, no unnecessary class will be uploaded.
NOTE: Normally, there is no need to implement this interface in any other class but jcontrol.ui.vole.Menu
.
(c) Copyright 2003-2007 DOMOLOGIC GmbH
Method Summary | |
---|---|
int |
addMenuItem(String item)
Adds a menu item to this menu. |
int |
addMenuItem(String item,
int pos)
Adds a menu item to this menu at the specified position. |
void |
enableMenuItem(String item,
boolean onoff)
Changes the active state of a menu item in this menu. |
int |
getActiveItemCount()
Returns the number of active menu items. |
int |
getSelectedIndex()
Returns the index of the selected menu item |
boolean |
isMenuItemEnabled(String item)
Returns the active state of the specified menu item. |
boolean |
onKeyEvent(KeyEvent e)
If a KeyEvent accurs, this method is called. |
void |
paint()
|
void |
remove()
Removes this menu from the screen. |
void |
removeMenuItem(String item)
Removes a menu item from this menu. |
boolean |
select(int index)
Selects the specified menu item. |
boolean |
select(String item)
Selects the specified menu item |
void |
setGraphics(Graphics g)
This method is called to set the main Display context for this component. |
void |
setParent(Container parent)
Sets the parent Frame. |
Method Detail |
---|
void setParent(Container parent)
parent
- the Frame handle this menu.void setGraphics(Graphics g)
g
- the grahics contextboolean onKeyEvent(KeyEvent e)
e
- the KeyEvent.
void paint()
Menu.paint()
int addMenuItem(String item)
item
- the name of the menu item, can even specify an image name
int addMenuItem(String item, int pos)
item
- the name of the menu item, can even specify an image namepos
- the position
void removeMenuItem(String item)
item
- the item to removevoid remove()
int getActiveItemCount()
void enableMenuItem(String item, boolean onoff)
item
- the name to the menu itemonoff
- enable or disableboolean isMenuItemEnabled(String item)
item
- the menu item
int getSelectedIndex()
boolean select(int index)
index
- the index of the item to select
boolean select(String item)
item
- the item to select
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |