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 Object
implements TreeViewModel.NodeInfo<T>
Default implementation of
TreeViewModel.NodeInfo
.-
Constructor Summary
ConstructorDescriptionDefaultNodeInfo
(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
Modifier and TypeMethodDescriptiongetCell()
Get theCell
used to render the children of this node.Return the key provider for children of this node.SelectionModel
<? super T> Get theSelectionModel
used for the children of this node.Get the value updater associated with the cell.void
setDataDisplay
(HasData<T> display) Set the display that is listening to thisTreeViewModel.NodeInfo
.void
Unset the display from theTreeViewModel.NodeInfo
.
-
Constructor Details
-
DefaultNodeInfo
Construct a newTreeViewModel.DefaultNodeInfo
.- Parameters:
dataProvider
- theAbstractDataProvider
that provides the child valuescell
- theCell
used 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
- theAbstractDataProvider
that provides the child valuescell
- theCell
used to render the child values update when the selection changesselectionModel
- theSelectionModel
used 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
- theAbstractDataProvider
that provides the child valuescell
- theCell
used to render the child values update when the selection changesselectionModel
- theSelectionModel
used for selectionselectionEventManager
- theCellPreviewEvent.Handler
that handles user selection interactionvalueUpdater
- theValueUpdater
-
-
Method Details
-
getCell
Description copied from interface:TreeViewModel.NodeInfo
Get theCell
used to render the children of this node.- Specified by:
getCell
in interfaceTreeViewModel.NodeInfo<T>
- Returns:
- the
Cell
-
getProvidesKey
Description copied from interface:TreeViewModel.NodeInfo
Return the key provider for children of this node.- Specified by:
getProvidesKey
in interfaceTreeViewModel.NodeInfo<T>
- Returns:
- the
ProvidesKey
-
getSelectionModel
Description copied from interface:TreeViewModel.NodeInfo
Get theSelectionModel
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 ofSelectionModel
from allTreeViewModel.NodeInfo
.- Specified by:
getSelectionModel
in interfaceTreeViewModel.NodeInfo<T>
- Returns:
- the
SelectionModel
-
getValueUpdater
Description copied from interface:TreeViewModel.NodeInfo
Get the value updater associated with the cell.- Specified by:
getValueUpdater
in interfaceTreeViewModel.NodeInfo<T>
- Returns:
- the value updater
-
setDataDisplay
Description copied from interface:TreeViewModel.NodeInfo
Set the display that is listening to thisTreeViewModel.NodeInfo
. The implementation should attach the display to the source of data.- Specified by:
setDataDisplay
in interfaceTreeViewModel.NodeInfo<T>
- Parameters:
display
- theHasData
-
unsetDataDisplay
public void unsetDataDisplay()Description copied from interface:TreeViewModel.NodeInfo
Unset the display from theTreeViewModel.NodeInfo
. The implementation should detach the display from the source of data.- Specified by:
unsetDataDisplay
in interfaceTreeViewModel.NodeInfo<T>
-