NextApp Echo2 Extras
v2.1.0

nextapp.echo2.extras.app.menu
Class AbstractMenuComponent

java.lang.Object
  extended by nextapp.echo2.app.Component
      extended by nextapp.echo2.extras.app.menu.AbstractMenuComponent
All Implemented Interfaces:
java.io.Serializable, nextapp.echo2.app.RenderIdSupport
Direct Known Subclasses:
DropDownMenu, MenuBarPane

public abstract class AbstractMenuComponent
extends nextapp.echo2.app.Component

See Also:
Serialized Form

Field Summary
static java.lang.String INPUT_SELECT
           
static java.lang.String MODEL_CHANGED_PROPERTY
           
static java.lang.String STATE_MODEL_CHANGED_PROPERTY
           
 
Fields inherited from class nextapp.echo2.app.Component
CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
AbstractMenuComponent(MenuModel model, MenuStateModel stateModel)
          Creates a new AbstractMenuComponent displaying the specified MenuModel and using the specified MenuStateModel to provide state information.
 
Method Summary
 void addActionListener(nextapp.echo2.app.event.ActionListener l)
          Adds an ActionListener to be notified when a menu item is selected.
 void doAction(OptionModel optionModel)
          Programmatically performs a menu action.
 MenuModel getModel()
          Returns the model
 MenuStateModel getStateModel()
          Returns the selection model
 void processInput(java.lang.String name, java.lang.Object value)
           
 void removeActionListener(nextapp.echo2.app.event.ActionListener l)
          Removes an ActionListener from being notified when a menu item is selected.
 void setModel(MenuModel newValue)
          Sets the model.
 void setStateModel(MenuStateModel newValue)
          Sets the selection model.
 
Methods inherited from class nextapp.echo2.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPUT_SELECT

public static final java.lang.String INPUT_SELECT
See Also:
Constant Field Values

MODEL_CHANGED_PROPERTY

public static final java.lang.String MODEL_CHANGED_PROPERTY
See Also:
Constant Field Values

STATE_MODEL_CHANGED_PROPERTY

public static final java.lang.String STATE_MODEL_CHANGED_PROPERTY
See Also:
Constant Field Values
Constructor Detail

AbstractMenuComponent

public AbstractMenuComponent(MenuModel model,
                             MenuStateModel stateModel)
Creates a new AbstractMenuComponent displaying the specified MenuModel and using the specified MenuStateModel to provide state information.

Parameters:
model - the model
stateModel - the selection model
Method Detail

addActionListener

public void addActionListener(nextapp.echo2.app.event.ActionListener l)
Adds an ActionListener to be notified when a menu item is selected.

Parameters:
l - the listener to add

doAction

public void doAction(OptionModel optionModel)
Programmatically performs a menu action.

Parameters:
optionModel - the OptionModel whose action is to be invoked

getModel

public MenuModel getModel()
Returns the model

Returns:
the model

getStateModel

public MenuStateModel getStateModel()
Returns the selection model

Returns:
the selection model

processInput

public void processInput(java.lang.String name,
                         java.lang.Object value)
Overrides:
processInput in class nextapp.echo2.app.Component
See Also:
Component.processInput(java.lang.String, java.lang.Object)

removeActionListener

public void removeActionListener(nextapp.echo2.app.event.ActionListener l)
Removes an ActionListener from being notified when a menu item is selected.

Parameters:
l - the listener to remove

setModel

public void setModel(MenuModel newValue)
Sets the model.

Parameters:
newValue - the new model

setStateModel

public void setStateModel(MenuStateModel newValue)
Sets the selection model.

Parameters:
newValue - the new selection model

NextApp Echo2 Extras
v2.1.0