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

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.extjs.gxt.ui.client.widget.Component
              extended by com.extjs.gxt.ui.client.widget.BoxComponent
                  extended by com.extjs.gxt.ui.client.widget.treepanel.TreePanel<M>
Type Parameters:
M - the model type
All Implemented Interfaces:
CheckProvider<M>, Observable, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget

public class TreePanel<M extends ModelData>
extends BoxComponent
implements CheckProvider<M>

A hierarchical tree widget bound directly to a @link TreeStore. TreePanel contains no child widgets, rather, the tree is rendered based on the models contained in the tree store. Once bound, the tree will remain in sync with the bound tree store.

The text of each node can be specified in a couple of different ways. First, a display property can be set using setDisplayProperty(String). The is useful when the item's text is contained within the model's data. Second, a model string provider can be specified using setLabelProvider(ModelStringProvider).

With state enabled, TreePanel will save and restore the expand state of the nodes in the tree. A ModelKeyProvider must specified with the TreeStore this tree is bound to. Save and restore works with both local, and asynchronous loading of children.

Events:
BeforeExpand : TreePanelEvent(treePanel, item)
Fires before a node is expanded. Listeners can cancel the action by calling BaseEvent.setCancelled(boolean).
BeforeCollapse : TreePanelEvent(treePanel, item)
Fires before a node is collapsed. Listeners can cancel the action by calling BaseEvent.setCancelled(boolean).
Expand : TreePanelEvent(treePanel, item)
Fires after a node has been expanded.
Collapse : TreePanelEvent(treePanel, item)
Fires after a node is collapsed.
BeforeCheckChange : TreePanelEvent(treePanel, item)
Fires before a node's check state is changed. Listeners can cancel the action by calling BaseEvent.setCancelled(boolean).
CheckChange : TreePanelEvent(treePanel, item)
Fires after a item's check state changes.
CheckChanged : CheckChangeEvent(provider, checkedeSelection)
Fires after the tree's overall checked state changes.


Nested Class Summary
static class TreePanel.CheckCascade
          Check cascade enum.
static class TreePanel.CheckNodes
          Check nodes enum.
static class TreePanel.Joint
          Joint enum.
 class TreePanel.TreeNode
          Maintains the internal state of nodes contained in the tree.
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
protected  java.util.Map<M,java.lang.String> cache
           
protected  java.lang.String displayProperty
           
protected  boolean filtering
           
protected  java.lang.String itemSelector
           
protected  TreeLoader<M> loader
           
protected  java.util.Map<java.lang.String,TreePanel.TreeNode> nodes
           
protected  TreePanelSelectionModel<M> sm
           
protected  TreeStore<M> store
           
protected  TreePanelView<M> view
           
 
Fields inherited from class com.extjs.gxt.ui.client.widget.BoxComponent
adjustSize, cacheSizes, ensureVisibilityOnSizing, height, lastSize, layer, shim, width
 
Fields inherited from class com.extjs.gxt.ui.client.widget.Component
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
TreePanel(TreeStore<M> store)
          Creates a new tree panel.
 
Method Summary
 void addCheckListener(CheckChangedListener<M> listener)
          Adds the check change listener.
protected  TreePanel.Joint calcualteJoint(M model)
           
protected  com.google.gwt.user.client.ui.AbstractImagePrototype calculateIconStyle(M model)
           
protected  void clean()
           
protected  void clear()
           
 void collapseAll()
          Collapses all nodes.
protected  ComponentEvent createComponentEvent(com.google.gwt.user.client.Event event)
           
protected  void doClean()
           
protected  void doUpdate()
           
 void expandAll()
          Expands all nodes.
 TreePanel.TreeNode findNode(com.google.gwt.user.client.Element target)
          Returns the tree node for the given target.
protected  TreePanel.TreeNode findNode(M m)
           
protected  java.lang.String generateModelId(M m)
           
 java.util.List<M> getCheckedSelection()
          Returns the current checked selection.
 TreePanel.CheckNodes getCheckNodes()
          Returns the child nodes value which determines what node types have a check box.
 TreePanel.CheckCascade getCheckStyle()
          The check cascade style value which determines if check box changes cascade to parent and children.
protected  java.util.List<M> getChildModel(java.util.List<M> l, boolean onlyVisible)
           
protected  com.google.gwt.user.client.Element getContainer(M model)
           
 java.lang.String getDisplayProperty()
          Returns the display property.
 ModelIconProvider<M> getIconProvider()
          Returns the model icon provider.
 ModelProcessor<M> getModelProcessor()
          Returns the model processor.
 TreePanelSelectionModel<M> getSelectionModel()
          Returns the tree's selection model.
 TreeStore<M> getStore()
          Returns the tree's store.
 TreeStyle getStyle()
          Returns the tree style.
