Package com.google.gwt.view.client
Class TreeViewModel.DefaultNodeInfo<T>
- java.lang.Object
-
- 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 ofTreeViewModel.NodeInfo.
-
-
Constructor Summary
Constructors Constructor Description DefaultNodeInfo(AbstractDataProvider<T> dataProvider, Cell<T> cell)Construct a newTreeViewModel.DefaultNodeInfo.DefaultNodeInfo(AbstractDataProvider<T> dataProvider, Cell<T> cell, SelectionModel<? super T> selectionModel, ValueUpdater<T> valueUpdater)Construct a newTreeViewModel.DefaultNodeInfo.DefaultNodeInfo(AbstractDataProvider<T> dataProvider, Cell<T> cell, SelectionModel<? super T> selectionModel, CellPreviewEvent.Handler<T> selectionEventManager, ValueUpdater<T> valueUpdater)Construct a newTreeViewModel.DefaultNodeInfo.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cell<T>getCell()Get theCellused to render the children of this node.ProvidesKey<T>getProvidesKey()Return the key provider for children of this node.SelectionModel<? super T>getSelectionModel()Get theSelectionModelused for the children of this node.ValueUpdater<T>getValueUpdater()Get the value updater associated with the cell.voidsetDataDisplay(HasData<T> display)Set the display that is listening to thisTreeViewModel.NodeInfo.voidunsetDataDisplay()Unset the display from theTreeViewModel.NodeInfo.
-
-
-
Constructor Detail
-
DefaultNodeInfo
public DefaultNodeInfo(AbstractDataProvider<T> dataProvider, Cell<T> cell)
Construct a newTreeViewModel.DefaultNodeInfo.- Parameters:
dataProvider- theAbstractDataProviderthat provides the child valuescell- theCellused to render the child values
-
DefaultNodeInfo
public DefaultNodeInfo(AbstractDataProvider<T> dataProvider, Cell<T> cell, SelectionModel<? super T> selectionModel, ValueUpdater<T> valueUpdater)
Construct a newTreeViewModel.DefaultNodeInfo.- Parameters:
dataProvider- theAbstractDataProviderthat provides the child valuescell- theCellused to render the child values update when the selection changesselectionModel- theSelectionModelused for selectionvalueUpdater- theValueUpdater
-
DefaultNodeInfo
public DefaultNodeInfo(AbstractDataProvider<T> dataProvider, Cell<T> cell, SelectionModel<? super T> selectionModel, CellPreviewEvent.Handler<T> selectionEventManager, ValueUpdater<T> valueUpdater)
Construct a newTreeViewModel.DefaultNodeInfo.- Parameters:
dataProvider- theAbstractDataProviderthat provides the child valuescell- theCellused to render the child values update when the selection changesselectionModel- theSelectionModelused for selectionselectionEventManager- theCellPreviewEvent.Handlerthat handles user selection interactionvalueUpdater- theValueUpdater
-
-
Method Detail
-
getCell
public Cell<T> getCell()
Description copied from interface:TreeViewModel.NodeInfoGet theCellused to render the children of this node.- Specified by:
getCellin interfaceTreeViewModel.NodeInfo<T>- Returns:
- the
Cell
-
getProvidesKey
public ProvidesKey<T> getProvidesKey()
Description copied from interface:TreeViewModel.NodeInfoReturn the key provider for children of this node.- Specified by:
getProvidesKeyin interfaceTreeViewModel.NodeInfo<T>- Returns:
- the
ProvidesKey
-
getSelectionModel
public SelectionModel<? super T> getSelectionModel()
Description copied from interface:TreeViewModel.NodeInfoGet theSelectionModelused 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 ofSelectionModelfrom allTreeViewModel.NodeInfo.- Specified by:
getSelectionModelin interfaceTreeViewModel.NodeInfo<T>- Returns:
- the
SelectionModel
-
getValueUpdater
public ValueUpdater<T> getValueUpdater()
Description copied from interface:TreeViewModel.NodeInfoGet the value updater associated with the cell.- Specified by:
getValueUpdaterin interfaceTreeViewModel.NodeInfo<T>- Returns:
- the value updater
-
setDataDisplay
public void setDataDisplay(HasData<T> display)
Description copied from interface:TreeViewModel.NodeInfoSet the display that is listening to thisTreeViewModel.NodeInfo. The implementation should attach the display to the source of data.- Specified by:
setDataDisplayin interfaceTreeViewModel.NodeInfo<T>- Parameters:
display- theHasData
-
unsetDataDisplay
public void unsetDataDisplay()
Description copied from interface:TreeViewModel.NodeInfoUnset the display from theTreeViewModel.NodeInfo. The implementation should detach the display from the source of data.- Specified by:
unsetDataDisplayin interfaceTreeViewModel.NodeInfo<T>
-
-