M
- the model typepublic class TreeSelectionModel<M> extends AbstractStoreSelectionModel<M>
Modifier and Type | Class and Description |
---|---|
protected class |
TreeSelectionModel.Handler |
Modifier and Type | Field and Description |
---|---|
protected TreeSelectionModel.Handler |
handler |
protected GroupingHandlerRegistration |
handlerRegistration |
protected KeyNav |
keyNav |
protected Tree.TreeNode<M> |
mouseDownNode
When the mouse goes down on a node this is what was recored.
|
protected Tree<M,?> |
tree |
protected TreeStore<M> |
treeStore |
fireSelectionChangeOnClick, handlerManager, lastFocused, lastSelected, locked, mouseDown, processSelectOnMouseUp, selected, selectionMode, store
Constructor and Description |
---|
TreeSelectionModel() |
Modifier and Type | Method and Description |
---|---|
void |
bindTree(Tree<M,?> tree) |
void |
deselect(int index)
Deselects the item at the given index.
|
void |
deselect(int start,
int end)
Deselects the range.
|
Tree<M,?> |
getTree()
Returns the currently bound tree.
|
boolean |
isSelected(M item)
Returns true if the item is selected.
|
protected M |
next() |
protected void |
onKeyDown(NativeEvent e) |
protected void |
onKeyLeft(NativeEvent ce) |
protected void |
onKeyRight(NativeEvent ce) |
protected void |
onKeyUp(NativeEvent e) |
protected void |
onMouseClick(ClickEvent clickEvent) |
protected void |
onMouseClick(NativeEvent event) |
protected void |
onMouseDown(MouseDownEvent event) |
protected void |
onMouseDown(NativeEvent event)
On mouse down
|
protected void |
onMouseUp(MouseUpEvent event) |
protected void |
onMouseUp(NativeEvent event)
On mouse up.
|
protected void |
onRightClick(NativeEvent event,
Tree.TreeNode<M> selectedNode,
M selectedModel) |
protected void |
onSelect(NativeEvent nativeEvent)
On select.
|
protected void |
onSelectChange(M model,
boolean select) |
protected void |
onTap(TouchData touchData) |
protected M |
prev() |
void |
select(int start,
int end,
boolean keepExisting)
Selects the range.
|
void |
selectNext()
Selects the item below the selected item in the tree, intelligently walking the nodes.
|
void |
selectPrevious()
Selects the item above the selected item in the tree, intelligently walking the nodes.
|
addBeforeSelectionHandler, addSelectionChangedHandler, addSelectionHandler, bind, deselect, deselect, deselect, deselectAll, doDeselect, doMultiSelect, doSelect, doSingleSelect, ensureHandlers, fireEvent, fireSelectionChange, getLastFocused, getSelectedItem, getSelectedItems, getSelection, getSelectionMode, isLocked, onAdd, onClear, onLastFocusChanged, onRecordChange, onRemove, onUpdate, refresh, select, select, select, select, selectAll, setLastFocused, setLocked, setProcessSelectOnMouseUp, setSelection, setSelectionMode
protected KeyNav keyNav
protected Tree.TreeNode<M> mouseDownNode
protected TreeSelectionModel.Handler handler
protected GroupingHandlerRegistration handlerRegistration
public void deselect(int index)
StoreSelectionModel
deselect
in interface StoreSelectionModel<M>
deselect
in class AbstractStoreSelectionModel<M>
index
- the index of the item to be deselectedpublic void deselect(int start, int end)
StoreSelectionModel
deselect
in interface StoreSelectionModel<M>
deselect
in class AbstractStoreSelectionModel<M>
start
- the start indexend
- the end indexpublic boolean isSelected(M item)
StoreSelectionModel
isSelected
in interface StoreSelectionModel<M>
isSelected
in class AbstractStoreSelectionModel<M>
item
- the itempublic void select(int start, int end, boolean keepExisting)
StoreSelectionModel
select
in interface StoreSelectionModel<M>
select
in class AbstractStoreSelectionModel<M>
start
- the start indexend
- the end indexkeepExisting
- true to keep existing selectedpublic void selectNext()
public void selectPrevious()
protected M next()
protected void onKeyDown(NativeEvent e)
protected void onKeyLeft(NativeEvent ce)
protected void onKeyRight(NativeEvent ce)
protected void onKeyUp(NativeEvent e)
protected void onMouseClick(ClickEvent clickEvent)
protected void onMouseClick(NativeEvent event)
protected void onMouseUp(MouseUpEvent event)
protected void onMouseUp(NativeEvent event)
event
- the native event.protected void onMouseDown(MouseDownEvent event)
protected void onMouseDown(NativeEvent event)
event
- the native event.protected void onTap(TouchData touchData)
protected void onSelect(NativeEvent nativeEvent)
nativeEvent
- the event.protected void onRightClick(NativeEvent event, Tree.TreeNode<M> selectedNode, M selectedModel)
protected void onSelectChange(M model, boolean select)
onSelectChange
in class AbstractStoreSelectionModel<M>
protected M prev()
Copyright © 2018. All rights reserved.