ListDataModel is a convenience implementation of
DataModel that wraps an List of Java objects.
| Access | Constructor and Description |
|---|---|
| public | |
| public | ListDataModel(List<E>
List to be wrapped (if any) list)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
Data collection to be wrapped, or data)null to
detach from any previous data collectionImplements abstract javax. Set the object representing the data collection wrapped by this
|
| ListDataModel | back to summary |
|---|---|
| public ListDataModel() Construct a new | |
| ListDataModel | back to summary |
|---|---|
| public ListDataModel(List<E> list) 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. Doc from javax. Set the object representing the data collection wrapped by this
If
| |