NextApp Echo3
v3.0.b4

nextapp.echo.app.list
Class AbstractListComponent

java.lang.Object
  extended by nextapp.echo.app.Component
      extended by nextapp.echo.app.list.AbstractListComponent
All Implemented Interfaces:
java.io.Serializable, RenderIdSupport
Direct Known Subclasses:
ListBox, SelectField

public abstract class AbstractListComponent
extends Component

Abstract base class for selection list components (i.e., SelectFields and ListBoxes).

See Also:
Serialized Form

Field Summary
static java.lang.String ACTION_LISTENERS_CHANGED_PROPERTY
           
static DefaultListCellRenderer DEFAULT_LIST_CELL_RENDERER
           
static java.lang.String INPUT_ACTION
           
static java.lang.String LIST_CELL_RENDERER_CHANGED_PROPERTY
           
static java.lang.String LIST_DATA_CHANGED_PROPERTY
           
static java.lang.String LIST_MODEL_CHANGED_PROPERTY
           
static java.lang.String PROPERTY_ACTION_COMMAND
           
static java.lang.String PROPERTY_BORDER
           
static java.lang.String PROPERTY_DISABLED_BACKGROUND
           
static java.lang.String PROPERTY_DISABLED_BORDER
           
static java.lang.String PROPERTY_DISABLED_FONT
           
static java.lang.String PROPERTY_DISABLED_FOREGROUND
           
static java.lang.String PROPERTY_HEIGHT
           
static java.lang.String PROPERTY_INSETS
           
static java.lang.String PROPERTY_ROLLOVER_BACKGROUND
           
static java.lang.String PROPERTY_ROLLOVER_ENABLED
           
static java.lang.String PROPERTY_ROLLOVER_FONT
           
static java.lang.String PROPERTY_ROLLOVER_FOREGROUND
           
static java.lang.String PROPERTY_TOOL_TIP_TEXT
           
static java.lang.String PROPERTY_WIDTH
           
static java.lang.String SELECTION_CHANGED_PROPERTY
           
static java.lang.String SELECTION_MODEL_CHANGED_PROPERTY
           
 
Fields inherited from class nextapp.echo.app.Component
CHILD_VISIBLE_CHANGED_PROPERTY, 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
AbstractListComponent()
          Creates a new AbstractListComponent with default models.
AbstractListComponent(ListModel model, ListSelectionModel selectionModel)
          Creates a new AbstractListComponent with the specified models.
 
Method Summary
 void addActionListener(ActionListener l)
          Adds an ActionListener to the list component.
 java.lang.String getActionCommand()
          Returns the action command which will be provided in ActionEvents fired by this AbstractListComponent.
 Border getBorder()
          Returns the Border surrounding the list component.
 ListCellRenderer getCellRenderer()
          Returns the ListCellRenderer used to render items.
 Color getDisabledBackground()
          Returns the background color displayed when the component is disabled.
 Border getDisabledBorder()
          Returns the border displayed when the component is disabled.
 Font getDisabledFont()
          Returns the font displayed when the component is disabled.
 Color getDisabledForeground()
          Returns the foreground color displayed when the component is disabled.
 Extent getHeight()
          Returns the height.
 Insets getInsets()
          Returns the inset margin around between the list components border and content.
 ListModel getModel()
          Returns the model.
 Color getRolloverBackground()
          Returns the rollover background.
 Font getRolloverFont()
          Returns the rollover font.
 Color getRolloverForeground()
          Returns the rollover foreground.
 ListSelectionModel getSelectionModel()
          Returns the selection model.
 java.lang.String getToolTipText()
          Returns the tool tip text (displayed when the mouse cursor is hovered over the component).
 Extent getWidth()
          Returns the width.
 boolean hasActionListeners()
          Determines the any ActionListeners are registered.
 boolean isRolloverEnabled()
          Determines if rollover effects are enabled.
 boolean isValidChild(Component child)
          This component does not support children.
 void processInput(java.lang.String inputName, java.lang.Object inputValue)
          Processes client input specific to the Component received from the UpdateManager.
 void removeActionListener(ActionListener l)
          Removes an ActionListener from the list component.
 void setActionCommand(java.lang.String newValue)
          Sets the action command which will be provided in ActionEvents fired by this AbstractListComponent.
 void setBorder(Border newValue)
          Sets the Border surrounding the list component.
 void setCellRenderer(ListCellRenderer newValue)
          Sets the renderer for items.
 void setDisabledBackground(Color newValue)
          Sets the background color displayed when the component is disabled.
 void setDisabledBorder(Border newValue)
          Sets the border displayed when the component is disabled.
 void setDisabledFont(Font newValue)
          Sets the font displayed when the component is disabled.
 void setDisabledForeground(Color newValue)
          Sets the foreground color displayed when the component is disabled.
 void setHeight(Extent newValue)
          Sets the height.
 void setInsets(Insets newValue)
          Sets the inset margin around between the list components border and content.
 void setModel(ListModel newValue)
          Sets the model.
 void setRolloverBackground(Color newValue)
          Sets the rollover background.
 void setRolloverEnabled(boolean newValue)
          Sets whether rollover effects are enabled.
 void setRolloverFont(Font newValue)
          Sets the rollover font.
 void setRolloverForeground(Color newValue)
          Sets the rollover foreground.
 void setSelectionModel(ListSelectionModel newValue)
          Sets the selection model.
 void setToolTipText(java.lang.String newValue)
          Sets the tool tip text (displayed when the mouse cursor is hovered over the component).
 void setWidth(Extent newValue)
          Sets the width.
 
