com.fruitioninc.jwc
Class ThreadLocalListBoxModel
java.lang.Object
|
+--com.fruitioninc.jwc.AbstractModel
|
+--com.fruitioninc.jwc.AbstractListBoxModel
|
+--com.fruitioninc.jwc.ThreadLocalListBoxModel
- All Implemented Interfaces:
- ListBoxModel, Model
- public class ThreadLocalListBoxModel
- extends AbstractListBoxModel
A list box model that stores it's state in thread local storage.
Note that only the selected indices are stored in thread local storage.
The elements are stored in membor variables and thus are global to all threads and requests.
Method Summary |
protected java.lang.Object[] |
_getElements()
Returns the elements in this list box. |
protected void |
_setElements(java.lang.Object[] elements)
Sets the elements in this list box. |
int[] |
getSelectedIndices()
Returns the indices of the elements are are selected. |
void |
setSelectedIndices(int[] indices)
Sets the indices of the elements are are selected. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_SELECTED_INDICES
public static final java.lang.String PROPERTY_SELECTED_INDICES
- See Also:
- Constant Field Values
ThreadLocalListBoxModel
public ThreadLocalListBoxModel(Component component)
ThreadLocalListBoxModel
public ThreadLocalListBoxModel(Component component,
java.lang.Object[] elements)
getSelectedIndices
public int[] getSelectedIndices()
- Description copied from class:
AbstractListBoxModel
- Returns the indices of the elements are are selected.
- Specified by:
getSelectedIndices
in interface ListBoxModel
- Specified by:
getSelectedIndices
in class AbstractListBoxModel
setSelectedIndices
public void setSelectedIndices(int[] indices)
- Description copied from class:
AbstractListBoxModel
- Sets the indices of the elements are are selected.
- Specified by:
setSelectedIndices
in interface ListBoxModel
- Specified by:
setSelectedIndices
in class AbstractListBoxModel
_getElements
protected java.lang.Object[] _getElements()
- Description copied from class:
AbstractListBoxModel
- Returns the elements in this list box.
- Specified by:
_getElements
in class AbstractListBoxModel
_setElements
protected void _setElements(java.lang.Object[] elements)
- Description copied from class:
AbstractListBoxModel
- Sets the elements in this list box.
- Specified by:
_setElements
in class AbstractListBoxModel