|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.glaivestone.mv.swing.AbstractListHolder | +--com.glaivestone.mv.swing.ListHolder
A list holder is a value holder model which manages both the data model and the selection model for a list of values.
Field Summary |
Fields inherited from class com.glaivestone.mv.swing.AbstractListHolder |
DEFAULT_SELECTION_MODE, MULTI_SELECT_MODE, NOT_FOUND_INDEX, SINGLE_SELECT_MODE |
Constructor Summary | |
ListHolder()
Create a new single-select mode list holder with an empty data model |
|
ListHolder(javax.swing.DefaultListModel dataModel,
javax.swing.ListSelectionModel selectionModel)
Create a new list holder with the specified data and selection models. |
|
ListHolder(int selectionMode)
Create a new list holder with an empty data model which is configured for the specified selection mode. |
Method Summary | |
boolean |
contains(java.lang.Object aValue)
Answer whether the specified value is contained in the list. |
static javax.swing.DefaultListModel |
createDefaultDataModel()
Create a new instance of the default list data model. |
java.lang.Object |
get(int index)
Answer the value at the specified position in the list. |
javax.swing.DefaultListModel |
getConcreteDataModel()
Answer a correctly-typed reference to the concrete data model. |
javax.swing.ListModel |
getDataModel()
Answer the data model which holds the list elements. |
int |
indexOf(java.lang.Object aValue)
Answer the index of the specified value in the list. |
void |
setData(java.util.List values)
Set the contents of the list. |
int |
size()
Answer the number of elements in the list. |
Methods inherited from class com.glaivestone.mv.swing.AbstractListHolder |
add, addAll, clear, clearSelection, createDefaultSelectionModel, createDefaultSelectionModel, getSelectedIndex, getSelectedValue, getSelectedValues, getSelectionModel, getSelectionSize, getValues, hasSelection, isMultiSelect, isSingleSelect, remove, remove, selectAll, selectIndex, selectIndex, selectIndices, selectIndices, selectValue, selectValue, selectValues, selectValues, setMultiSelect, setSingleSelect |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ListHolder()
public ListHolder(int selectionMode)
public ListHolder(javax.swing.DefaultListModel dataModel, javax.swing.ListSelectionModel selectionModel)
Method Detail |
public static javax.swing.DefaultListModel createDefaultDataModel()
public boolean contains(java.lang.Object aValue)
contains
in class AbstractListHolder
public java.lang.Object get(int index)
get
in class AbstractListHolder
java.lang.IndexOutOfBoundsException
- if the index is out of range (index
< 0 || index >= size()).public javax.swing.DefaultListModel getConcreteDataModel()
public javax.swing.ListModel getDataModel()
public int indexOf(java.lang.Object aValue)
indexOf
in class AbstractListHolder
public void setData(java.util.List values)
public int size()
size
in class AbstractListHolder
|
GFL 1.1 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |