M - the model typepublic class TreeGrid<M> extends Grid<M>
TreeStore.
A TreeGridCellRenderer can be assigned to the
ColumnConfig in which the tree will be displayed.
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.| Modifier and Type | Class and Description |
|---|---|
static class |
TreeGrid.TreeGridNode<M> |
Grid.Callback, Grid.GridAppearance, Grid.GridCellUIObject.DebugIdImpl, UIObject.DebugIdImplEnabledDEBUG_ID_PREFIX| Constructor and Description |
|---|
TreeGrid(TreeStore<M> store,
ColumnModel<M> cm,
ColumnConfig<M,?> treeColumn) |
TreeGrid(TreeStore<M> store,
ColumnModel<M> cm,
ColumnConfig<M,?> treeColumn,
Grid.GridAppearance appearance) |
TreeGrid(TreeStore<M> store,
ColumnModel<M> cm,
ColumnConfig<M,?> treeColumn,
Grid.GridAppearance appearance,
Tree.TreeAppearance treeAppearance) |
| Modifier and Type | Method and Description |
|---|---|
void |
collapseAll()
Collapses all nodes.
|
void |
expandAll()
Expands all nodes.
|
Tree.TreeNode<M> |
findNode(Element target)
Returns the tree node for the given target.
|
Grid.GridAppearance |
getAppearance()
Returns the grid appearance.
|
IconProvider<M> |
getIconProvider()
Returns the model icon provider.
|
TreeStyle |
getStyle()
Returns the tree style.
|
Tree.TreeAppearance |
getTreeAppearance() |
ColumnConfig<M,?> |
getTreeColumn() |
TreeLoader<M> |
getTreeLoader() |
TreeStore<M> |
getTreeStore()
Returns the tree's tree store.
|
TreeGridView<M> |
getTreeView()
Returns the tree's view.
|
boolean |
isAutoExpand()
Returns true if auto expand is enabled.
|
boolean |
isAutoLoad()
Returns true if auto load is enabled.
|
boolean |
isCaching()
Returns true when a loader is queried for it's children each time a node is
expanded.
|
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.
|
void |
reconfigure(ListStore<M> store,
ColumnModel<M> cm)
Reconfigures the grid to use a different Store and Column Model.
|
void |
reconfigure(TreeStore<M> store,
ColumnModel<M> cm,
ColumnConfig<M,?> treeColumn) |
void |
refresh(M model) |
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 |
setCaching(boolean caching)
Sets whether the children should be cached after first being retrieved from
the store (defaults to true).
|
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 |
setTreeLoader(TreeLoader<M> treeLoader) |
void |
setView(GridView<M> view)
Sets the view's grid (pre-render).
|
void |
toggle(M model)
Toggles the model's expand state.
|
addBodyScrollHandler, addCellClickHandler, addCellDoubleClickHandler, addCellMouseDownHandler, addHeaderClickHandler, addHeaderContextMenuHandler, addHeaderDoubleClickHandler, addReconfigureHandler, addRefreshHandler, addRowClickHandler, addRowDoubleClickHandler, addRowMouseDownHandler, addSortChangeHandler, addViewReadyHandler, getColumnModel, getLazyRowRender, getLoader, getMinColumnWidth, getSelectionModel, getStore, getView, isColumnLines, isColumnReordering, isColumnResize, isHideHeaders, isLoadMask, isStripeRows, isTrackMouseOver, isViewReady, onBrowserEvent, setAllowTextSelection, setColumnLines, setColumnReordering, setColumnResize, setHideHeaders, setLazyRowRender, setLoader, setLoadMask, setMinColumnWidth, setSelectionModel, setStripeRows, setTrackMouseOver, walkCellsaddBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disable, disableEvents, enable, enableEvents, fireEvent, focus, getData, getElement, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getStateId, getToolTip, hide, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isRendered, isStateful, isVisible, isVisible, mask, mask, removeHandler, removeToolTip, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setPagePosition, setPixelSize, setPosition, setShadow, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmaskaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEventsequals, getClass, hashCode, notify, notifyAll, wait, wait, waitfireEventpublic TreeGrid(TreeStore<M> store, ColumnModel<M> cm, ColumnConfig<M,?> treeColumn)
public TreeGrid(TreeStore<M> store, ColumnModel<M> cm, ColumnConfig<M,?> treeColumn, Grid.GridAppearance appearance)
public TreeGrid(TreeStore<M> store, ColumnModel<M> cm, ColumnConfig<M,?> treeColumn, Grid.GridAppearance appearance, Tree.TreeAppearance treeAppearance)
public void collapseAll()
public void expandAll()
public Tree.TreeNode<M> findNode(Element target)
target - the target elementpublic Grid.GridAppearance getAppearance()
GridgetAppearance in class Grid<M>public IconProvider<M> getIconProvider()
public TreeStyle getStyle()
public Tree.TreeAppearance getTreeAppearance()
public ColumnConfig<M,?> getTreeColumn()
public TreeLoader<M> getTreeLoader()
public TreeStore<M> getTreeStore()
public TreeGridView<M> getTreeView()
public boolean isAutoExpand()
public boolean isAutoLoad()
public boolean isCaching()
public boolean isExpanded(M model)
model - the modelpublic boolean isExpandOnFilter()
public boolean isLeaf(M model)
model - the modelpublic void reconfigure(ListStore<M> store, ColumnModel<M> cm)
Gridreconfigure in class Grid<M>store - the new storecm - the new column modelpublic void reconfigure(TreeStore<M> store, ColumnModel<M> cm, ColumnConfig<M,?> treeColumn)
public void refresh(M model)
public void setAutoExpand(boolean autoExpand)
autoExpand - the auto expand state to set.public void setAutoLoad(boolean autoLoad)
autoLoad - true to auto loadpublic void setCaching(boolean caching)
false, a load request will
be made each time a node is expanded.caching - the caching statepublic 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)
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 setTreeLoader(TreeLoader<M> treeLoader)
public void setView(GridView<M> view)
Gridpublic void toggle(M model)
model - the modelCopyright © 2012. All Rights Reserved.