com.fruitioninc.jwc
Class AbstractListBoxModel

java.lang.Object
  |
  +--com.fruitioninc.jwc.AbstractModel
        |
        +--com.fruitioninc.jwc.AbstractListBoxModel
All Implemented Interfaces:
ListBoxModel, Model
Direct Known Subclasses:
DefaultListBoxModel, ThreadLocalListBoxModel

public abstract class AbstractListBoxModel
extends AbstractModel
implements ListBoxModel

Partial implementation of the ListBoxModel interface. Delegates the storage of state to its subclass via the Template Method Pattern.


Constructor Summary
AbstractListBoxModel()
           
AbstractListBoxModel(boolean statefull)
           
AbstractListBoxModel(java.lang.Object[] elements)
           
AbstractListBoxModel(java.lang.Object[] elements, boolean statefull)
           
 
Method Summary
 java.lang.Object _getElementAt(int index)
          Returns the index'th element in this list box.
protected abstract  java.lang.Object[] _getElements()
          Returns the elements in this list box.
 int _getSize()
          Returns the number of elements in this list box.
 void _setElementAt(int index, java.lang.Object value)
          Sets the index'th element in this list box.
protected abstract  void _setElements(java.lang.Object[] elements)
          Sets the elements in this list box.
abstract  int[] getSelectedIndices()
          Returns the indices of the elements are are selected.
abstract  void setSelectedIndices(int[] indices)
          Sets the indices of the elements are are selected.
 
Methods inherited from class com.fruitioninc.jwc.AbstractModel
_getStatefull, _setStatefull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.fruitioninc.jwc.Model
_getStatefull, _setStatefull
 

Constructor Detail

AbstractListBoxModel

public AbstractListBoxModel()

AbstractListBoxModel

public AbstractListBoxModel(boolean statefull)

AbstractListBoxModel

public AbstractListBoxModel(java.lang.Object[] elements)

AbstractListBoxModel

public AbstractListBoxModel(java.lang.Object[] elements,
                            boolean statefull)
Method Detail

_getElementAt

public java.lang.Object _getElementAt(int index)
Returns the index'th element in this list box.

Specified by:
_getElementAt in interface ListBoxModel

_setElementAt

public void _setElementAt(int index,
                          java.lang.Object value)
Sets the index'th element in this list box.

Specified by:
_setElementAt in interface ListBoxModel

_getSize

public int _getSize()
Returns the number of elements in this list box.

Specified by:
_getSize in interface ListBoxModel

getSelectedIndices

public abstract int[] getSelectedIndices()
Returns the indices of the elements are are selected.

Specified by:
getSelectedIndices in interface ListBoxModel

setSelectedIndices

public abstract void setSelectedIndices(int[] indices)
Sets the indices of the elements are are selected.

Specified by:
setSelectedIndices in interface ListBoxModel

_getElements

protected abstract java.lang.Object[] _getElements()
Returns the elements in this list box.


_setElements

protected abstract void _setElements(java.lang.Object[] elements)
Sets the elements in this list box.