CollectionDataModel is a convenience
implementation of DataModel that wraps an Collection of
Java objects.
| Modifier and Type | Field and Description |
|---|---|
| private E[] | |
| private int | |
| private Collection |
| Access | Constructor and Description |
|---|---|
| public | |
| public | CollectionDataModel(Collection<E>
Collection to be wrapped. collection)Construct a new |
| Modifier and Type | Method and Description |
|---|---|
| public int | getRowCount()
Implements abstract javax. If there is |
| public E | getRowData()
Implements abstract javax. If row data is available, return the array element at the index
specified by |
| public int | getRowIndex()
Implements abstract javax. Return the zero-relative index of the currently selected row. |
| public Object | getWrappedData()
Implements abstract javax. Return the object representing the data wrapped by this
|
| public boolean | isRowAvailable()
Implements abstract javax. Return |
| public void | setRowIndex(int
The new zero-relative index (must be non-negative) rowIndex)Implements abstract javax. Set the zero-relative index of the currently selected row, or -1 to indicate that we are not positioned on a row. |
| public void | setWrappedData(Object
the wrapped data. data)Implements abstract javax. |
| arrayFromInner | back to summary |
|---|---|
| private E[] arrayFromInner | |
| index | back to summary |
|---|---|
| private int index | |
| inner | back to summary |
|---|---|
| private Collection<E> inner | |
| CollectionDataModel | back to summary |
|---|---|
| public CollectionDataModel() Construct a new | |
| CollectionDataModel | back to summary |
|---|---|
| public CollectionDataModel(Collection<E> collection) Construct a new
| |
| getRowCount | back to summary |
|---|---|
| public int getRowCount() Implements abstract javax. If there is
| |
| getRowData | back to summary |
|---|---|
| public E getRowData() Implements abstract javax. If row data is available, return the array element at the index
specified by
| |
| getRowIndex | back to summary |
|---|---|
| public int getRowIndex() Implements abstract javax. Doc from javax. Return the zero-relative index of the currently selected row. If
we are not currently positioned on a row, or no
| |
| getWrappedData | back to summary |
|---|---|
| public Object getWrappedData() Implements abstract javax. Doc from javax. Return the object representing the data wrapped by this
| |
| isRowAvailable | back to summary |
|---|---|
| public boolean isRowAvailable() Implements abstract javax. Return
| |
| setRowIndex | back to summary |
|---|---|
| public void setRowIndex(int rowIndex) Implements abstract javax. Doc from javax. Set the zero-relative index of the currently selected row, or -1
to indicate that we are not positioned on a row. It is
possible to set the row index at a value for which the underlying data
collection does not contain any row data. Therefore, callers may
use the If there is no
| |
| setWrappedData | back to summary |
|---|---|
| public void setWrappedData(Object data) Implements abstract javax. Set the wrapped data.
| |