|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.BoxComponent
com.extjs.gxt.ui.client.widget.Container<TreeItem>
com.extjs.gxt.ui.client.widget.tree.Tree
public class Tree
A standard hierarchical tree widget. The tree contains a hierarchy of
TreeItems that the user can open, close, and select.
doit field to false to cancel the action.doit
field to false to cancel the action.doit
field to false to cancel the expand.doit field to false to cancel the collapse.
| Nested Class Summary | |
|---|---|
static class |
Tree.CheckCascade
Check cascade enum. |
static class |
Tree.CheckNodes
Check nodes enum. |
| 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 |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
Tree()
Creates a new single select tree. |
|
| Method Summary | |
|---|---|
void |
collapseAll()
Collapses all item's. |
void |
expandAll()
Expands all item's. |
boolean |
expandPath(java.lang.String path)
Expands a specified path. |
TreeItem |
findItem(com.google.gwt.user.client.Element element)
Returns the tree whose element or child elements match the passed target. |
java.util.List<TreeItem> |
getAllItems()
Returns all tree item's contained by the tree. |
boolean |
getAnimate()
Returns true if animations are enabled. |
boolean |
getCheckable()
Returns true if check boxs are enabled. |
java.util.List<TreeItem> |
getChecked()
Returns a list of id's for all checked items. |
Tree.CheckNodes |
getCheckNodes()
Returns the child nodes value. |
Tree.CheckCascade |
getCheckStyle()
The check style value. |
Menu |
getContextMenu()
Returns the component's context menu. |
int |
getIndentWidth()
Returns the indent width. |
TreeItem |
getItem(int index)
Returns the item at the given index or null if index out of bounds. |
TreeItem |
getItemById(java.lang.String id)
Returns the item by id. |
java.lang.String |
getItemIconStyle()
Returns the item icon style. |
java.lang.String |
getNodeIconStyle()
Returns the node icon style. |
java.lang.String |
getOpenNodeIconStyle()
Returns the open node icon style. |
TreeItem |
getRootItem()
Returns the tree's root item. |
TreeItem |
getSelectedItem()
Returns the selected item. |
java.util.List<TreeItem> |
getSelectedItems()
Returns the selected items. |
Style.SelectionMode |
getSelectionMode()
|
TreeSelectionModel |
getSelectionModel()
Returns the tree's selection model. |
void |
onComponentEvent(ComponentEvent ce)
Any events a component receives will be forwarded to this method. |
void |
onSelectChange(TreeItem item,
boolean select)
Called when the visual state of a item is changed. |
boolean |
removeAll()
Removes all the container's items. |
void |
setAnimate(boolean animate)
Sets whether expand /collapse should be animated (defaults to true). |
void |
setCheckable(boolean checkable)
Sets whether checkboxes are used in the tree. |
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 |
setContextMenu(Menu menu)
Sets the component's context menu. |
void |
setIndentWidth(int indentWidth)
Sets the number of pixels child items are indented. |
void |
setItemIconStyle(java.lang.String itemImageStyle)
Sets the global icon style for leaf tree items. |
void |
setNodeIconStyle(java.lang.String nodeIconStyle)
The global icon style for tree items with children (defaults to 'tree-folder'). |
void |
setOpenNodeIconStyle(java.lang.String openNodeIconStyle)
Sets the global icon style for expanded tree items (defaults to 'tree-folder-open'). |
void |
setSelectedItem(TreeItem item)
Selects the item. |
void |
setSelectedItems(java.util.List<TreeItem> items)
Selects the items. |
void |
setSelectionMode(Style.SelectionMode mode)
Sets the table's selection mode. |
void |
setSelectionModel(TreeSelectionModel sm)
Sets the tree's selection model. |
| Methods inherited from class com.extjs.gxt.ui.client.widget.Container |
|---|
getItemByItemId, getItemCount, getItems, getWidget, indexOf, iterator, scrollIntoView |
| Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
|---|
getBounds, getHeight, getHeight, getPosition, getShadow, getSize, getWidth, getWidth, isAutoHeight, isAutoWidth, isDeferHeight, isShim, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShim, setSize, setSize, setWidth, setWidth |
| Methods inherited from class com.extjs.gxt.ui.client.widget.Component |
|---|
addListener, addStyleName, addWidgetListener, disable, disableEvents, disableTextSelection, el, enable, enableEvents, fireEvent, fireEvent, fireEvent, fly, focus, getBaseStyle, getBorders, getData, getData, getElement, getId, getItemId, getModel, getState, getToolTip, hide, hideToolTip, isEnabled, isRendered, isVisible, onBrowserEvent, recalculate, removeAllListeners, removeFromParent, removeListener, removeStyleName, removeWidgetListener, render, render, saveState, setBorders, setData, setData, setElement, setEnabled, setEnableState, setId, setIntStyleAttribute, setItemId, setStyleAttribute, setStyleName, setTitle, setToolTip, setToolTip, setVisible, show, toString |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
getParent, isAttached |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Tree()
| Method Detail |
|---|
public void collapseAll()
public void expandAll()
public boolean expandPath(java.lang.String path)
TreeItem.getPath().
path - the path to expand
true if all paths expandedpublic TreeItem findItem(com.google.gwt.user.client.Element element)
findItem in class Container<TreeItem>element - the target element
null if no matchpublic java.util.List<TreeItem> getAllItems()
public boolean getAnimate()
public boolean getCheckable()
public java.util.List<TreeItem> getChecked()
public Tree.CheckNodes getCheckNodes()
public Tree.CheckCascade getCheckStyle()
public Menu getContextMenu()
Component
public int getIndentWidth()
public TreeItem getItem(int index)
Container
getItem in class Container<TreeItem>index - the index
public TreeItem getItemById(java.lang.String id)
id - the id of the element to return
public java.lang.String getItemIconStyle()
public java.lang.String getNodeIconStyle()
public java.lang.String getOpenNodeIconStyle()
public TreeItem getRootItem()
public TreeItem getSelectedItem()
getSelectedItem in interface Selectable<TreeItem>public java.util.List<TreeItem> getSelectedItems()
getSelectedItems in interface Selectable<TreeItem>public Style.SelectionMode getSelectionMode()
public TreeSelectionModel getSelectionModel()
public void onComponentEvent(ComponentEvent ce)
ComponentComponent.onBrowserEvent(com.google.gwt.user.client.Event) method
should not be overridden or modified.
onComponentEvent in class Componentce - the base event
public void onSelectChange(TreeItem item,
boolean select)
Selectable
onSelectChange in interface Selectable<TreeItem>item - the itemselect - the select statepublic boolean removeAll()
Container
removeAll in class Container<TreeItem>public void setAnimate(boolean animate)
animate - the animate statepublic void setCheckable(boolean checkable)
checkable - true for checkboxespublic void setCheckNodes(Tree.CheckNodes checkNodes)
Valid values are:
checkNodes - the child nodes valuepublic void setCheckStyle(Tree.CheckCascade checkStyle)
Valid values are:
checkStyle - the child stylepublic void setContextMenu(Menu menu)
Component
menu - the context menupublic void setIndentWidth(int indentWidth)
indentWidth - the indent widthpublic void setItemIconStyle(java.lang.String itemImageStyle)
itemImageStyle - the image stylepublic void setNodeIconStyle(java.lang.String nodeIconStyle)
nodeIconStyle - the node icon stylepublic void setOpenNodeIconStyle(java.lang.String openNodeIconStyle)
openNodeIconStyle - the open node icon stylepublic void setSelectedItem(TreeItem item)
Selectable
setSelectedItem in interface Selectable<TreeItem>item - the item to selectpublic void setSelectedItems(java.util.List<TreeItem> items)
Selectable
setSelectedItems in interface Selectable<TreeItem>items - the items to selectpublic void setSelectionMode(Style.SelectionMode mode)
mode - the selection modepublic void setSelectionModel(TreeSelectionModel sm)
sm - the tree selection model
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||