java.lang.Object | |
↳ | com.google.gwt.view.client.DefaultSelectionEventManager<T> |
An implementation of CellPreviewEvent.Handler
that adds selection
support via the spacebar and mouse clicks and handles the control key.
If the HasData
source of the selection event uses a
MultiSelectionModel
, this manager additionally provides support for
shift key to select a range of values. For all other SelectionModel
s,
only the control key is supported.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DefaultSelectionEventManager.CheckboxEventTranslator<T> | Implementation of DefaultSelectionEventManager.CheckboxEventTranslator that only triggers selection when
any checkbox is selected. |
||||||||||
DefaultSelectionEventManager.EventTranslator<T> | Translates CellPreviewEvent s into DefaultSelectionEventManager.SelectAction s. |
||||||||||
DefaultSelectionEventManager.SelectAction | The action that controls how selection is handled. |
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct a new
DefaultSelectionEventManager using the specified
DefaultSelectionEventManager.EventTranslator to control which DefaultSelectionEventManager.SelectAction to take for
each event. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct a new
DefaultSelectionEventManager that triggers
selection when a checkbox in the specified column is clicked. | |||||||||||
Construct a new
DefaultSelectionEventManager that triggers
selection when any checkbox in any column is clicked. | |||||||||||
Create a new
DefaultSelectionEventManager using the specified
DefaultSelectionEventManager.EventTranslator to control which DefaultSelectionEventManager.SelectAction to take for
each event. | |||||||||||
Create a new
DefaultSelectionEventManager that handles selection
via user interactions. | |||||||||||
Update the selection model based on a user selection event.
| |||||||||||
Called when
CellPreviewEvent is fired. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Removes all items from the selection.
| |||||||||||
Handle an event that could cause a value to be selected for a
MultiSelectionModel . | |||||||||||
Handle an event that could cause a value to be selected.
| |||||||||||
Selects the given item, optionally clearing any prior selection.
| |||||||||||
Select or deselect a range of row indexes, optionally deselecting all other
values.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.google.gwt.view.client.CellPreviewEvent.Handler
|
Construct a new DefaultSelectionEventManager
using the specified
DefaultSelectionEventManager.EventTranslator
to control which DefaultSelectionEventManager.SelectAction
to take for
each event.
translator | the DefaultSelectionEventManager.EventTranslator to use
|
---|
Construct a new DefaultSelectionEventManager
that triggers
selection when a checkbox in the specified column is clicked.
column | the column to handle |
---|
DefaultSelectionEventManager
instance
Construct a new DefaultSelectionEventManager
that triggers
selection when any checkbox in any column is clicked.
DefaultSelectionEventManager
instance
Create a new DefaultSelectionEventManager
using the specified
DefaultSelectionEventManager.EventTranslator
to control which DefaultSelectionEventManager.SelectAction
to take for
each event.
translator | the DefaultSelectionEventManager.EventTranslator to use |
---|
DefaultSelectionEventManager
instance
Create a new DefaultSelectionEventManager
that handles selection
via user interactions.
DefaultSelectionEventManager
instance
Update the selection model based on a user selection event.
selectionModel | the selection model to update |
---|---|
row | the selected row index relative to the page start |
rowValue | the selected row value |
action | the DefaultSelectionEventManager.SelectAction to apply |
selectRange | true to select the range from the last selected row |
clearOthers | true to clear the current selection |
Called when CellPreviewEvent
is fired.
event | the CellPreviewEvent that was fired
|
---|
Removes all items from the selection.
selectionModel | the MultiSelectionModel to clear
|
---|
Handle an event that could cause a value to be selected for a
MultiSelectionModel
. This overloaded method adds support for both
the control and shift keys. If the shift key is held down, all rows between
the previous selected row and the current row are selected.
event | the CellPreviewEvent that triggered selection |
---|---|
action | the action to handle |
selectionModel | the SelectionModel to update
|
Handle an event that could cause a value to be selected. This method works
for any SelectionModel
. Pressing the space bar or ctrl+click will
toggle the selection state. Clicking selects the row if it is not selected.
event | the CellPreviewEvent that triggered selection |
---|---|
action | the action to handle |
selectionModel | the SelectionModel to update
|
Selects the given item, optionally clearing any prior selection.
selectionModel | the MultiSelectionModel to update |
---|---|
target | the item to select |
selected | true to select, false to deselect |
clearOthers | true to clear all other selected items |
Select or deselect a range of row indexes, optionally deselecting all other values.
selectionModel | the MultiSelectionModel to update |
---|---|
display | the HasData source of the selection event |
range | the Range of rows to select or deselect |
addToSelection | true to select, false to deselect the range |
clearOthers | true to deselect rows not in the range |