M
- the model typeC
- the cell data typepublic class Tree<M,C> extends Component implements BeforeExpandItemEvent.HasBeforeExpandItemHandlers<M>, ExpandItemEvent.HasExpandItemHandlers<M>, BeforeCollapseItemEvent.HasBeforeCollapseItemHandlers<M>, CollapseItemEvent.HasCollapseItemHandlers<M>, BeforeCheckChangeEvent.HasBeforeCheckChangeHandlers<M>, CheckChangeEvent.HasCheckChangeHandlers<M>, CheckProvider<M>
Tree
provides support for displaying hierarchical data. The tree gets its data from a TreeStore
.
Each model in the store is rendered as an item in the tree. Any updates to the store are automatically pushed to the
tree.
In GXT version 3, ModelKeyProvider
s and ValueProvider
s provide the interface between your data model,
the tree store and the tree. This enables a tree to work with data of any object type. The tree uses a value
provider, passed to the constructor, to get the value to display for each model in the tree.
You can provide your own implementation of these interfaces, or you can use a Sencha supplied generator to create
them for you automatically. A generator runs at compile time to create a Java class that is compiled to JavaScript.
The Sencha supplied generator can create classes for interfaces that extend the PropertyAccess
interface. The
generator transparently creates the class at compile time and the GWT#create(Class)
method returns an
instance of that class at run time. The generated class is managed by GWT and GXT and you generally do not need to
worry about what the class is called, where it is located, or other similar details.
To customize the appearance of the item in the tree, provide a cell implementation using Tree#setCell(Cell)
.
The following code snippet illustrates the creation of a simple tree with local data for test purposes. For more
practical examples that show how to load data from remote sources, see the Async Tree and Async Json Tree examples in
the online Explorer demo.
// Generate the key provider and value provider for the Data class
DataProperties dp = GWT.create(DataProperties.class);
// Create the store that the contains the data to display in the tree
TreeStore<Data> s = new TreeStore<Test.Data>(dp.key());
Data r1 = new Data("Parent 1", "value1");
s.add(r1);
s.add(r1, new Data("Child 1.1", "value2"));
s.add(r1, new Data("Child 1.2", "value3"));
Data r2 = new Data("Parent 2", "value4");
s.add(r2);
s.add(r2, new Data("Child 2.1", "value5"));
s.add(r2, new Data("Child 2.2", "value6"));
// Create the tree using the store and value provider for the name field
Tree<Data, String> t = new Tree<Data, String>(s, dp.name());
// Add the tree to a container
RootPanel.get().add(t);
To use the Sencha supplied generator to create model key providers and value providers, extend the
PropertyAccess
interface, parameterized with the type of data you want to access (as shown below) and
invoke the GWT.create
method on its class
member (as shown in the code snippet above). This
creates an instance of the class that can be used to initialize the tree and tree store. In the following code
snippet we define a new interface called DataProperties
that extends the PropertyAccess
interface and is parameterized with Data
, a Plain Old Java Object (POJO).
public interface DataProperties extends PropertyAccess { @Path("name") ModelKeyProvider key(); ValueProvider<Data, String> name(); ValueProvider<Data, String> value(); } public class Data { private String name; private String value; public Data(String name, String value) { super(); this.name = name; this.value = value; } public String getName() { return name; } public String getValue() { return value; } public void setName(String name) { this.name = name; } public void setValue(String value) { this.value = value; } }To enable check box support for a tree, add the following:
t.setCheckable(true); t.setCheckStyle(CheckCascade.CHILDREN);See
Tree.CheckCascade
for additional check box styles.
To save and restore the expand / collapse state of tree items, add the following (must be after the tree is added to
the container). This works with both local and asynchronous loading of tree items.
t.setStateId("TreeCodeSnippetTest"); StateManager.get().setProvider(new CookieProvider("/", null, null, GXT.isSecure())); TreeStateHandler sh = new TreeStateHandler(t); sh.loadState();
Modifier and Type | Class and Description |
---|---|
static class |
Tree.CheckCascade
Check cascade enum.
|
static class |
Tree.CheckNodes
Check nodes enum.
|
static class |
Tree.CheckState |
static class |
Tree.Joint
Joint enum.
|
static interface |
Tree.TreeAppearance |
static class |
Tree.TreeNode<M>
Maintains the internal state of nodes contained in the tree.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
filtering |
protected boolean |
focusConstrainScheduled |
protected XElement |
focusEl |
protected FocusImpl |
focusImpl |
protected TreeLoader<M> |
loader |
protected Map<String,Tree.TreeNode<M>> |
nodes |
protected Map<String,Tree.TreeNode<M>> |
nodesByDom |
protected Element |
rootContainer |
protected TreeSelectionModel<M> |
sm |
protected TreeStore<M> |
store |
protected ValueProvider<? super M,C> |
valueProvider |
protected TreeView<M> |
view |
adjustSize, allowTextSelection, cacheSizes, disableContextMenu, disabled, disabledStyle, ensureVisibilityOnSizing, height, hidden, lastSize, layer, left, mask, maskMessage, monitorWindowResize, pageX, pageY, resizeHandler, shim, tabIndex, toolTip, toolTipConfig, top, width, windowResizeDelay, windowResizeTask
Constructor and Description |
---|
Tree(TreeStore<M> store,
ValueProvider<? super M,C> valueProvider)
Creates a new tree panel.
|
Tree(TreeStore<M> store,
ValueProvider<? super M,C> valueProvider,
Tree.TreeAppearance appearance) |
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addBeforeCheckChangeHandler(BeforeCheckChangeEvent.BeforeCheckChangeHandler<M> handler)
Adds a
BeforeCheckChangeEvent.BeforeCheckChangeHandler handler for BeforeCheckChangeEvent events. |
HandlerRegistration |
addBeforeCollapseHandler(BeforeCollapseItemEvent.BeforeCollapseItemHandler<M> handler)
Adds a
BeforeCollapseItemEvent.BeforeCollapseItemHandler handler for BeforeCollapseItemEvent
events. |
HandlerRegistration |
addBeforeExpandHandler(BeforeExpandItemEvent.BeforeExpandItemHandler<M> handler)
Adds a
BeforeExpandItemEvent.BeforeExpandItemHandler handler for BeforeExpandItemEvent
events. |
HandlerRegistration |
addCheckChangedHandler(CheckChangedEvent.CheckChangedHandler<M> handler)
Adds a
CheckChangedEvent.CheckChangedHandler handler for CheckChangedEvent
events. |
HandlerRegistration |
addCheckChangeHandler(CheckChangeEvent.CheckChangeHandler<M> handler)
Adds a
CheckChangeEvent.CheckChangeHandler handler for CheckChangeEvent
events. |
HandlerRegistration |
addCollapseHandler(CollapseItemEvent.CollapseItemHandler<M> handler)
Adds a
CollapseItemEvent.CollapseItemHandler handler for CollapseItemEvent
events. |
HandlerRegistration |
addExpandHandler(ExpandItemEvent.ExpandItemHandler<M> handler)
Adds a
ExpandItemEvent.ExpandItemHandler handler for ExpandItemEvent events. |
protected ImageResource |
calculateIconStyle(M model) |
protected Tree.Joint |
calculateJoint(M model) |
protected boolean |
cellConsumesEventType(<any> cell,
String eventType) |
protected void |
clean() |
protected void |
cleanCollapsed(M parent) |
protected void |
cleanNode(Tree.TreeNode<M> node) |
protected void |
clear() |
void |
collapseAll()
Collapses all nodes.
|
protected void |
constrainFocusElement() |
protected void |
doClean() |
protected void |
doUpdate() |
void |
expandAll()
Expands all nodes.
|
protected void |
findChildren(M parent,
List<M> list,
boolean onlyVisible) |
Tree.TreeNode<M> |
findNode(Element target)
Returns the tree node for the given target.
|
protected void |
fireEventToCell(Event event,
String eventType,
Element cellParent,
M m,
Context context) |
void |
focus()
Try to focus this widget.
|
protected String |
generateModelId(M m) |
Tree.TreeAppearance |
getAppearance()
Returns the tree appearance.
|
<any> |
getCell()
Return the tree's cell.
|
protected SafeHtml |
getCellContent(M model) |
Tree.CheckState |
getChecked(M model)
Returns the models checked state.
|
List<M> |
getCheckedSelection()
Returns the current checked selection.
|
Tree.CheckNodes |
getCheckNodes()
Returns the child nodes value which determines what node types have a check box.
|
Tree.CheckCascade |
getCheckStyle()
The check cascade style value which determines if check box changes cascade to parent and children.
|
protected List<M> |
getChildModel(List<M> l,
boolean onlyVisible) |
protected Element |
getContainer(M model) |
IconProvider<M> |
getIconProvider()
Returns the model icon provider.
|
protected Element |
getRootContainer() |
TreeSelectionModel<M> |
getSelectionModel()
Returns the tree's selection model.
|
TreeStore<M> |
getStore()
Returns the tree's store.
|
TreeStyle |
getStyle()
Returns the tree style.
|
protected C |
getValue(M m) |
TreeView<M> |
getView()
Returns the tree's view.
|
protected int |
getVisibleRowCount() |
protected int[] |
getVisibleRows(List<M> visible,
int count) |
protected void |
handleEventForCell(Event event) |
protected boolean |
hasChildren(M model) |
boolean |
isAutoExpand()
Returns
true if auto expand is enabled. |
boolean |
isAutoLoad()
Returns
true if auto load is enabled. |
boolean |
isAutoSelect()
Returns
true if select on load is enabled. |
boolean |
isBufferedRender()
Returns
true if buffered rendering is enabled. |
boolean |
isCaching()
Returns
true when a loader is queried for it's children each time a node is expanded. |
boolean |
isCheckable()
Returns
true if check boxes are enabled. |
protected boolean |
isCheckable(Tree.TreeNode<M> node) |
boolean |
isChecked(M model)
Returns true if the model is checked.
|
boolean |
isExpanded(M model)
Returns
true if the model is expanded. |
boolean |
isExpandOnFilter()
Returns the if expand all and collapse all is enabled on filter changes.
|
boolean |
isLeaf(M model)
Returns
true if the model is a leaf node. |
protected boolean |
isRowRendered(int i,
List<M> visible) |
boolean |
isTrackMouseOver()
Returns
true if nodes are highlighted on mouse over. |
protected void |
moveFocus(Element selectedElem) |
protected void |
notifyShow() |
protected void |
onAdd(StoreAddEvent<M> event) |
protected void |
onAfterFirstAttach()
Called immediately after the first time the widget becomes attached to the browser's document only the first time.
|
protected void |
onAttach() |
void |
onBrowserEvent(Event event) |
protected void |
onCheckCascade(M model,
Tree.CheckState checked) |
protected void |
onCheckClick(Event event,
Tree.TreeNode<M> node) |
protected void |
onClear(StoreClearEvent<M> event) |
protected void |
onClick(Event event) |
protected void |
onCollapse(M model,
Tree.TreeNode<M> node,
boolean deep) |
protected void |
onDataChanged(StoreDataChangeEvent<M> event) |
protected void |
onDoubleClick(Event event) |
protected void |
onExpand(M model,
Tree.TreeNode<M> node,
boolean deep) |
protected void |
onFilter(StoreFilterEvent<M> se) |
protected void |
onRemove(StoreRemoveEvent<M> se) |
protected void |
onResize(int width,
int height)
Called after the widget is resized, this method is empty by default but can be implemented by any subclass that
needs to perform custom logic after a resize occurs.
|
protected void |
onScroll(Event event) |
protected void |
onSort(StoreSortEvent<M> se) |
protected void |
onTriCheckCascade(M model,
Tree.CheckState checked) |
protected void |
onUpdate(StoreUpdateEvent<M> event) |
protected void |
redraw(M parent)
Completely redraws the children of the given parent (or all items if parent is null), throwing away details like
currently expanded nodes, etc.
|
void |
refresh(M model) |
protected String |
register(M m) |
protected SafeHtml |
renderChild(M parent,
M child,
int depth,
TreeView.TreeViewRenderMode renderMode) |
protected void |
renderChildren(M parent) |
void |
scrollIntoView(M model)
Scrolls the tree to ensure the given model is visible.
|
void |
setAutoExpand(boolean autoExpand)
If set to
true , all non leaf nodes will be expanded automatically (defaults to false ). |
void |
setAutoLoad(boolean autoLoad)
Sets whether all children should automatically be loaded recursively (defaults to false).
|
void |
setAutoSelect(boolean autoSelect)
True to select the first model after the store's data changes (defaults to
false ). |
void |
setBufferedRender(boolean bufferRender)
True to only render tree nodes that are in view (defaults to
false ). |
void |
setCaching(boolean caching)
Sets whether the children should be cached after first being retrieved from the store (defaults to
true ). |
void |
setCell(<any> cell)
Sets the tree's cell.
|
void |
setCheckable(boolean checkable)
Sets whether check boxes are used in the tree (defaults to
false ). |
void |
setChecked(M item,
Tree.CheckState checked)
Sets the check state of the item.
|
void |
setCheckedSelection(List<M> selection)
Sets the current checked selection.
|
void |
setCheckNodes(Tree.CheckNodes checkNodes)
Sets which tree items will display a check box (defaults to BOTH).
|
void |
setCheckStyle(Tree.CheckCascade checkStyle)
Sets the cascading behavior for check tree (defaults to PARENTS).
|
void |
setExpanded(M model,
boolean expand)
Sets the item's expand state.
|
void |
setExpanded(M model,
boolean expand,
boolean deep)
Sets the item's expand state.
|
void |
setExpandOnFilter(boolean expandOnFilter)
Sets whether the tree should expand all and collapse all when filters are applied (defaults to
true ). |
void |
setIconProvider(IconProvider<M> iconProvider)
Sets the tree's model icon provider which provides the icon style for each model.
|
void |
setLeaf(M model,
boolean leaf)
Sets the item's leaf state.
|
void |
setLoader(TreeLoader<M> loader)
Sets the tree loader.
|
void |
setSelectionModel(TreeSelectionModel<M> sm)
Sets the tree's selection model.
|
void |
setStore(TreeStore<M> store)
Assigns a new store to the tree.
|
void |
setStyle(TreeStyle style)
Sets the tree style.
|
void |
setTrackMouseOver(boolean trackMouseOver)
True to highlight nodes when the mouse is over (defaults to
true ). |
void |
setView(TreeView<M> view)
Sets the tree's view.
|
void |
toggle(M model)
Toggles the model's expand state.
|
protected void |
unregister(M m) |
protected void |
update() |
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addGestureRecognizer, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleDependentName, addStyleOnOver, adjustPosition, adjustSize, applyState, assertAfterRender, assertPreRender, blur, clearSizeCache, disable, disableContextMenu, disableEvents, enable, enableEvents, fireCancellableEvent, fireEvent, getData, getElement, getFocusEl, getFocusSupport, getGestureRecognizer, getGestureRecognizerCount, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getPositionEl, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideShadow, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, mask, mask, notifyHide, onBlur, onDetach, onDisable, onEnable, onFocus, onHide, onHideContextMenu, onLoad, onPosition, onRightClick, onShow, onShowContextMenu, onTouch, onUnload, onWindowResize, removeStyleDependentName, removeStyleOnOver, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setMonitorWindowResize, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setStyleDependentName, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
protected boolean filtering
protected XElement focusEl
protected final FocusImpl focusImpl
protected boolean focusConstrainScheduled
protected TreeLoader<M> loader
protected Map<String,Tree.TreeNode<M>> nodes
protected Map<String,Tree.TreeNode<M>> nodesByDom
protected TreeSelectionModel<M> sm
protected final ValueProvider<? super M,C> valueProvider
protected Element rootContainer
public Tree(TreeStore<M> store, ValueProvider<? super M,C> valueProvider)
store
- the tree storepublic Tree(TreeStore<M> store, ValueProvider<? super M,C> valueProvider, Tree.TreeAppearance appearance)
public HandlerRegistration addBeforeCheckChangeHandler(BeforeCheckChangeEvent.BeforeCheckChangeHandler<M> handler)
BeforeCheckChangeEvent.HasBeforeCheckChangeHandlers
BeforeCheckChangeEvent.BeforeCheckChangeHandler
handler for BeforeCheckChangeEvent
events.addBeforeCheckChangeHandler
in interface BeforeCheckChangeEvent.HasBeforeCheckChangeHandlers<M>
handler
- the handlerpublic HandlerRegistration addBeforeCollapseHandler(BeforeCollapseItemEvent.BeforeCollapseItemHandler<M> handler)
BeforeCollapseItemEvent.HasBeforeCollapseItemHandlers
BeforeCollapseItemEvent.BeforeCollapseItemHandler
handler for BeforeCollapseItemEvent
events.addBeforeCollapseHandler
in interface BeforeCollapseItemEvent.HasBeforeCollapseItemHandlers<M>
handler
- the handlerpublic HandlerRegistration addBeforeExpandHandler(BeforeExpandItemEvent.BeforeExpandItemHandler<M> handler)
BeforeExpandItemEvent.HasBeforeExpandItemHandlers
BeforeExpandItemEvent.BeforeExpandItemHandler
handler for BeforeExpandItemEvent
events.addBeforeExpandHandler
in interface BeforeExpandItemEvent.HasBeforeExpandItemHandlers<M>
handler
- the handlerpublic HandlerRegistration addCheckChangedHandler(CheckChangedEvent.CheckChangedHandler<M> handler)
CheckChangedEvent.HasCheckChangedHandlers
CheckChangedEvent.CheckChangedHandler
handler for CheckChangedEvent
events.addCheckChangedHandler
in interface CheckChangedEvent.HasCheckChangedHandlers<M>
handler
- the handlerpublic HandlerRegistration addCheckChangeHandler(CheckChangeEvent.CheckChangeHandler<M> handler)
CheckChangeEvent.HasCheckChangeHandlers
CheckChangeEvent.CheckChangeHandler
handler for CheckChangeEvent
events.addCheckChangeHandler
in interface CheckChangeEvent.HasCheckChangeHandlers<M>
handler
- the handlerpublic HandlerRegistration addCollapseHandler(CollapseItemEvent.CollapseItemHandler<M> handler)
CollapseItemEvent.HasCollapseItemHandlers
CollapseItemEvent.CollapseItemHandler
handler for CollapseItemEvent
events.addCollapseHandler
in interface CollapseItemEvent.HasCollapseItemHandlers<M>
handler
- the handlerpublic HandlerRegistration addExpandHandler(ExpandItemEvent.ExpandItemHandler<M> handler)
ExpandItemEvent.HasExpandItemHandlers
ExpandItemEvent.ExpandItemHandler
handler for ExpandItemEvent
events.addExpandHandler
in interface ExpandItemEvent.HasExpandItemHandlers<M>
handler
- the handlerpublic void collapseAll()
public void expandAll()
public Tree.TreeNode<M> findNode(Element target)
target
- the target elementpublic void focus()
Component
public Tree.TreeAppearance getAppearance()
public <any> getCell()
public Tree.CheckState getChecked(M model)
model
- the modelpublic List<M> getCheckedSelection()
setAutoLoad(boolean)
to true
to fully render the tree to receive all checked items in the tree.getCheckedSelection
in interface CheckProvider<M>
public Tree.CheckNodes getCheckNodes()
setCheckable(boolean)
.public Tree.CheckCascade getCheckStyle()
public IconProvider<M> getIconProvider()
public TreeSelectionModel<M> getSelectionModel()
public TreeStyle getStyle()
public boolean isAutoExpand()
true
if auto expand is enabled.public boolean isAutoLoad()
true
if auto load is enabled.public boolean isAutoSelect()
true
if select on load is enabled.public boolean isBufferedRender()
true
if buffered rendering is enabled.public boolean isCaching()
true
when a loader is queried for it's children each time a node is expanded. Only applies when
using a loader with the tree store.public boolean isCheckable()
true
if check boxes are enabled.public boolean isChecked(M model)
CheckProvider
isChecked
in interface CheckProvider<M>
model
- the modelpublic boolean isExpanded(M model)
true
if the model is expanded.model
- the modelpublic boolean isExpandOnFilter()
public boolean isLeaf(M model)
true
if the model is a leaf node. The leaf state allows a tree item to specify if it has children
before the children have been realized.model
- the modelpublic boolean isTrackMouseOver()
true
if nodes are highlighted on mouse over.public void onBrowserEvent(Event event)
onBrowserEvent
in class Component
public void refresh(M model)
public void scrollIntoView(M model)
model
- the model to scroll into viewpublic void setAutoExpand(boolean autoExpand)
true
, all non leaf nodes will be expanded automatically (defaults to false
).autoExpand
- the auto expand state to set.public void setAutoLoad(boolean autoLoad)
autoLoad
- true
to auto loadpublic void setAutoSelect(boolean autoSelect)
false
).autoSelect
- true
to auto selectpublic void setBufferedRender(boolean bufferRender)
false
). Set this to true
when dealing
with very large trees.bufferRender
- true
to buffer renderpublic void setCaching(boolean caching)
true
).
When false
, a load request will be made each time a node is expanded.caching
- the caching statepublic void setCell(<any> cell)
cell
- the cellpublic void setCheckable(boolean checkable)
false
).checkable
- true
for check boxespublic void setChecked(M item, Tree.CheckState checked)
setAutoLoad(boolean)
can be used to render all children.item
- the itemchecked
- the check statepublic void setCheckedSelection(List<M> selection)
CheckProvider
setCheckedSelection
in interface CheckProvider<M>
selection
- the checked selectionpublic void setCheckNodes(Tree.CheckNodes checkNodes)
Valid values are:
checkNodes
- the child nodes valuepublic void setCheckStyle(Tree.CheckCascade checkStyle)
setAutoLoad(boolean)
can be used to fully render the
tree on render.
Valid values are:
checkStyle
- the child stylepublic void setExpanded(M model, boolean expand)
model
- the modelexpand
- true
to expandpublic void setExpanded(M model, boolean expand, boolean deep)
model
- the modelexpand
- true
to expanddeep
- true
to expand all children recursivelypublic void setExpandOnFilter(boolean expandOnFilter)
true
).expandOnFilter
- true
to expand and collapse on filter changespublic void setIconProvider(IconProvider<M> iconProvider)
iconProvider
- the icon providerpublic void setLeaf(M model, boolean leaf)
model
- the modelleaf
- the leaf statepublic void setLoader(TreeLoader<M> loader)
loader
- the loaderpublic void setSelectionModel(TreeSelectionModel<M> sm)
sm
- the selection modelpublic void setStore(TreeStore<M> store)
store
- the new store to bind to, or null to detach from the storepublic void setStyle(TreeStyle style)
style
- the tree stylepublic void setTrackMouseOver(boolean trackMouseOver)
true
).trackMouseOver
- true
to highlight nodes on mouse overpublic void setView(TreeView<M> view)
view
- the viewpublic void toggle(M model)
model
- the modelprotected ImageResource calculateIconStyle(M model)
protected Tree.Joint calculateJoint(M model)
protected boolean cellConsumesEventType(<any> cell, String eventType)
protected void clean()
protected void cleanCollapsed(M parent)
protected void cleanNode(Tree.TreeNode<M> node)
protected void clear()
protected void moveFocus(Element selectedElem)
protected void constrainFocusElement()
protected void doClean()
protected void doUpdate()
protected void fireEventToCell(Event event, String eventType, Element cellParent, M m, Context context)
protected SafeHtml getCellContent(M model)
protected Element getContainer(M model)
protected Element getRootContainer()
protected int getVisibleRowCount()
protected void handleEventForCell(Event event)
protected boolean hasChildren(M model)
protected boolean isCheckable(Tree.TreeNode<M> node)
protected void notifyShow()
notifyShow
in class Component
protected void onAdd(StoreAddEvent<M> event)
protected void onAfterFirstAttach()
Component
onAfterFirstAttach
in class Component
protected void onCheckCascade(M model, Tree.CheckState checked)
protected void onCheckClick(Event event, Tree.TreeNode<M> node)
protected void onClear(StoreClearEvent<M> event)
protected void onClick(Event event)
protected void onCollapse(M model, Tree.TreeNode<M> node, boolean deep)
protected void onDataChanged(StoreDataChangeEvent<M> event)
protected void onDoubleClick(Event event)
protected void onExpand(M model, Tree.TreeNode<M> node, boolean deep)
protected void onFilter(StoreFilterEvent<M> se)
protected void onRemove(StoreRemoveEvent<M> se)
protected void onResize(int width, int height)
Component
protected void onScroll(Event event)
protected void onSort(StoreSortEvent<M> se)
protected void onTriCheckCascade(M model, Tree.CheckState checked)
protected void onUpdate(StoreUpdateEvent<M> event)
protected void redraw(M parent)
refresh(Object)
or
Store.update(Object)
.parent
- the parent of the items to redrawprotected SafeHtml renderChild(M parent, M child, int depth, TreeView.TreeViewRenderMode renderMode)
protected void renderChildren(M parent)
protected void unregister(M m)
protected void update()
Copyright © 2018. All rights reserved.