public class DynamicTreeNode
extends java.lang.Object
The Dynamic Tree is similar to the Windows Explorer tree. Each node on the tree is created using a DynamicTreeNode. This contains all the data required by the client browser to render a node on the tree. This object is converted to a JavaScript object once created in your DynamicTreeUserDataBean and returned to the client browser.
The tree can be pre-cached to any number of levels by attaching children to a node.
Each node can either supply its own menu in contextMenu
or a menuType
, in which case a corresponding DynamicTreeMenuType
object must be created.
Each node may also have icons associated with it, which will be
displayed to the left of the node name on the client browser. This is done
be setting the iconType
and creating a corresponding DynamicTreeIconType
object.
Each node can set a value
assigned to it, which is different from the name
which is displayed on the client browser. This is typically set to a database ID value
or some other unique identifier to be used by your commands or buttons from another frame.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
DynamicTreeNode()
Default constructor creates a new DynamicTreeNode.
|
DynamicTreeNode(java.lang.String name,
java.lang.String childrenUrlParam,
java.lang.String[][] menu)
Creates a new DynamicTreeNode.
|
DynamicTreeNode(java.lang.String name,
java.lang.String childrenUrlParams,
java.lang.String[][] menu,
java.lang.String contextMenuParams)
Creates a new DynamicTreeNode.
|
DynamicTreeNode(java.lang.String name,
java.lang.String para,
java.lang.String[][] menu,
java.lang.String contextMenuParams,
java.util.Vector children)
Creates a new DynamicTreeNode.
|
DynamicTreeNode(java.lang.String name,
java.lang.String para,
java.lang.String[][] menu,
java.util.Vector children)
Creates a new DynamicTreeNode.
|
DynamicTreeNode(java.lang.String name,
java.lang.String value,
java.lang.String para,
java.lang.String[][] menu)
Creates a new DynamicTreeNode.
|
DynamicTreeNode(java.lang.String name,
java.lang.String value,
java.lang.String para,
java.lang.String[][] menu,
java.lang.String contextMenuParams,
java.util.Vector children)
Creates a new DynamicTreeNode.
|
DynamicTreeNode(java.lang.String name,
java.lang.String value,
java.lang.String para,
java.lang.String[][] menu,
java.util.Vector children)
Creates a new DynamicTreeNode.
|
DynamicTreeNode(java.lang.String name,
java.lang.String value,
java.lang.String para,
java.lang.String contextMenuParams,
java.lang.String menuType)
Creates a new DynamicTreeNode.
|
DynamicTreeNode(java.lang.String name,
java.lang.String value,
java.lang.String childrenUrlParams,
java.lang.String menuType,
java.util.Vector children)
Creates a new DynamicTreeNode.
|
DynamicTreeNode(java.lang.String name,
java.lang.String childrenUrlParams,
java.lang.String menuType,
java.util.Vector children)
Creates a new DynamicTreeNode.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[][] |
copyStringArray(java.lang.String[][] str)
Copies an array of String arrays into a new array of String arrays.
|
java.util.Vector |
getChildren()
Returns the children of this DynamicTreeNode.
|
java.lang.String |
getChildrenUrlParam()
Returns the childrenUrlParam field value.
|
java.lang.String[][] |
getContextMenu()
Returns the context menu.
|
java.lang.String |
getContextMenuParams()
Returns the context menu parameters which are passed with all menu item actions.
|
java.lang.String[] |
getIconType()
Returns the iconType value.
|
java.lang.String |
getMenuType()
Returns the menuType value.
|
java.lang.String |
getName()
Returns the name of this DynamicTreeNode.
|
java.lang.String |
getValue()
Returns the value of this DynamicTreeNode
|
void |
nodeToJS(java.lang.String nodeName,
java.lang.StringBuffer sb,
int i,
DynamicTreeNode child)
Converts DynamicTreeNode to JavaScript.
|
void |
setChildren(java.util.Vector newChildren)
Sets the children of this DynamicTreeNode.
|
void |
setChildrenUrlParam(java.lang.String newChildrenUrlParam)
Sets the childrenUrlParam field value.
|
void |
setContextMenu(java.lang.String[][] newContextMenu)
Sets the context menu.
|
void |
setContextMenuParams(java.lang.String newContextMenuParams)
Sets the context menu parameters which are passed with all menu item actions.
|
void |
setIconType(java.lang.String[] newIconType)
Sets the iconType value.
|
void |
setMenuType(java.lang.String newMenuType)
Sets the menuType value.
|
void |
setName(java.lang.String newName)
Sets the name of this DynamicTreeNode.
|
void |
setValue(java.lang.String newValue)
Sets the value of this DynamicTreeNode
|
public static final java.lang.String COPYRIGHT
public DynamicTreeNode()
public DynamicTreeNode(java.lang.String name, java.lang.String childrenUrlParam, java.lang.String[][] menu)
name
- The name of the DynamicTreeNode that will be displayed to the user.childrenUrlParam
- The value to be used to fetch the children of this node.menu
- The context menu array.public DynamicTreeNode(java.lang.String name, java.lang.String childrenUrlParams, java.lang.String[][] menu, java.lang.String contextMenuParams)
name
- The name of the DynamicTreeNode that will be displayed to the user.childrenUrlParam
- The value to be used to fetch the children of this node.menu
- The context menu array.contextMenuParams
- Parameters to be appended to all context menu actions calls.public DynamicTreeNode(java.lang.String name, java.lang.String para, java.lang.String[][] menu, java.lang.String contextMenuParams, java.util.Vector children)
name
- The name of the DynamicTreeNode that will be displayed to the user.para
- The value to be used to fetch the children of this node.menu
- The context menu array.contextMenuParams
- Parameters to be appended to all context menu actions calls.children
- Contains embedded children of this node.public DynamicTreeNode(java.lang.String name, java.lang.String para, java.lang.String[][] menu, java.util.Vector children)
name
- The name of the DynamicTreeNode that will be displayed to the user.para
- The value to be used to fetch the children of this node.menu
- The context menu array.children
- Contains embedded children of this node.public DynamicTreeNode(java.lang.String name, java.lang.String value, java.lang.String para, java.lang.String[][] menu)
name
- The name of the DynamicTreeNode that will be displayed to the user.value
- The value of this DynamicTreeNode.para
- The value to be used to fetch the children of this node.menu
- The context menu array.public DynamicTreeNode(java.lang.String name, java.lang.String value, java.lang.String para, java.lang.String[][] menu, java.lang.String contextMenuParams, java.util.Vector children)
name
- The name of the DynamicTreeNode that will be displayed to the user.value
- The value of this DynamicTreeNode.para
- The value to be used to fetch the children of this node.menu
- The context menu array.contextMenuParams
- Parameters to be appended to all context menu actions calls.children
- Contains embedded children of this node.public DynamicTreeNode(java.lang.String name, java.lang.String value, java.lang.String para, java.lang.String[][] menu, java.util.Vector children)
name
- The name of the DynamicTreeNode that will be displayed to the user.value
- The value of this DynamicTreeNode.para
- The value to be used to fetch the children of this node.menu
- The context menu array.children
- Contains embedded children of this node.public DynamicTreeNode(java.lang.String name, java.lang.String value, java.lang.String para, java.lang.String contextMenuParams, java.lang.String menuType)
name
- The name of the DynamicTreeNode that will be displayed to the user.value
- The value of this DynamicTreeNode.para
- The value to be used to fetch the children of this node.contextMenuParams
- Parameters to be appended to all context menu actions calls.menuType
- The name of the corresponding DynamicTreeMenuType.public DynamicTreeNode(java.lang.String name, java.lang.String value, java.lang.String childrenUrlParams, java.lang.String menuType, java.util.Vector children)
name
- The name of the DynamicTreeNode that will be displayed to the user.value
- The value of this DynamicTreeNode.childrenUrlParam
- The value to be used to fetch the children of this node.menuType
- The name of the corresponding DynamicTreeMenuType.children
- Contains embedded children of this node.public DynamicTreeNode(java.lang.String name, java.lang.String childrenUrlParams, java.lang.String menuType, java.util.Vector children)
name
- The name of the DynamicTreeNode that will be displayed to the user.childrenUrlParam
- The value to be used to fetch the children of this node.menuType
- The name of the corresponding DynamicTreeMenuType.children
- Contains embedded children of this node.public java.lang.String[][] copyStringArray(java.lang.String[][] str)
Typically used by the constructor to create new Strings for the array of String arrays referenced as a parameter. argument to create a fresh copy of the Strings.
str
- The array of String arrays.public java.util.Vector getChildren()
public java.lang.String getChildrenUrlParam()
public java.lang.String[][] getContextMenu()
public java.lang.String getContextMenuParams()
public java.lang.String[] getIconType()
public java.lang.String getMenuType()
public java.lang.String getName()
public java.lang.String getValue()
public void nodeToJS(java.lang.String nodeName, java.lang.StringBuffer sb, int i, DynamicTreeNode child)
public void setChildren(java.util.Vector newChildren)
newChildren
- The Vector of embedded children.public void setChildrenUrlParam(java.lang.String newChildrenUrlParam)
newChildrenUrlParam
- The childrenUrlParam value.public void setContextMenu(java.lang.String[][] newContextMenu)
newContextMenu
- The context menu array of String arrays.public void setContextMenuParams(java.lang.String newContextMenuParams)
newContextMenuParams
- The contextMenuParams value.public void setIconType(java.lang.String[] newIconType)
newIconType
- The iconType name.public void setMenuType(java.lang.String newMenuType)
newMenuType
- The menuType name.public void setName(java.lang.String newName)
newName
- The name value.public void setValue(java.lang.String newValue)
newValue
- The value of this DynamicTreeNode.