Methods inherited from class nextapp.echo.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, get, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndex, getLayoutData, getLayoutDirection, getLocale, getLocalStyle, getParent, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, set, setBackground, setComponents, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndex, setLayoutData, setLayoutDirection, setLocale, 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_ACTION

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

PROPERTY_ACTION_COMMAND

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

ACTION_LISTENERS_CHANGED_PROPERTY

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

LIST_DATA_CHANGED_PROPERTY

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

LIST_MODEL_CHANGED_PROPERTY

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

LIST_CELL_RENDERER_CHANGED_PROPERTY

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

SELECTION_MODEL_CHANGED_PROPERTY

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

SELECTION_CHANGED_PROPERTY

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

PROPERTY_BORDER

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

PROPERTY_DISABLED_BACKGROUND

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

PROPERTY_DISABLED_BORDER

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

PROPERTY_DISABLED_FONT

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

PROPERTY_DISABLED_FOREGROUND

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

PROPERTY_HEIGHT

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

PROPERTY_INSETS

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

PROPERTY_ROLLOVER_BACKGROUND

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

PROPERTY_ROLLOVER_ENABLED

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

PROPERTY_ROLLOVER_FONT

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

PROPERTY_ROLLOVER_FOREGROUND

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

PROPERTY_TOOL_TIP_TEXT

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

PROPERTY_WIDTH

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

DEFAULT_LIST_CELL_RENDERER

public static final DefaultListCellRenderer DEFAULT_LIST_CELL_RENDERER
Constructor Detail

AbstractListComponent

public AbstractListComponent()
Creates a new AbstractListComponent with default models.


AbstractListComponent

public AbstractListComponent(ListModel model,
                             ListSelectionModel selectionModel)
Creates a new AbstractListComponent with the specified models.

Parameters:
model - the list data model
selectionModel - the selection model
Method Detail

addActionListener

public void addActionListener(ActionListener l)
Adds an ActionListener to the list component. The ActionListener will be invoked when the user selects an item.

Parameters:
l - the ActionListener to add

getActionCommand

public java.lang.String getActionCommand()
Returns the action command which will be provided in ActionEvents fired by this AbstractListComponent.

Returns:
the action command

getBorder

public Border getBorder()
Returns the Border surrounding the list component.

Returns:
the border

getCellRenderer

public ListCellRenderer getCellRenderer()
Returns the ListCellRenderer used to render items.

Returns:
the renderer

getDisabledBackground

public Color getDisabledBackground()
Returns the background color displayed when the component is disabled.

Returns:
the color

getDisabledBorder

public Border getDisabledBorder()
Returns the border displayed when the component is disabled.

Returns:
the border

getDisabledFont

public Font getDisabledFont()
Returns the font displayed when the component is disabled.

Returns:
the font

getDisabledForeground

public Color getDisabledForeground()
Returns the foreground color displayed when the component is disabled.

Returns:
the color

getHeight

public Extent getHeight()
Returns the height. This property only supports Extents with fixed (i.e., not percent) units.

Returns:
the height

getInsets

public Insets getInsets()
Returns the inset margin around between the list components border and content.

Returns:
the inset margin

getModel

public ListModel getModel()
Returns the model.

Returns:
the model

getRolloverBackground

public Color getRolloverBackground()
Returns the rollover background.

Returns:
the rollover background

getRolloverFont

public Font getRolloverFont()
Returns the rollover font.

