public class ManySelectionTrackingListDataModel extends SerializableListDataModel implements SelectionAware
DataModel
implementation that tracks the currently selected rows, allowing any number of rows to be
selected at one time.Constructor and Description |
---|
ManySelectionTrackingListDataModel() |
ManySelectionTrackingListDataModel(java.util.List list) |
Modifier and Type | Method and Description |
---|---|
java.util.List |
getSelections()
Returns the list of selected row data objects for the model.
|
boolean |
isCurrentRowSelected()
Checks whether the row pointed to by the model's current index is selected.
|
void |
select(java.lang.Object rowData)
Selects the given row data object in the model.
|
void |
selectAll()
Selects all row data objects in the model.
|
void |
setCurrentRowSelected(boolean rowSelected)
Sets whether the row pointed to by the model's current index is selected
|
void |
setSelections(java.util.List selections)
Sets the list of selected row data objects for the model.
|
getRowCount, getRowData, getRowIndex, getWrappedData, isRowAvailable, setRowIndex, setWrappedData, toString
public ManySelectionTrackingListDataModel()
public ManySelectionTrackingListDataModel(java.util.List list)
public java.util.List getSelections()
SelectionAware
getSelections
in interface SelectionAware
public boolean isCurrentRowSelected()
SelectionAware
isCurrentRowSelected
in interface SelectionAware
public void selectAll()
SelectionAware
selectAll
in interface SelectionAware
public void setCurrentRowSelected(boolean rowSelected)
SelectionAware
setCurrentRowSelected
in interface SelectionAware
rowSelected
- true to select the current rowpublic void setSelections(java.util.List selections)
SelectionAware
setSelections
in interface SelectionAware
selections
- the list of selected row data objectspublic void select(java.lang.Object rowData)
SelectionAware
select
in interface SelectionAware
rowData
- the row data object to select.