NextApp Echo3 Extras
v3.0.b4

nextapp.echo.extras.app.menu
Interface MenuStateModel

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AbstractMenuStateModel, DefaultMenuStateModel

public interface MenuStateModel
extends java.io.Serializable

Representation of the state of a MenuModels, describing the selected and enabled states of all options.


Method Summary
 void addChangeListener(nextapp.echo.app.event.ChangeListener l)
          Registers a ChangeListener to be notified when the selection or enabled state of menu items change.
 boolean isEnabled(java.lang.String id)
          Determines if a specific menu option is enabled.
 boolean isSelected(java.lang.String id)
          Determines if a specific menu option is selected.
 void removeChangeListener(nextapp.echo.app.event.ChangeListener l)
          Unregisters a ChangeListener from being notified when the selection or enabled state of menu items change.
 void setEnabled(java.lang.String id, boolean enabled)
          Sets the enabled state of a specific menu option.
 void setSelected(java.lang.String id, boolean selected)
          Sets the selection state of a specific menu option.
 

Method Detail

addChangeListener

void addChangeListener(nextapp.echo.app.event.ChangeListener l)
Registers a ChangeListener to be notified when the selection or enabled state of menu items change.

Parameters:
l - the listener to add

isEnabled

boolean isEnabled(java.lang.String id)
Determines if a specific menu option is enabled.

Parameters:
id - the id of the menu option
Returns:
true if it is enabled

isSelected

boolean isSelected(java.lang.String id)
Determines if a specific menu option is selected.

Parameters:
id - the id of the menu option
Returns:
true if it is selected

removeChangeListener

void removeChangeListener(nextapp.echo.app.event.ChangeListener l)
Unregisters a ChangeListener from being notified when the selection or enabled state of menu items change.

Parameters:
l - the listener to remove

setEnabled

void setEnabled(java.lang.String id,
                boolean enabled)
Sets the enabled state of a specific menu option.

Parameters:
id - the id of the menu option
enabled - the new enabled state

setSelected

void setSelected(java.lang.String id,
                 boolean selected)
Sets the selection state of a specific menu option.

Parameters:
id - the id of the menu option
selected - the new selection state

NextApp Echo3 Extras
v3.0.b4