com.sencha.gxt.widget.core.client.tree
Class TreeSelectionModel<M>

java.lang.Object
  extended by com.sencha.gxt.widget.core.client.selection.AbstractStoreSelectionModel<M>
      extended by com.sencha.gxt.widget.core.client.tree.TreeSelectionModel<M>
Type Parameters:
M - the model type
All Implemented Interfaces:
HasBeforeSelectionHandlers<M>, HasSelectionHandlers<M>, HasHandlers, SelectionChangedEvent.HasSelectionChangedHandlers<M>, StoreSelectionModel<M>

public class TreeSelectionModel<M>
extends AbstractStoreSelectionModel<M>

Tree selection model.


Constructor Summary
TreeSelectionModel()
           
 
Method Summary
 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.
 boolean isSelected(M item)
          Returns true if the item is selected.
 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.
 
Methods inherited from class com.sencha.gxt.widget.core.client.selection.AbstractStoreSelectionModel
addBeforeSelectionHandler, addSelectionChangedHandler, addSelectionHandler, bind, deselect, deselect, deselect, deselectAll, fireEvent, getSelectedItem, getSelectedItems, getSelection, getSelectionMode, isLocked, refresh, select, select, select, select, selectAll, setLocked, setSelection, setSelectionMode
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeSelectionModel

public TreeSelectionModel()
Method Detail

bindTree

public void bindTree(Tree<M,?> tree)

deselect

public void deselect(int index)
Description copied from interface: StoreSelectionModel
Deselects the item at the given index.

Specified by:
deselect in interface StoreSelectionModel<M>
Overrides:
deselect in class AbstractStoreSelectionModel<M>
Parameters:
index - the index of the item to be deselected

deselect

public void deselect(int start,
                     int end)
Description copied from interface: StoreSelectionModel
Deselects the range.

Specified by:
deselect in interface StoreSelectionModel<M>
Overrides:
deselect in class AbstractStoreSelectionModel<M>
Parameters:
start - the start index
end - the end index

isSelected

public boolean isSelected(M item)
Description copied from interface: StoreSelectionModel
Returns true if the item is selected.

Specified by:
isSelected in interface StoreSelectionModel<M>
Overrides:
isSelected in class AbstractStoreSelectionModel<M>
Parameters:
item - the item
Returns:
true if selected

select

public void select(int start,
                   int end,
                   boolean keepExisting)
Description copied from interface: StoreSelectionModel
Selects the range.

Specified by:
select in interface StoreSelectionModel<M>
Overrides:
select in class AbstractStoreSelectionModel<M>
Parameters:
start - the start index
end - the end index
keepExisting - true to keep existing selected

selectNext

public void selectNext()
Selects the item below the selected item in the tree, intelligently walking the nodes.


selectPrevious

public void selectPrevious()
Selects the item above the selected item in the tree, intelligently walking the nodes.



Copyright © 2012. All Rights Reserved.