java.lang.Object | |
↳ | com.microstrategy.web.app.gui.TreeNode |
The TreeNode
is the class used by the TreeBox
to
identify a single node.
Users create an Array
of TreeNode
objects and pass
the corresponding Enumeration
to the TreeBox
.
The enumeration represents a single level in a hierarchal tree.
The TreeNode
class is also used by the TreeView
to
identify a single node.
In either case users populate the TreeView with TreeNodes to render a tree. The TreeView has a root node by default to which the user can add more TreeNodes as children which themselves can have children and thus renprest a tree structure.
For each node, the user needs to specify:
WebEvent
(to expand the node).
When a node is expanded, the associated WebEvent
is executed using
the iFrame technology. With this, the tree can be dynamically populated
without refreshing the whole page.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TreeNode() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addChild(int index, TreeNode child)
this method adds a child node at a specifc index position
| ||||||||||
void | addChild(TreeNode child) | ||||||||||
void | addExtraArgument(String key, String value) | ||||||||||
boolean |
canMultiSelect()
Determines if this node can be used in multiselection or not.
| ||||||||||
int | compareTo(Object obj) | ||||||||||
boolean | equals(Object o) | ||||||||||
HashList |
extraArguments()
Function that returns a
HashList object, that will represent a set
of {argument key, argument value} pairs. | ||||||||||
TreeNode | getChild(int i) | ||||||||||
int | getChildCount() | ||||||||||
String | getCssClass() | ||||||||||
String |
getDisplayName()
Function that returns the name the text that will be displayed in the tree node.
| ||||||||||
String |
getID()
Function that returns the ID of the tree node.
| ||||||||||
int |
getLevel()
This method is deprecated.
Add children to the TreeNode using (@link TreeNode#addChild(TreeNode)} to get multiple levels.
| ||||||||||
String |
getNodeImage()
Function that gets the image used to represent the tree node.
| ||||||||||
TreeNode | getParent() | ||||||||||
boolean | getSelected() | ||||||||||
boolean | getShouldRenderIcon() | ||||||||||
int |
getType()
This method is deprecated.
You should assign the "tp" attribute directly as part of the extraArguments.
| ||||||||||
boolean |
getUseIFrame()
Indicates whether the instance uses IFrames for its link.
| ||||||||||
String |
getValue()
This method is deprecated.
You should assign the "val" attribute directly as part of the extraArguments.
| ||||||||||
WebEvent |
getWebEvent()
Function that returns the
WebEvent object associated with the tree node. | ||||||||||
boolean | hasChildren() | ||||||||||
int | hashCode() | ||||||||||
boolean |
isExpanded()
Function that specifies whether the tree node is expanded or collapsed.
| ||||||||||
boolean |
isLeaf()
Function that specifies whether the tree node is a leaf or not.
| ||||||||||
void | removeChild(String id) | ||||||||||
void |
setCssClass(String value)
This sets a css style name for the image that is associated with this tree node.
| ||||||||||
void |
setDisplayName(String displayName)
Function that sets the name that will be displayed in the tree node.
| ||||||||||
void |
setExpanded(boolean expanded)
Function that sets whether the tree is expanded or collapsed.
| ||||||||||
void |
setID(String id)
Function that sets the ID of the tree node.
| ||||||||||
void |
setLeaf(boolean leaf)
Function that sets whether the tree node is a leaf or not.
| ||||||||||
void |
setLevel(int level)
This method is deprecated.
Add children to the TreeNode using (@link TreeNode#addChild(TreeNode)} to get multiple levels.
| ||||||||||
void |
setMultiSelect(boolean value)
Determines if this node can be used in multiselection or not.
| ||||||||||
void |
setNodeImage(String imagePath)
Function that sets the image used to represent the tree node.
| ||||||||||
void | setParent(TreeNode parent) | ||||||||||
void | setSelected(boolean selected) | ||||||||||
void | setShouldRenderIcon(boolean displayIcon) | ||||||||||
void |
setType(int type)
This method is deprecated.
You should assign the "tp" attribute directly as part of the extraArguments.
| ||||||||||
void |
setUseIFrame(boolean value)
Sets whether a ReportFrameElement should use IFrames in its output.
| ||||||||||
void |
setValue(String value)
This method is deprecated.
You should assign the "val" attribute directly as part of the extraArguments.
| ||||||||||
void |
setWebEvent(WebEvent event)
Function that sets the
WebEvent object associated with the tree node. | ||||||||||
void | sortChildren() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
this method adds a child node at a specifc index position
index | int the index of the position where we want the child node to be placed among its siblings |
---|---|
child | TreeNode the child tree node to be added |
Determines if this node can be used in multiselection or not.
true
, this node can be used for multiselection.Function that returns a HashList
object, that will represent a set
of {argument key, argument value} pairs.
For example, if the user wants to add an argument to represent whether the
node is locked or not, then the key will be the argument name "locked" and
the value will be an Integer object representing whether is locked or not.
HashList
object with the extra arguments used by the tree node.
Function that returns the name the text that will be displayed in the tree node.
Function that returns the ID of the tree node.
This method is deprecated.
Add children to the TreeNode using (@link TreeNode#addChild(TreeNode)} to get multiple levels.
Function that returns the level of indentation of the tree node in the tree.
Function that gets the image used to represent the tree node.
This method is deprecated.
You should assign the "tp" attribute directly as part of the extraArguments.
Function that returns the type of object represented by the tree node.
Indicates whether the instance uses IFrames for its link. If useIFrame has not been explicitly set, it will always use iFrame for nodes and not use iFrame for leafs.
true
if it uses IFrames.
This method is deprecated.
You should assign the "val" attribute directly as part of the extraArguments.
Function that returns the value of the tree node.
Function that specifies whether the tree node is expanded or collapsed.
Function that specifies whether the tree node is a leaf or not.
This sets a css style name for the image that is associated with this tree node. Please note that inorder to use this css style, the nodeImage has to be set using the setNodeImage method. Otherwise the class attribute is not rendered
Function that sets the name that will be displayed in the tree node.
displayName | the name to display in the tree. |
---|
Function that sets whether the tree is expanded or collapsed.
expanded | specifies whether the tree is expanded or collapsed. |
---|
Function that sets the ID of the tree node.
id | the ID of the tree node. |
---|
Function that sets whether the tree node is a leaf or not.
leaf | specifies whether the tree node is a leaf or not. |
---|
This method is deprecated.
Add children to the TreeNode using (@link TreeNode#addChild(TreeNode)} to get multiple levels.
Function that sets the level of indentation of the tree node in the tree.
level | number that specifies the indentation of the tree node in the tree. |
---|
Determines if this node can be used in multiselection or not.
value | if true , this node can be used for multiselection. |
---|
Function that sets the image used to represent the tree node.
imagePath | the image used to represent the tree node. |
---|
This method is deprecated.
You should assign the "tp" attribute directly as part of the extraArguments.
Function that sets the type of object represented by the tree node.
type | the type of object represented by the tree node. |
---|
Sets whether a ReportFrameElement should use IFrames in its output.
value | true if IFrrames are enabled. |
---|
This method is deprecated.
You should assign the "val" attribute directly as part of the extraArguments.
Function that sets the value of the tree node.
value | the value of the tree node. |
---|