|
|||||||||
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.gwtext.client.widgets.Component
com.gwtext.client.widgets.BoxComponent
com.gwtext.client.widgets.Container
com.gwtext.client.widgets.Panel
com.gwtext.client.widgets.tree.TreePanel
public class TreePanel
A Tree widget.
Nested Class Summary |
---|
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.gwtext.client.widgets.Component |
---|
config, id |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
TreePanel()
|
|
TreePanel(com.google.gwt.core.client.JavaScriptObject jsObj)
|
|
TreePanel(java.lang.String title)
Construct a new TreePanel. |
Method Summary | |
---|---|
void |
addListener(TreePanelListener listener)
Add a TreePanel listener. |
void |
collapseAll()
Collapse all nodes. |
protected com.google.gwt.core.client.JavaScriptObject |
create(com.google.gwt.core.client.JavaScriptObject config)
|
void |
expandAll()
Expand all nodes. |
void |
expandPath(java.lang.String path,
NodeExpansionCallback cb)
Expands a specified path in this TreePanel. |
TreeNode[] |
getChecked()
Return an array of checked TreeNodes starting from the root node. |
TreeNode[] |
getChecked(TreeNode startNode)
Return an array of checked TreeNodes starting from the specified startNode. |
protected com.google.gwt.core.client.JavaScriptObject |
getConfigPrototype()
|
TreeDragZone |
getDragZone()
The dragZone used by this tree if drag is enabled. |
TreeDropZone |
getDropZone()
The dropZone used by this tree if drop is enabled. |
TreeLoader |
getLoader()
Retrun the TreeLoader associated with the TreePanel. |
TreeNode |
getNodeById(java.lang.String id)
Gets a node in this tree by its ID. |
TreeNode |
getRootNode()
Returns the root node for this tree. |
TreeSelectionModel |
getSelectionModel()
Return the TreePanel's selection model. |
Tree |
getTree()
Return the underlying Tree data structure backing the TreePanel. |
boolean |
getUseArrows()
True to use Vista-style arrows in the tree (defaults to false) |
java.lang.String |
getXType()
Gets the xtype for this component as registered with ComponentMgr. |
protected void |
initComponent()
This template method is called after the Component has been instantiated but before it's rendered. |
void |
selectPath(java.lang.String path,
NodeSelectionCallback cb)
Selects the node in this tree at the specified path. |
void |
setAnimate(boolean animate)
True to enable animated expand/collapse. |
void |
setContainerScroll(boolean containerScroll)
True to register this container with ScrollManager. |
void |
setDdAppendOnly(java.lang.String ddAppendOnly)
True if the tree should only allow append drops (use for trees which are sorted). |
void |
setDdGroup(java.lang.String ddGroup)
The DD group this TreePanel belongs to (defaults to 'TreeDD'). |
void |
setDdScroll(boolean ddScroll)
True to enable body scrolling |
void |
setDropConfig(TreeDropZone dropConfig)
Custom config to pass to the TreeDropZone instance. |
void |
setEnableDD(boolean enableDD)
True to enable drag and drop. |
void |
setEnableDrag(boolean enableDrag)
True to enable just drag. |
void |
setEnableDrop(boolean enableDrop)
True to enable just drop. |
void |
setHlColor(java.lang.String hlColor)
The color of the node highlight (defaults to C3DAF9). |
void |
setHlDrop(boolean hlDrop)
False to disable node highlight on drop. |
void |
setLayout(ContainerLayout layout)
The layout type to be used in this container. |
void |
setLines(boolean lines)
False to disable tree lines (defaults to true). |
void |
setLoader(TreeLoader loader)
A TreeLoader for use with this TreePanel. |
void |
setPathSeparator(java.lang.String separator)
Set the token used to separate sub-paths in path strings (defaults to '/'). |
void |
setRootNode(Node node)
|
void |
setRootVisible(boolean rootVisible)
False to hide the root node (defaults to true). |
void |
setSelectionModel(TreeSelectionModel selectionModel)
Set the Tree seelction model |
void |
setSingleExpand(boolean singleExpand)
True if only 1 node per branch may be expanded. |
void |
setUseArrows(boolean useArrows)
True to use Vista-style arrows in the tree (defaults to false) |
Methods inherited from class com.gwtext.client.widgets.Container |
---|
add, add, add, add, addListener, bubble, cascade, clear, doLayout, doLayout, findBy, findByID, findByType, getActiveItem, getActiveItemID, getAutoDestroy, getBufferResize, getComponent, getComponent, getComponents, getHideBorders, getItems, getLayout, getMonitorResize, insert, iterator, remove, remove, remove, remove, removeAll, removeAll, setActiveItem, setActiveItemID, setAutoDestroy, setBufferResize, setDefaults, setHideBorders, setMonitorResize |
Methods inherited from class com.gwtext.client.widgets.BoxComponent |
---|
addListener, doOnRender, doOnRender, getAutoHeight, getAutoWidth, getBox, getBox, getHeight, getPosition, getPosition, getSize, getWidth, setAutoHeight, setAutoWidth, setHeight, setHeight, setPagePosition, setPosition, setSize, setSize, setWidth, setWidth, syncSize, updateBox |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, setElement, setPixelSize, setStyleName, setStyleName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TreePanel()
public TreePanel(com.google.gwt.core.client.JavaScriptObject jsObj)
public TreePanel(java.lang.String title)
title
- the tree panel titleMethod Detail |
---|
protected com.google.gwt.core.client.JavaScriptObject getConfigPrototype()
getConfigPrototype
in class Panel
public java.lang.String getXType()
Component
TextField field = new TextField();
field.getXType() returns "textfield"
getXType
in class Panel
protected void initComponent()
Component
initComponent
in class Component
protected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)
create
in class Panel
public TreeDragZone getDragZone()
public TreeDropZone getDropZone()
public Tree getTree()
public void collapseAll()
public void expandAll()
public void expandPath(java.lang.String path, NodeExpansionCallback cb)
Node.getPath()
path
- the pathcb
- the callback to call when the expand is completepublic TreeNode[] getChecked()
public TreeNode[] getChecked(TreeNode startNode)
startNode
- the node to start from
public TreeLoader getLoader()
public TreeNode getNodeById(java.lang.String id)
id
- the node ID
public void setLayout(ContainerLayout layout)
Container
setLayout
in class Container
layout
- the layout to usepublic TreeNode getRootNode()
public void selectPath(java.lang.String path, NodeSelectionCallback cb)
Node.getPath()
.
path
- the pathcb
- the callback to call when the selection is completepublic void setRootNode(Node node)
public TreeSelectionModel getSelectionModel()
public void setPathSeparator(java.lang.String separator)
separator
- the path separatorpublic void addListener(TreePanelListener listener)
listener
- the listenerpublic void setAnimate(boolean animate) throws java.lang.IllegalStateException
animate
- true to enable enimation.
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setContainerScroll(boolean containerScroll) throws java.lang.IllegalStateException
containerScroll
- true to register this container with ScrollManager
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setDdAppendOnly(java.lang.String ddAppendOnly) throws java.lang.IllegalStateException
ddAppendOnly
- true to allow only append drops
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setDdGroup(java.lang.String ddGroup) throws java.lang.IllegalStateException
ddGroup
- the DD group
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setDdScroll(boolean ddScroll) throws java.lang.IllegalStateException
ddScroll
- true to enable body scrolling.
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setDropConfig(TreeDropZone dropConfig) throws java.lang.IllegalStateException
TreeDropZone
instance.
dropConfig
- the drop config
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setEnableDD(boolean enableDD) throws java.lang.IllegalStateException
enableDD
- true to enable drag and drop
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setEnableDrag(boolean enableDrag) throws java.lang.IllegalStateException
enableDrag
- true to enable just drag
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setEnableDrop(boolean enableDrop) throws java.lang.IllegalStateException
enableDrop
- true to enable just drop
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setHlColor(java.lang.String hlColor) throws java.lang.IllegalStateException
hlColor
- the color of the node highlight
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setHlDrop(boolean hlDrop) throws java.lang.IllegalStateException
hlDrop
- false to disable drop drop highlight
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setLines(boolean lines) throws java.lang.IllegalStateException
lines
- false to disable tree lines
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setLoader(TreeLoader loader) throws java.lang.IllegalStateException
loader
- the tree loader
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setRootVisible(boolean rootVisible) throws java.lang.IllegalStateException
rootVisible
- false to hide the root node
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setSelectionModel(TreeSelectionModel selectionModel) throws java.lang.IllegalStateException
selectionModel
- the selection model
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setSingleExpand(boolean singleExpand) throws java.lang.IllegalStateException
singleExpand
- true if only 1 node per branch may be expanded
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setUseArrows(boolean useArrows)
useArrows
- true to use Vista-style arrows in the tree (defaults to false)
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic boolean getUseArrows()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |