NextApp Echo2 Extras
v2.1.0

nextapp.echo2.extras.app.menu
Class DefaultOptionModel

java.lang.Object
  extended by nextapp.echo2.extras.app.menu.DefaultOptionModel
All Implemented Interfaces:
java.io.Serializable, ItemModel, OptionModel
Direct Known Subclasses:
DefaultToggleOptionModel

public class DefaultOptionModel
extends java.lang.Object
implements OptionModel

A default OptionModel implementation.

See Also:
Serialized Form

Constructor Summary
DefaultOptionModel(java.lang.String id, java.lang.String text, nextapp.echo2.app.ImageReference icon)
          Creates a new DefaultOptionModel.
 
Method Summary
 nextapp.echo2.app.ImageReference getIcon()
          Returns the icon of this menu option.
 java.lang.String getId()
          Returns the id of the OptionModel.
 java.lang.String getText()
          Returns the text of this menu option.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultOptionModel

public DefaultOptionModel(java.lang.String id,
                          java.lang.String text,
                          nextapp.echo2.app.ImageReference icon)
Creates a new DefaultOptionModel.

Parameters:
id - the item id
text - the item text
icon - the item icon
Method Detail

getIcon

public nextapp.echo2.app.ImageReference getIcon()
Description copied from interface: OptionModel
Returns the icon of this menu option. Note that icons may not be displayed on ToggleOptionModels.

Specified by:
getIcon in interface OptionModel
Returns:
the icon
See Also:
OptionModel.getIcon()

getId

public java.lang.String getId()
Description copied from interface: ItemModel
Returns the id of the OptionModel. The id will be used as the actionCommand of ActionEvents fired by a menu when the option is selected.

Specified by:
getId in interface ItemModel
Returns:
the id
See Also:
ItemModel.getId()

getText

public java.lang.String getText()
Description copied from interface: OptionModel
Returns the text of this menu option.

Specified by:
getText in interface OptionModel
Returns:
the text
See Also:
OptionModel.getText()

NextApp Echo2 Extras
v2.1.0