com.extjs.gxt.ui.client.widget.treepanel
Class TreePanelSelectionModel<M extends ModelData>

java.lang.Object
  extended by com.extjs.gxt.ui.client.event.BaseObservable
      extended by com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel<M>
          extended by com.extjs.gxt.ui.client.widget.treepanel.TreePanelSelectionModel<M>
Type Parameters:
M - the model type
All Implemented Interfaces:
Listener<TreePanelEvent>, Observable, SelectionProvider<M>, StoreSelectionModel<M>, java.util.EventListener

public class TreePanelSelectionModel<M extends ModelData>
extends AbstractStoreSelectionModel<M>
implements Listener<TreePanelEvent>

TreePanel selection model.


Constructor Summary
TreePanelSelectionModel()
           
 
Method Summary
 void bindTree(TreePanel tree)
           
 void deselect(int index)
          Deselects the item at the given index.
 void deselect(int start, int end)
          Deselects the range.
 void handleEvent(TreePanelEvent be)
          Sent when an event that the listener has registered for occurs.
 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.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel
addSelectionChangedListener, bind, deselect, deselect, deselect, deselectAll, getSelectedItem, getSelectedItems, getSelection, getSelectionMode, isLocked, refresh, removeSelectionListener, select, select, select, select, selectAll, setLocked, setSelection, setSelectionMode
 
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable
addListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreePanelSelectionModel

public TreePanelSelectionModel()
Method Detail

bindTree

public void bindTree(TreePanel 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 extends ModelData>
Overrides:
deselect in class AbstractStoreSelectionModel<M extends ModelData>
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 extends ModelData>
Overrides:
deselect in class AbstractStoreSelectionModel<M extends ModelData>
Parameters:
start - the start index
end - the end index

handleEvent

public void handleEvent(TreePanelEvent be)
Description copied from interface: Listener
Sent when an event that the listener has registered for occurs.

Specified by:
handleEvent in interface Listener<TreePanelEvent>
Parameters:
be - the event which occurred

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 extends ModelData>
Overrides:
isSelected in class AbstractStoreSelectionModel<M extends ModelData>
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 extends ModelData>
Overrides:
select in class AbstractStoreSelectionModel<M extends ModelData>
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.