|
NextApp Echo2 Extras v2.1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo2.extras.app.menu.DefaultMenuModel
public class DefaultMenuModel
Default MenuModel
implementation.
Provides capabilities to add and remove menu items.
Constructor Summary | |
---|---|
DefaultMenuModel()
Creates a new DefaultMenuModel . |
|
DefaultMenuModel(java.lang.String id,
java.lang.String text)
Creates a new DefaultMenuModel with the specified title
text. |
|
DefaultMenuModel(java.lang.String id,
java.lang.String text,
nextapp.echo2.app.ImageReference icon)
Creates a new DefaultMenuModel with the specified title
text and icon |
Method Summary | |
---|---|
void |
addItem(ItemModel item)
Adds an ItemModel to the end of the menu. |
void |
addItem(ItemModel item,
int index)
Adds an ItemModel to the menu at the specified index |
nextapp.echo2.app.ImageReference |
getIcon()
Returns the icon of the menu. |
java.lang.String |
getId()
Returns the id of the OptionModel . |
ItemModel |
getItem(int itemIndex)
Retrieves the ItemModel contained in this menu at the
specified index. |
int |
getItemCount()
Returns the number of items in the menu. |
java.lang.String |
getText()
Returns the text of the menu. |
void |
removeItem(ItemModel item)
REmoves an ItemModel from the menu |
void |
setIcon(nextapp.echo2.app.ImageReference newValue)
Sets the title icon of the menu |
void |
setText(java.lang.String newValue)
Sets the title text of the menu |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultMenuModel()
DefaultMenuModel
.
public DefaultMenuModel(java.lang.String id, java.lang.String text)
DefaultMenuModel
with the specified title
text.
id
- the menu identifiertext
- the title textpublic DefaultMenuModel(java.lang.String id, java.lang.String text, nextapp.echo2.app.ImageReference icon)
DefaultMenuModel
with the specified title
text and icon
id
- the menu identifiertext
- the title texticon
- the title iconMethod Detail |
---|
public void addItem(ItemModel item)
ItemModel
to the end of the menu.
item
- the ItemModel
to addpublic void addItem(ItemModel item, int index)
ItemModel
to the menu at the specified index
item
- the ItemModel
to addindex
- the index at which to insert it within the menupublic nextapp.echo2.app.ImageReference getIcon()
MenuModel
getIcon
in interface MenuModel
MenuModel.getIcon()
public java.lang.String getId()
ItemModel
OptionModel
.
The id will be used as the actionCommand
of
ActionEvent
s fired by a menu when the option
is selected.
getId
in interface ItemModel
ItemModel.getId()
public ItemModel getItem(int itemIndex)
MenuModel
ItemModel
contained in this menu at the
specified index.
getItem
in interface MenuModel
itemIndex
- the index of the item to retrieve
MenuModel.getItem(int)
public int getItemCount()
MenuModel
getItemCount
in interface MenuModel
MenuModel.getItemCount()
public java.lang.String getText()
MenuModel
getText
in interface MenuModel
MenuModel.getText()
public void removeItem(ItemModel item)
ItemModel
from the menu
item
- the ItemModel
to removepublic void setIcon(nextapp.echo2.app.ImageReference newValue)
newValue
- the new title iconpublic void setText(java.lang.String newValue)
newValue
- the new title text
|
NextApp Echo2 Extras v2.1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |