NextApp Echo2
v2.1.0

nextapp.echo2.app.list
Class DefaultListModel

java.lang.Object
  extended by nextapp.echo2.app.list.AbstractListModel
      extended by nextapp.echo2.app.list.DefaultListModel
All Implemented Interfaces:
java.io.Serializable, ListModel

public class DefaultListModel
extends AbstractListModel

Default ListModel implementation.

See Also:
Serialized Form

Constructor Summary
DefaultListModel()
          Creates a new DefaultSelectListModel with the given content.
DefaultListModel(java.lang.Object[] itemArray)
          Creates a new DefaultSelectListModel containing the specified items
 
Method Summary
 void add(int index, java.lang.Object item)
          Inserts an item at the specified index.
 void add(java.lang.Object item)
          Adds an item at the end of the model.
 java.lang.Object get(int index)
          Returns the item at the specified index in the list.
 int indexOf(java.lang.Object item)
          Returns the index of the specified item.
 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.
 void removeAll()
          Removes all items from the model.
 int size()
          Returns the length of the list.
 
Methods inherited from class nextapp.echo2.app.list.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getEventListenerList, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultListModel

public DefaultListModel()
Creates a new DefaultSelectListModel with the given content.


DefaultListModel

public DefaultListModel(java.lang.Object[] itemArray)
Creates a new DefaultSelectListModel containing the specified items

Parameters:
itemArray - the initial items
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 at the specified index.

Parameters:
item - the item
index - the index

get

public java.lang.Object get(int index)
Returns the item at the specified index in the list.

Parameters:
index -
Returns:
the item

indexOf

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

Parameters:
item - the item
Returns:
the index

remove

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

Parameters:
index - the index

remove

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

Parameters:
item - the item

removeAll

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


size

public int size()
Returns the length of the list.

Returns:
the length

NextApp Echo2
v2.1.0