protected  java.lang.String getText(M model)
           
 TreePanelView<M> getView()
          Returns the tree's view.
protected  int getVisibleRowCount()
           
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 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(TreePanel.TreeNode 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.
 boolean isTrackMouseOver()
          Returns true if nodes are highlighted on mouse over.
protected  void notifyShow()
           
protected  void onAdd(TreeStoreEvent<M> se)
           
protected  void onAttach()
           
protected  void onCheckCascade(M model, boolean checked)
           
protected  void onCheckClick(TreePanelEvent tpe, TreePanel.TreeNode node)
           
protected  void onClear(TreeStoreEvent<M> se)
           
protected  void onClick(TreePanelEvent tpe)
           
protected  void onCollapse(M model, TreePanel.TreeNode node, boolean deep)
           
 void onComponentEvent(ComponentEvent ce)
          Any events a component receives will be forwarded to this method.
protected  void onDataChanged(TreeStoreEvent<M> se)
           
protected  void onDoubleClick(TreePanelEvent tpe)
           
protected  void onExpand(M model, TreePanel.TreeNode node, boolean deep)
           
protected  void onFilter(TreeStoreEvent<M> se)
           
protected  void onFocus(ComponentEvent ce)
           
protected  void onRemove(TreeStoreEvent<M> se)
           
protected  void onRender(com.google.gwt.user.client.Element target, int index)
          Subclasses must override and ensure setElement is called for lazy rendered components.
protected  void onResize(int width, int height)
          Called after the component 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(TreePanelEvent<M> tpe)
           
protected  void onUpdate(TreeStoreEvent<M> se)
           
protected  M prepareData(M model)
           
 void recalculate()
          Called when the component is in a LayoutContainer and the container's layout executes.
protected  void refresh(M model)
           
protected  java.lang.String register(M m)
           
 void removeCheckListener(CheckChangedListener<M> listener)
          Removes the check change listener.
protected  java.lang.String renderChild(M parent, M child, int depth, TreePanelView.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 setCaching(boolean caching)
          Sets whether the children should be cached after first being retrieved from the store (defaults to true).
 void setCheckable(boolean checkable)
          Sets whether check boxes are used in the tree.
 void setChecked(M item, boolean checked)
          Sets the check state of the item.
 void setCheckedSelection(java.util.List<M> selection)
          Sets the current checked selection.
 void setCheckNodes(TreePanel.CheckNodes checkNodes)
          Sets which tree items will display a check box (defaults to BOTH).
 void setCheckStyle(TreePanel.CheckCascade checkStyle)
          Sets the cascading behavior for check tree (defaults to PARENTS).
 void setDisplayProperty(java.lang.String displayProperty)
          Sets the display property name used to the item's text.
 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(ModelIconProvider<M> iconProvider)
          Sets the tree's model icon provider which provides the icon style for each model.
 void setLabelProvider(ModelStringProvider<M> labelProvider)
          Sets the tree's model string provider for the text description of each node.
 void setLeaf(M model, boolean leaf)
          Sets the item's leaf state.
 void setModelProcessor(ModelProcessor<M> modelProcessor)
          Sets the treepanels's model processor.
 void setSelectionModel(TreePanelSelectionModel<M> sm)
          Sets the tree's selection model.
 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(TreePanelView<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()
           
 
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent
adjustPosition, adjustSize, afterRender, getBounds, getHeight, getHeight, getPosition, getPositionEl, getResizeEl, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, hideShadow, hideShim, hideUnders, isAutoHeight, isAutoWidth, isDeferHeight, isShim, onHide, onPosition, onShow, onUnload, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize
 
Methods inherited from class com.extjs.gxt.ui.client.widget.Component
addAttachable, addListener, addPlugin, addStyleName, addStyleOnOver, addWidgetListener, applyState, assertAfterRender, assertPreRender, beforeRender, blur, clearState, createObservable, createStyles, disable, disableContextMenu, disableEvents, disableTextSelection, doAttachChildren, doDetachChildren, el, enable, enableEvents, fireEvent, fireEvent, fireEvent, fly, focus, frame, getAriaSupport, getBaseStyle, getBorders, getContextMenu, getData, getElement, getFocusEl, getFocusSupport, getHideMode, getId, getItemId, getListeners, getModel, getObservable, getPlugins, getState, getStateId, getTabIndex, getTitle, getToolTip, getWindowResizeDelay, hasListeners, hasListeners, hide, hideToolTip, initState, isDisabledEvents, isDisableTextSelection, isEnabled, isMasked, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, mask, mask, mask, notifyHide, onBrowserEvent, onDetach, onDetachHelper, onDisable, onEnable, onEnsureDebugId, onHideContextMenu, onLoad, onRightClick, onShowContextMenu, onWindowResize, previewEvent, removeAllListeners, removeAttachagle, removeFromParent, removeListener, removeStyleName, removeStyleOnOver, removeSwallow, removeToolTip, removeWidgetListener, render, render, repaint, saveState, setAriaRole, setAriaState, setAriaSupport, setBorders, setContextMenu, setData, setEl, setElement, setElement, setEnabled, setFiresEvents, setHideMode, setId, setIntStyleAttribute, setItemId, setModel, setMonitorWindowResize, setParent, setStateful, setStateId, setStyleAttribute, setStyleName, setTabIndex, setTitle, setToolTip, setToolTip, setVisible, setWindowResizeDelay, setZIndex, show, sinkEvents, swallowEvent, swallowEvent, toString, unframe, unmask
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, setLayoutData
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cache

protected java.util.Map<M extends ModelData,java.lang.String> cache

displayProperty

protected java.lang.String displayProperty

filtering

protected boolean filtering

itemSelector

protected java.lang.String itemSelector

loader

protected TreeLoader<M extends ModelData> loader

nodes

protected java.util.Map<java.lang.String,TreePanel.TreeNode> nodes

sm

protected TreePanelSelectionModel<M extends ModelData> sm

store

protected TreeStore<M extends ModelData> store

view

protected TreePanelView<M extends ModelData> view
Constructor Detail

TreePanel

public TreePanel(TreeStore<M> store)
Creates a new tree panel.

Parameters:
store - the tree store
Method Detail

addCheckListener

public void addCheckListener(CheckChangedListener<M> listener)
Description copied from interface: CheckProvider
Adds the check change listener.

Specified by:
addCheckListener in interface CheckProvider<M extends ModelData>
Parameters:
listener - the listener to be added

collapseAll

public void collapseAll()
Collapses all nodes.


expandAll

public void expandAll()
Expands all nodes.


findNode

public TreePanel.TreeNode findNode(com.google.gwt.user.client.Element target)
Returns the tree node for the given target.

Parameters:
target - the target element
Returns:
the tree node or null if no match

getCheckedSelection

public java.util.List<M> getCheckedSelection()
Description copied from interface: CheckProvider
Returns the current checked selection.

Specified by:
getCheckedSelection in interface CheckProvider<M extends ModelData>
Returns:
the checked selection

getCheckNodes

public TreePanel.CheckNodes getCheckNodes()
Returns the child nodes value which determines what node types have a check box. Only applies when check boxes have been enabled ( setCheckable(boolean).

Returns:
the child nodes value

getCheckStyle

public TreePanel.CheckCascade getCheckStyle()
The check cascade style value which determines if check box changes cascade to parent and children.

Returns:
the check cascade style

getDisplayProperty

public java.lang.String getDisplayProperty()
Returns the display property.

Returns:
the display property

getIconProvider

public ModelIconProvider<M> getIconProvider()
Returns the model icon provider.

Returns:
the icon provider

getModelProcessor

public ModelProcessor<M> getModelProcessor()
Returns the model processor.

Returns:
the model processor

getSelectionModel

public TreePanelSelectionModel<M> getSelectionModel()
Returns the tree's selection model.

Returns:
the selection model

getStore

public TreeStore<M> getStore()
Returns the tree's store.

Returns:
the store

getStyle

public TreeStyle getStyle()
Returns the tree style.

Returns:
the tree style

getView

public TreePanelView<M> getView()
Returns the tree's view.

Returns:
the view

isAutoExpand

public boolean isAutoExpand()
Returns true if auto expand is enabled.

Returns:
the auto expand state

isAutoLoad

public boolean isAutoLoad()
Returns true if auto load is enabled.

Returns:
the auto load state

isAutoSelect

public boolean isAutoSelect()
Returns true if select on load is enabled.

Returns:
the auto select state

isCaching

public boolean isCaching()
Returns 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.

Returns:
true if caching

isCheckable

public boolean isCheckable()
Returns true if check boxes are enabled.

Returns:
the check box state

isChecked

public boolean isChecked(M model)
Description copied from interface: CheckProvider
Returns true if the model is checked.

Specified by:
isChecked in interface CheckProvider<M extends ModelData>
Parameters:
model - the model
Returns:
the check state

isExpanded

public boolean isExpanded(M model)
Returns true if the model is expanded.

Parameters:
model - the model
Returns:
true if expanded

isExpandOnFilter

public boolean isExpandOnFilter()
Returns the if expand all and collapse all is enabled on filter changes.

Returns:
the expand all collapse all state

isLeaf

public boolean isLeaf(M model)
Returns 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.

Parameters:
model - the model
Returns:
the leaf state

isTrackMouseOver

public boolean isTrackMouseOver()
Returns true if nodes are highlighted on mouse over.

Returns:
true if enabled

onComponentEvent

public void onComponentEvent(ComponentEvent ce)
Description copied from class: Component
Any events a component receives will be forwarded to this method. Subclasses should override as needed. The Component.onBrowserEvent(com.google.gwt.user.client.Event) method should not be overridden or modified.

Overrides:
onComponentEvent in class Component
Parameters:
ce - the base event

recalculate

public void recalculate()
Description copied from class: Component
Called when the component is in a LayoutContainer and the container's layout executes. This method will not be called on container instances. Default implementation does nothing.

Overrides:
recalculate in class Component

removeCheckListener

public void removeCheckListener(CheckChangedListener<M> listener)
Description copied from interface: CheckProvider
Removes the check change listener.

Specified by:
removeCheckListener in interface CheckProvider<M extends ModelData>
Parameters:
listener - the listener to be removed

scrollIntoView

public void scrollIntoView(M model)
Scrolls the tree to ensure the given model is visible.

Parameters:
model - the model to scroll into view

setAutoExpand

public void setAutoExpand(boolean autoExpand)
If set to true, all non leaf nodes will be expanded automatically (defaults to false).

Parameters:
autoExpand - the auto expand state to set.

setAutoLoad

public void setAutoLoad(boolean autoLoad)
Sets whether all children should automatically be loaded recursively (defaults to false). Useful when the tree must be fully populated when initially rendered.

Parameters:
autoLoad - true to auto load

setAutoSelect

public void setAutoSelect(boolean autoSelect)
True to select the first model after the store's data changes (defaults to false).

Parameters:
autoSelect - true to auto select

setCaching

public void setCaching(boolean caching)
Sets whether the children should be cached after first being retrieved from the store (defaults to true). When false, a load request will be made each time a node is expanded.

Parameters:
caching - the caching state

setCheckable

public void setCheckable(boolean checkable)
Sets whether check boxes are used in the tree.

Parameters:
checkable - true for check boxes

setChecked

public void setChecked(M item,
                       boolean checked)
Sets the check state of the item. The checked state will only be set for nodes that have been rendered, setAutoLoad(boolean) can be used to render all children.

Parameters:
item - the item
checked - true for checked

setCheckedSelection

public void setCheckedSelection(java.util.List<M> selection)
Description copied from interface: CheckProvider
Sets the current checked selection.

Specified by:
setCheckedSelection in interface CheckProvider<M extends ModelData>
Parameters:
selection - the checked selection

setCheckNodes

public void setCheckNodes(TreePanel.CheckNodes checkNodes)
Sets which tree items will display a check box (defaults to BOTH).

Valid values are:

Parameters:
checkNodes - the child nodes value

setCheckStyle

public void setCheckStyle(TreePanel.CheckCascade checkStyle)
Sets the cascading behavior for check tree (defaults to PARENTS). When using CHILDREN, it is important to note that the cascade will only be applied to rendered nodes. setAutoLoad(boolean) can be used to fully render the tree on render.

Valid values are:

Parameters:
checkStyle - the child style

setDisplayProperty

public void setDisplayProperty(java.lang.String displayProperty)
Sets the display property name used to the item's text. As an alternative, a ModelStringProvider can be specified using setLabelProvider(ModelStringProvider).

Parameters:
displayProperty - the property name

setExpanded

public void setExpanded(M model,
                        boolean expand)
Sets the item's expand state.

Parameters:
model - the model
expand - true to expand

setExpanded

public void setExpanded(M model,
                        boolean expand,
                        boolean deep)
Sets the item's expand state.

Parameters:
model - the model
expand - true to expand
deep - true to expand all children recursively

setExpandOnFilter

public void setExpandOnFilter(boolean expandOnFilter)
Sets whether the tree should expand all and collapse all when filters are applied (defaults to true).

Parameters:
expandOnFilter - true to expand and collapse on filter changes

setIconProvider

public void setIconProvider(ModelIconProvider<M> iconProvider)
Sets the tree's model icon provider which provides the icon style for each model.

Parameters:
iconProvider - the icon provider

setLabelProvider

public void setLabelProvider(ModelStringProvider<M> labelProvider)
Sets the tree's model string provider for the text description of each node. If a a display property has been specified, it will be passed to the string provider. If a property has not been specified, null will be passed.

Parameters:
labelProvider - the label provider

setLeaf

public void setLeaf(M model,
                    boolean leaf)
Sets the item's leaf state. The leaf state allows control of the expand icon before the children have been realized.

Parameters:
model - the model
leaf - the leaf state

setModelProcessor

public void setModelProcessor(ModelProcessor<M> modelProcessor)
Sets the treepanels's model processor.

Parameters:
modelProcessor -
See Also:
ModelProcessor

setSelectionModel

public void setSelectionModel(TreePanelSelectionModel<M> sm)
Sets the tree's selection model.

Parameters:
sm - the selection model

setStyle

public void setStyle(TreeStyle style)
Sets the tree style.

Parameters:
style - the tree style

setTrackMouseOver

public void setTrackMouseOver(boolean trackMouseOver)
True to highlight nodes when the mouse is over (defaults to true).

Parameters:
trackMouseOver - true to highlight nodes on mouse over

setView

public void setView(TreePanelView<M> view)
Sets the tree's view. Only needs to be called when customizing the tree's presentation.

Parameters:
view - the view

toggle

public void toggle(M model)
Toggles the model's expand state.

Parameters:
model - the model

calcualteJoint

protected TreePanel.Joint calcualteJoint(M model)

calculateIconStyle

protected com.google.gwt.user.client.ui.AbstractImagePrototype calculateIconStyle(M model)

clean

protected void clean()

clear

protected void clear()

createComponentEvent

protected ComponentEvent createComponentEvent(com.google.gwt.user.client.Event event)
Overrides:
createComponentEvent in class BoxComponent

doClean

protected void doClean()

doUpdate

protected void doUpdate()

findNode

protected TreePanel.TreeNode findNode(M m)

generateModelId

protected java.lang.String generateModelId(M m)

getChildModel

protected java.util.List<M> getChildModel(java.util.List<M> l,
                                          boolean onlyVisible)

getContainer

protected com.google.gwt.user.client.Element getContainer(M model)

getText

protected java.lang.String getText(M model)

getVisibleRowCount

protected int getVisibleRowCount()

hasChildren

protected boolean hasChildren(M model)

isCheckable

protected boolean isCheckable(TreePanel.TreeNode node)

notifyShow

protected void notifyShow()
Overrides:
notifyShow in class Component

onAdd

protected void onAdd(TreeStoreEvent<M> se)

onAttach

protected void onAttach()
Overrides:
onAttach in class Component

onCheckCascade

protected void onCheckCascade(M model,
                              boolean checked)

onCheckClick

protected void onCheckClick(TreePanelEvent tpe,
                            TreePanel.TreeNode node)

onClear

protected void onClear(TreeStoreEvent<M> se)

onClick

protected void onClick(TreePanelEvent tpe)

onCollapse

protected void onCollapse(M model,
                          TreePanel.TreeNode node,
                          boolean deep)

onDataChanged

protected void onDataChanged(TreeStoreEvent<M> se)

onDoubleClick

protected void onDoubleClick(TreePanelEvent tpe)

onExpand

protected void onExpand(M model,
                        TreePanel.TreeNode node,
                        boolean deep)

onFilter

protected void onFilter(TreeStoreEvent<M> se)

onFocus

protected void onFocus(ComponentEvent ce)

onRemove

protected void onRemove(TreeStoreEvent<M> se)

onRender

protected void onRender(com.google.gwt.user.client.Element target,
                        int index)
Description copied from class: Component
Subclasses must override and ensure setElement is called for lazy rendered components.

Overrides:
onRender in class Component
Parameters:
target - the target element
index - the insert location

onResize

protected void onResize(int width,
                        int height)
Description copied from class: BoxComponent
Called after the component 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.

Overrides:
onResize in class BoxComponent
Parameters:
width - the width
height - the height

onScroll

protected void onScroll(TreePanelEvent<M> tpe)

onUpdate

protected void onUpdate(TreeStoreEvent<M> se)

prepareData

protected M prepareData(M model)

refresh

protected void refresh(M model)

register

protected java.lang.String register(M m)

renderChild

protected java.lang.String renderChild(M parent,
                                       M child,
                                       int depth,
                                       TreePanelView.TreeViewRenderMode renderMode)

renderChildren

protected void renderChildren(M parent)

unregister

protected void unregister(M m)

update

protected void update()