|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.gwtext.client.core.JsObject
com.gwtext.client.widgets.grid.AbstractSelectionModel
com.gwtext.client.widgets.grid.RowSelectionModel
public class RowSelectionModel
A Grid's row based selection model.
| Field Summary |
|---|
| Fields inherited from class com.gwtext.client.core.JsObject |
|---|
jsObj |
| Constructor Summary | |
|---|---|
RowSelectionModel()
Cretes a new RowSelectionModel. |
|
RowSelectionModel(boolean singleSelect)
Cretes a new RowSelectionModel. |
|
RowSelectionModel(com.google.gwt.core.client.JavaScriptObject jsObj)
|
|
| Method Summary | |
|---|---|
void |
addListener(RowSelectionListener listener)
Add a Row selection listener. |
void |
clearSelections()
Clears all selections. |
protected com.google.gwt.core.client.JavaScriptObject |
create(boolean singleSelect)
|
void |
deselectRange(int startRow,
int endRow)
Deselects a range of rows. |
void |
deselectRow(int row)
Deselects a row. |
int |
getCount()
Gets the number of selected rows. |
Record |
getSelected()
Returns the first selected record. |
Record[] |
getSelections()
Returns the selected records. |
boolean |
hasSelection()
Returns true if there is a selection. |
boolean |
isIdSelected(java.lang.String id)
Returns true if the specified record id is selected. |
boolean |
isLocked()
Returns true if the selections are locked. |
boolean |
isSelected(int row)
Returns true if row is selected. |
boolean |
isSelected(Record record)
Returns true if the record is selected. |
void |
selectAll()
Selects all rows. |
void |
selectFirstRow()
Selects the first row. |
void |
selectLastRow()
Selects the last row. |
void |
selectLastRow(boolean keepExisting)
Seletcs the last row. |
void |
selectNext()
Selects the row immediately following the last selected row. |
void |
selectPrevious()
Selects the row that precedes the last selected row. |
void |
selectRange(int startRow,
int endRow)
Selects a range of rows. |
void |
selectRange(int startRow,
int endRow,
boolean keepExisting)
Selects a range of rows. |
void |
selectRecords(Record record)
Select a Record. |
void |
selectRecords(Record[] records)
Select records. |
void |
selectRow(int row)
Selects a row. |
void |
selectRow(int row,
boolean keepExisting)
Selects a row. |
void |
selectRows(int[] rows)
Selects multiple rows. |
void |
selectRows(int[] rows,
boolean keepExisting)
Selects multiple rows. |
| Methods inherited from class com.gwtext.client.widgets.grid.AbstractSelectionModel |
|---|
lock, unlock |
| Methods inherited from class com.gwtext.client.core.JsObject |
|---|
getJsObj, getProperties, isCreated, setJsObj |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RowSelectionModel()
public RowSelectionModel(boolean singleSelect)
singleSelect - true to allow selection of only one row at a time (defaults to false)public RowSelectionModel(com.google.gwt.core.client.JavaScriptObject jsObj)
| Method Detail |
|---|
protected com.google.gwt.core.client.JavaScriptObject create(boolean singleSelect)
public void clearSelections()
public void deselectRange(int startRow,
int endRow)
startRow - the index of the first row in the rangeendRow - the index of the last row in the rangepublic void deselectRow(int row)
row - the index of the row to deselectpublic int getCount()
public Record getSelected()
public Record[] getSelections()
public boolean hasSelection()
public boolean isIdSelected(java.lang.String id)
id - the id of record to check
public boolean isLocked()
isLocked in class AbstractSelectionModelpublic boolean isSelected(int row)
row - the row index
public boolean isSelected(Record record)
record - the record to check
public void selectAll()
public void selectFirstRow()
public void selectLastRow()
public void selectLastRow(boolean keepExisting)
keepExisting - true to keep existing selectionpublic void selectNext()
public void selectPrevious()
public void selectRange(int startRow,
int endRow)
startRow - the index of the first rowendRow - the index of the last row
public void selectRange(int startRow,
int endRow,
boolean keepExisting)
startRow - the index of the first rowendRow - the index of the last rowkeepExisting - keep the existing selectionpublic void selectRecords(Record record)
record - the record to selectpublic void selectRecords(Record[] records)
records - the records to selectpublic void selectRow(int row)
row - the row index to select
public void selectRow(int row,
boolean keepExisting)
row - the row index to selectkeepExisting - keep existing selectionpublic void selectRows(int[] rows)
rows - array of the indexes of the row to select
public void selectRows(int[] rows,
boolean keepExisting)
rows - array of the indexes of the row to selectkeepExisting - keep the existing selectionpublic void addListener(RowSelectionListener listener)
listener - the listener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||