Returns:
the rollover font

getRolloverForeground

public Color getRolloverForeground()
Returns the rollover foreground.

Returns:
the rollover foreground

getSelectionModel

public ListSelectionModel getSelectionModel()
Returns the selection model.

Returns:
the selection model

getToolTipText

public java.lang.String getToolTipText()
Returns the tool tip text (displayed when the mouse cursor is hovered over the component).

Returns:
the tool tip text

getWidth

public Extent getWidth()
Returns the width. This property supports Extents with fixed or percentile units.

Returns:
the width

hasActionListeners

public boolean hasActionListeners()
Determines the any ActionListeners are registered.

Returns:
true if any action listeners are registered

isRolloverEnabled

public boolean isRolloverEnabled()
Determines if rollover effects are enabled.

Returns:
true if rollover effects are enabled

isValidChild

public boolean isValidChild(Component child)
This component does not support children.

Overrides:
isValidChild in class Component
Parameters:
child - the Component to evaluate as a child
Returns:
true if the Component is a valid child
See Also:
Component.isValidChild(nextapp.echo.app.Component)

processInput

public void processInput(java.lang.String inputName,
                         java.lang.Object inputValue)
Description copied from class: Component
Processes client input specific to the Component received from the UpdateManager. Derivative implementations should take care to invoke super.processInput(). Security note: Because input to this method is likely from a remote client, it should be treated as potentially hostile. All input to this method should be carefully verified. For example, directly invoking set() method with the provided input would constitute a security hole.

Overrides:
processInput in class Component
Parameters:
inputName - the name of the input
inputValue - the value of the input
See Also:
Component.processInput(java.lang.String, java.lang.Object)

removeActionListener

public void removeActionListener(ActionListener l)
Removes an ActionListener from the list component.

Parameters:
l - the ActionListener to remove

setActionCommand

public void setActionCommand(java.lang.String newValue)
Sets the action command which will be provided in ActionEvents fired by this AbstractListComponent.

Parameters:
newValue - the new action command

setBorder

public void setBorder(Border newValue)
Sets the Border surrounding the list component.

Parameters:
newValue - the new Border

setCellRenderer

public void setCellRenderer(ListCellRenderer newValue)
Sets the renderer for items. The renderer may not be null (use DEFAULT_LIST_CELL_RENDERER for default behavior).

Parameters:
newValue - the new renderer

setDisabledBackground

public void setDisabledBackground(Color newValue)
Sets the background color displayed when the component is disabled.

Parameters:
newValue - the new Color

setDisabledBorder

public void setDisabledBorder(Border newValue)
Sets the border displayed when the component is disabled.

Parameters:
newValue - the new border

setDisabledFont

public void setDisabledFont(Font newValue)
Sets the font displayed when the component is disabled.

Parameters:
newValue - the new Font

setDisabledForeground

public void setDisabledForeground(Color newValue)
Sets the foreground color displayed when the component is disabled.

Parameters:
newValue - the new Color

setHeight

public void setHeight(Extent newValue)
Sets the height. This property only supports Extents with fixed (i.e., not percent) units.

Parameters:
newValue - the new height

setInsets

public void setInsets(Insets newValue)
Sets the inset margin around between the list components border and content.

Parameters:
newValue - the new inset margin

setModel

public void setModel(ListModel newValue)
Sets the model. The model may not be null.

Parameters:
newValue - the new model

setRolloverBackground

public void setRolloverBackground(Color newValue)
Sets the rollover background.

Parameters:
newValue - the new rollover background

setRolloverEnabled

public void setRolloverEnabled(boolean newValue)
Sets whether rollover effects are enabled.

Parameters:
newValue - the new rollover enabled state

setRolloverFont

public void setRolloverFont(Font newValue)
Sets the rollover font.

Parameters:
newValue - the new rollover font

setRolloverForeground

public void setRolloverForeground(Color newValue)
Sets the rollover foreground.

Parameters:
newValue - the new rollover foreground

setSelectionModel

public void setSelectionModel(ListSelectionModel newValue)
Sets the selection model. The selection model may not be null.

Parameters:
newValue - the new selection model

setToolTipText

public void setToolTipText(java.lang.String newValue)
Sets the tool tip text (displayed when the mouse cursor is hovered over the component).

Parameters:
newValue - the new tool tip text

setWidth

public void setWidth(Extent newValue)
Sets the width. This property supports Extents with fixed or percentile units.

Parameters:
newValue - the new width

NextApp Echo3
v3.0.b4