NextApp Echo
1.0.5

nextapp.echo
Class DefaultSelectFieldModel

java.lang.Object
  extended bynextapp.echo.AbstractListModel
      extended bynextapp.echo.AbstractSelectFieldModel
          extended bynextapp.echo.DefaultSelectFieldModel
All Implemented Interfaces:
ListModel, SelectFieldModel, java.io.Serializable

public class DefaultSelectFieldModel
extends AbstractSelectFieldModel

The default implementation of SelectFieldModel, the model used for SelectFields.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class nextapp.echo.AbstractListModel
listenerList
 
Constructor Summary
DefaultSelectFieldModel()
          Creates a empty new DefaultSelectFieldModel.
DefaultSelectFieldModel(java.lang.Object[] itemArray)
          Creates a new DefaultSelectFieldModel that contains an array of items.
 
Method Summary
 void add(int index, java.lang.Object item)
          Inserts an item into the model at the specified index.
 void add(java.lang.Object item)
          Adds an item at the end of the model.
 void clear()
          Removes all items from the model.
 java.lang.Object get(int index)
          Returns the element at the specified index.
 int indexOf(java.lang.Object item)
          Returns the index of the specified item within the model.
 void remove(int index)
          Removes the item at the specified index from the model.
 void remove(java.lang.Object item)
          Removes the specified item from the model.
 int size()
          Returns the number of items in the model.
 
Methods inherited from class nextapp.echo.AbstractSelectFieldModel
getSelectedItem, setSelectedItem
 
Methods inherited from class nextapp.echo.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nextapp.echo.ListModel
addListDataListener, removeListDataListener
 

Constructor Detail

DefaultSelectFieldModel

public DefaultSelectFieldModel()
Creates a empty new DefaultSelectFieldModel.


DefaultSelectFieldModel

public DefaultSelectFieldModel(java.lang.Object[] itemArray)
Creates a new DefaultSelectFieldModel that contains an array of items.

Parameters:
itemArray - An array of the initial items to be displayed in the SelectField.
Method Detail

add

public void add(java.lang.Object item)
Adds an item at the end of the model.

Parameters:
item - The item to add.

add

public void add(int index,
                java.lang.Object item)
Inserts an item into the model at the specified index.

Parameters:
index - The index at which to insert the item.
item - The item to insert.

clear

public void clear()
Removes all items from the model.


get

public java.lang.Object get(int index)
Returns the element at the specified index.

Parameters:
index - The index of the element to return.
Returns:
The element at the specified index.

indexOf

public int indexOf(java.lang.Object item)
Returns the index of the specified item within the model.

Parameters:
item - An item in the model.
Returns:
The index of the item within the model.

remove

public void remove(int index)
Removes the item at the specified index from the model.

Parameters:
index - The index of the item to remove.

remove

public void remove(java.lang.Object item)
Removes the specified item from the model.

Parameters:
item - The item to remove from the model.

size

public int size()
Returns the number of items in the model.

Returns:
The number of items in the model.

NextApp Echo
1.0.5