com.google.gwt.view.client
Class TreeViewModel.DefaultNodeInfo<T>

java.lang.Object
  extended by com.google.gwt.view.client.TreeViewModel.DefaultNodeInfo<T>
All Implemented Interfaces:
TreeViewModel.NodeInfo<T>
Enclosing interface:
TreeViewModel

public static class TreeViewModel.DefaultNodeInfo<T>
extends java.lang.Object
implements TreeViewModel.NodeInfo<T>

Default implementation of TreeViewModel.DefaultNodeInfo.


Constructor Summary
TreeViewModel.DefaultNodeInfo(AbstractListViewAdapter<T> adapter, Cell<T> cell)
          Construct a new TreeViewModel.DefaultNodeInfo.
TreeViewModel.DefaultNodeInfo(AbstractListViewAdapter<T> adapter, Cell<T> cell, SelectionModel<? super T> selectionModel, ValueUpdater<T> valueUpdater)
          Construct a new TreeViewModel.DefaultNodeInfo.
 
Method Summary
 Cell<T> getCell()
          Get the Cell used to render the children of this node.
 ProvidesKey<T> getProvidesKey()
          Return the key provider for children of this node.
 SelectionModel<? super T> getSelectionModel()
          Get the SelectionModel used for the children of this node.
 ValueUpdater<T> getValueUpdater()
          Get the value updater associated with the cell.
 void setView(ListView<T> view)
          Set the view that is listening to this TreeViewModel.DefaultNodeInfo.
 void unsetView()
          Unset the view from the TreeViewModel.DefaultNodeInfo.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeViewModel.DefaultNodeInfo

public TreeViewModel.DefaultNodeInfo(AbstractListViewAdapter<T> adapter,
                                     Cell<T> cell)
Construct a new TreeViewModel.DefaultNodeInfo.

Parameters:
adapter - the AbstractListViewAdapter that provides the child values
cell - the Cell used to render the child values

TreeViewModel.DefaultNodeInfo

public TreeViewModel.DefaultNodeInfo(AbstractListViewAdapter<T> adapter,
                                     Cell<T> cell,
                                     SelectionModel<? super T> selectionModel,
                                     ValueUpdater<T> valueUpdater)
Construct a new TreeViewModel.DefaultNodeInfo.

Parameters:
adapter - the AbstractListViewAdapter that provides the child values
cell - the Cell used to render the child values update when the selection changes
valueUpdater - the ValueUpdater
Method Detail

getCell

public Cell<T> getCell()
Description copied from interface: TreeViewModel.NodeInfo
Get the Cell used to render the children of this node.

Specified by:
getCell in interface TreeViewModel.NodeInfo<T>
Returns:
the Cell

getProvidesKey

public ProvidesKey<T> getProvidesKey()
Description copied from interface: TreeViewModel.NodeInfo
Return the key provider for children of this node.

Specified by:
getProvidesKey in interface TreeViewModel.NodeInfo<T>
Returns:
the ProvidesKey

getSelectionModel

public SelectionModel<? super T> getSelectionModel()
Description copied from interface: TreeViewModel.NodeInfo
Get the SelectionModel used for the children of this node. To unify selection across all items of the same type, or across the entire tree, return the same instance of SelectionModel from all TreeViewModel.DefaultNodeInfo.

Specified by:
getSelectionModel in interface TreeViewModel.NodeInfo<T>
Returns:
the SelectionModel

getValueUpdater

public ValueUpdater<T> getValueUpdater()
Description copied from interface: TreeViewModel.NodeInfo
Get the value updater associated with the cell.

Specified by:
getValueUpdater in interface TreeViewModel.NodeInfo<T>
Returns:
the value updater

setView

public void setView(ListView<T> view)
Description copied from interface: TreeViewModel.NodeInfo
Set the view that is listening to this TreeViewModel.DefaultNodeInfo. The implementation should attach the view to the source of data.

Specified by:
setView in interface TreeViewModel.NodeInfo<T>
Parameters:
view - the ListView

unsetView

public void unsetView()
Description copied from interface: TreeViewModel.NodeInfo
Unset the view from the TreeViewModel.DefaultNodeInfo. The implementation should detach the view from the source of data.

Specified by:
unsetView in interface TreeViewModel.NodeInfo<T>