public class GridRowSelectDataModel extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
GridRowSelectDataModel.SelectedRow
This is an internal representation of the selections.
|
Constructor and Description |
---|
GridRowSelectDataModel() |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
GridRow row)
Adds a new selected row in the model.
|
void |
clear()
Drops selection.
|
int |
firstIndex()
Gets the first selected row number (in order they were selected by a user).
|
GridRow |
firstRow()
Gets the first selected row (in order they were selected by a user).
|
GridRow[] |
getGridRows()
Gets a list of selected grid rows.
|
int[] |
getIndexes()
Gets a list of selected row numbers.
|
void |
remove(int index)
Removes selected row from the model by grid row number.
|
void |
replace(int oldIndex,
int newIndex,
GridRow newRow)
This method relaces the specified row with the new one.
|
int |
size()
Gets the number of selected rows.
|
public void add(int index, GridRow row)
index
- is a row number in the grid.row
- is a selected grid row.public int firstIndex()
-1
if there are no rows selected.public GridRow firstRow()
null
if there are no rows selected.public int[] getIndexes()
public GridRow[] getGridRows()
public void remove(int index)
index
- a row number that was deselected.public void clear()
public int size()
public void replace(int oldIndex, int newIndex, GridRow newRow)
oldIndex
- is a number of the row to be replaced.newIndex
- is a new row number.newRow
- is a new model row.Copyright © 2008–2013. All rights reserved.