| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MenuItem
Menu item access for the UI.
| Field Summary | |
|---|---|
static int | 
STYLE_CHECK
check box style menu item - data must be of type Boolean  | 
static int | 
STYLE_MENU
menu containing submenu items  | 
static int | 
STYLE_PUSH
normal selection menu, no Data value required  | 
static int | 
STYLE_RADIO
radio style - data must be Boolean  | 
static int | 
STYLE_SEPARATOR
separator line  | 
| Method Summary | |
|---|---|
 void | 
addFillListener(MenuItemFillListener listener)
Adds a listener to be notified when the menu item is about to be displayed.  | 
 void | 
addListener(MenuItemListener l)
Adds a selection listener for this menu item.  | 
 void | 
addMultiListener(MenuItemListener l)
Adds a selection listener for this menu item.  | 
 java.lang.Object | 
getData()
Get the current data value associated with the menu: Boolean for CHECK style  | 
 Graphic | 
getGraphic()
get the menu's graphic  | 
 MenuItem | 
getItem(java.lang.String key_id)
Get the child item with the given resource key.  | 
 MenuItem[] | 
getItems()
Get all child items currently associated with this MenuItem.  | 
 java.lang.String | 
getMenuID()
Retrieve the menu ID that the menu item belongs to  | 
 MenuItem | 
getParent()
Retrieve the parent MenuItem.  | 
 java.lang.String | 
getResourceKey()
Retrieve the resource key ("name") of this menu item  | 
 int | 
getStyle()
Get the type of the menu item  | 
 java.lang.String | 
getText()
Gets the text to display for this menu item.  | 
 boolean | 
isEnabled()
Whether or not this item is enabled or not  | 
 boolean | 
isSelected()
Returns whether the menu item is selected or not.  | 
 boolean | 
isVisible()
Returns whether the menu item is visible or not.  | 
 void | 
remove()
Removes the menu item.  | 
 void | 
removeAllChildItems()
Removes all child menu items from this menu (if any exist).  | 
 void | 
removeFillListener(MenuItemFillListener listener)
 | 
 void | 
removeListener(MenuItemListener l)
Removes a selection listener from this menu item.  | 
 void | 
removeMultiListener(MenuItemListener l)
Removes a selection listener from this menu item.  | 
 void | 
setData(java.lang.Object data)
Set the current data value associated with the menu: Boolean for CHECK style  | 
 void | 
setEnabled(boolean enabled)
Set the enabled status of the menu item  | 
 void | 
setGraphic(Graphic graphic)
set the menu item's icon  | 
 void | 
setStyle(int style)
Set the style of the menu item (see STYLE_ constants)  | 
 void | 
setSubmenuBuilder(MenuBuilder builder)
For STYLE_MENU, builder is called when user wants to see the
 submenu items. | 
 void | 
setText(java.lang.String text)
Sets the text to display for this menu item.  | 
 void | 
setVisible(boolean visible)
Sets whether the menu item is visible or not.  | 
| Field Detail | 
|---|
static final int STYLE_PUSH
static final int STYLE_CHECK
static final int STYLE_RADIO
static final int STYLE_SEPARATOR
static final int STYLE_MENU
| Method Detail | 
|---|
java.lang.String getResourceKey()
int getStyle()
void setStyle(int style)
style - java.lang.Object getData()
void setData(java.lang.Object data)
data - boolean isEnabled()
void setEnabled(boolean enabled)
enabled - void setGraphic(Graphic graphic)
graphic - Graphic getGraphic()
void addFillListener(MenuItemFillListener listener)
listener - void removeFillListener(MenuItemFillListener listener)
void setSubmenuBuilder(MenuBuilder builder)
STYLE_MENU, builder is called when user wants to see the
 submenu items.  Setting a builder will force clear all submenu items.
void addMultiListener(MenuItemListener l)
addListener(MenuItemListener), in that the
 target object which will be passed to the listener will be an
 array of objects, rather than just a single object.
l - listener to be notified when user has selected the menu item.void removeMultiListener(MenuItemListener l)
addMultiListener(MenuItemListener).
l - listener to removevoid addListener(MenuItemListener l)
l - listener to be notified when user has selected the menu item.void removeListener(MenuItemListener l)
l - listener to removeMenuItem getParent()
MenuItem[] getItems()
MenuItem getItem(java.lang.String key_id)
java.lang.String getText()
void setText(java.lang.String text)
java.lang.String getMenuID()
MenuManager.MENU_ constant.void remove()
void removeAllChildItems()
void setVisible(boolean visible)
boolean isVisible()
boolean isSelected()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||