public class TreeGridView<M> extends GridView<M>
GridView
subclass that adds tree related view features.GridView.GridAppearance, GridView.GridStateStyles, GridView.GridStyles, GridView.GridTemplates
Constructor and Description |
---|
TreeGridView()
Creates a new view instance.
|
TreeGridView(GridView.GridAppearance appearance)
Creates a new view instance with the given grid appearance.
|
Modifier and Type | Method and Description |
---|---|
void |
collapse(Tree.TreeNode<M> node)
Collapses the given node.
|
void |
expand(Tree.TreeNode<M> node)
Expands the given node.
|
XElement |
getElement(Tree.TreeNode<M> node)
Gets the rendered element, if any, for the given tree node object.
|
XElement |
getElementContainer(Tree.TreeNode<M> node)
Returns the element which wraps the children of the given node.
|
Element |
getIconElement(Tree.TreeNode<M> node)
Returns the element in which the nodes icon is rendered.
|
Element |
getJointElement(Tree.TreeNode<M> node)
Returns the element in which the nodes joint (expand / collapse) icon is rendered.
|
Store.StoreSortInfo<M> |
getSortState()
Returns the grid's sort information.
|
SafeHtml |
getTemplate(M m,
String id,
SafeHtml text,
ImageResource icon,
boolean checkable,
Tree.Joint joint,
int level)
Returns the markup that is used to render a node.
|
Element |
getTextElement(Tree.TreeNode<M> node)
Returns the element in which the node's text is rendered.
|
boolean |
isSelectableTarget(Element target)
Returns true if the given element is selectable.
|
void |
onDropChange(Element e,
boolean drop) |
void |
onIconStyleChange(Tree.TreeNode<M> node,
ImageResource icon) |
void |
onJointChange(Tree.TreeNode<M> node,
Tree.Joint joint) |
void |
onLoading(Tree.TreeNode<M> node) |
void |
refresh(boolean headerToo)
Rebuilds the grid using its current configuration and data.
|
addHandler, ensureVisible, ensureVisible, findCell, findCellIndex, findRow, findRowIndex, fireEvent, focus, focusCell, focusRow, getAppearance, getAutoExpandColumn, getAutoExpandMax, getAutoExpandMin, getBody, getCell, getEditorParent, getEmptyText, getHeader, getRow, getRow, getRowBody, getRowBodyRowSpan, getScroller, getScrollState, getStateStyles, getViewConfig, isAdjustForHScroll, isAutoFill, isColumnLines, isDeferUpdates, isEnableRowBody, isForceFit, isShowDirtyCells, isSortingEnabled, isStripeRows, isTrackMouseOver, layout, scrollToTop, scrollToTop, setAdjustForHScroll, setAutoExpandColumn, setAutoExpandMax, setAutoExpandMin, setAutoFill, setColumnHeader, setColumnLines, setDeferUpdates, setEmptyText, setEnableRowBody, setForceFit, setRowBodyRowSpan, setShowDirtyCells, setSortingEnabled, setStripeRows, setTrackMouseOver, setViewConfig
public TreeGridView()
public TreeGridView(GridView.GridAppearance appearance)
appearance
- the grid appearancepublic void collapse(Tree.TreeNode<M> node)
node
- the node to be collapsedpublic void expand(Tree.TreeNode<M> node)
node
- the node to be expandedpublic XElement getElement(Tree.TreeNode<M> node)
node
- the tree node to find an element forpublic XElement getElementContainer(Tree.TreeNode<M> node)
node
- the target nodepublic Element getIconElement(Tree.TreeNode<M> node)
node
- the target nodepublic Element getJointElement(Tree.TreeNode<M> node)
node
- the target nodepublic SafeHtml getTemplate(M m, String id, SafeHtml text, ImageResource icon, boolean checkable, Tree.Joint joint, int level)
m
- the modelid
- the id of the node (store model key provider)text
- the node texticon
- the node icon or nullcheckable
- true if the node is checkedjoint
- the joint statelevel
- the tree depthpublic Element getTextElement(Tree.TreeNode<M> node)
node
- the target nodepublic boolean isSelectableTarget(Element target)
GridView
isSelectableTarget
in class GridView<M>
target
- the element to checkpublic void onDropChange(Element e, boolean drop)
public void onIconStyleChange(Tree.TreeNode<M> node, ImageResource icon)
public void onJointChange(Tree.TreeNode<M> node, Tree.Joint joint)
public void onLoading(Tree.TreeNode<M> node)
public void refresh(boolean headerToo)
GridView
public Store.StoreSortInfo<M> getSortState()
GridView
getSortState
in class GridView<M>
Copyright © 2015. All rights reserved.