|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.servlet.tbeans.models.TreeNode
public class TreeNode
The TreeNode model creates nodes that can be used to create a hierarchical structure. These nodes can be used in the TreeModel used by the TreeView, which in turn can be used to display things such as organizational charts or other hierarchical structures.
TreeView,
Node,
TreeNodeInterface,
Serialized Form| Field Summary |
|---|
| Fields inherited from interface com.sas.servlet.tbeans.html.TreeViewStyleKeysInterface |
|---|
TREEVIEW_BACKGROUND_IMAGE, TREEVIEW_BACKGROUND_IMAGE1, TREEVIEW_CURSOR_HAND, TREEVIEW_DESCRIPTION, TREEVIEW_DISABLED, TREEVIEW_DIV_IMAGE_SPACE, TREEVIEW_FLOAT, TREEVIEW_IMAGE, TREEVIEW_IMAGE_SPACE, TREEVIEW_LINK, TREEVIEW_LINKACTIVE, TREEVIEW_PANE, TREEVIEW_SELECTED, TREEVIEW_TABLE, TREEVIEW_TEXT |
| Constructor Summary | |
|---|---|
TreeNode()
Default constructor of TreeNode |
|
TreeNode(java.lang.String text)
Constructor of TreeNode |
|
TreeNode(java.lang.String name,
java.lang.String text)
Constructor of TreeNode |
|
TreeNode(java.lang.String name,
java.lang.String text,
java.lang.String url)
Constructor of TreeNode |
|
TreeNode(java.lang.String name,
java.lang.String text,
java.lang.String url,
java.lang.String defaultImage,
java.lang.String expandedImage)
Constructor of TreeNode |
|
| Method Summary | |
|---|---|
java.lang.String |
getAccessKey()
Returns the accesskey for URL accessibility. |
java.lang.String |
getDefaultImage()
Returns the name of the default image. |
java.lang.String |
getDefaultImageAltText()
Returns the text which is to be used as alternate to an image. |
java.lang.String |
getDescription()
Returns the description of this node. |
java.lang.String |
getDeselectNodeFunctionName()
Gets the name of a JavaScript function which will be called to deselect a node. |
java.lang.String |
getDisabledImage()
Returns the name of the image to be displayed when the node is disabled. |
java.lang.String |
getDisabledImageAltText()
getDisabledImageAltText returns the text which is to be used as alternate to an image. |
java.lang.String |
getExpandedImage()
Returns the name of the expanded image. |
java.lang.String |
getExpandedImageAltText()
Returns the alternate text to the expanded image. |
java.lang.String |
getImageLocation()
If present this property overrides the imageLocation property of the TreeView. |
java.lang.String |
getName()
Returns the name of the node. |
java.lang.String |
getNodeCellStyleClass()
Gets the node cell style class on the node. |
java.lang.String |
getNodeCellStyleKey()
Gets the node cell style key on the node. |
java.lang.String |
getNodeExpandedText()
Returns the value of the nodeExpandedText property. |
java.lang.String |
getNodeText()
Returns the value of the nodeText property. |
java.lang.String |
getPostExpandNodeFunctionName()
Gets the name of a user-supplied JavaScript function which will be called after the node expansion executes. |
java.lang.String |
getPostSelectNodeFunctionName()
Gets the name of a user-supplied JavaScript function which will be called after the normal select behavior executes when a node is selected. |
java.lang.String |
getPreExpandNodeFunctionName()
Gets the name of a user-supplied JavaScript function which will be called before the node expansion executes. |
java.lang.String |
getPreSelectNodeFunctionName()
Gets the name of a user-supplied JavaScript function which will be called prior to normal select behavior when a node is selected. |
java.lang.String |
getRendererFunctionName()
Gets the name of the JavaScript function which will be called to render a node. |
java.lang.String |
getSelectNodeFunctionName()
Gets the name of a JavaScript function which will be called to select a node. |
TreeNodeInterface |
getSourceParent()
Return the source parent of the node, which is the parent in a source tree where it originally came from if it was moved. |
java.lang.String |
getStyleClassPrefix()
If present this property overrides the styleClassPrefix property of the TreeView. |
java.util.Map |
getStyleMap()
Returns a Map that contains all the Style information for a component |
int |
getTabIndex()
Returns the tab order value of the node. |
java.lang.String |
getTarget()
Returns the value of the target= argument used on the anchor tags generated. |
java.lang.String |
getText()
Returns the text associated with the node. |
java.lang.String |
getTitle()
Returns the title to the URL link in the viewer, usually shown as a tooltip. |
java.lang.String |
getURL()
Returns the url associated with the node. |
boolean |
isEnabled()
Get the enabled state of the node, which determines the icon and style used for the node. |
boolean |
isExpanded()
Returns the boolean value which indicates whether a node is expanded. |
boolean |
isLastNode()
Returns the boolean value which determines if a node is the last node in a set of children. |
void |
setAccessKey(java.lang.String accessKey)
Sets the accesskey if a URL link is being used. |
void |
setDefaultImage(java.lang.String image)
Sets the name of the default image. |
void |
setDefaultImageAltText(java.lang.String defaultImageAltText)
Sets the text which is to be used as alternate to an image. |
void |
setDescription(java.lang.String desc)
Sets the description associated with this node. |
void |
setDeselectNodeFunctionName(java.lang.String deselect)
Sets the name of a JavaScript function which will be called to deselect a node. |
void |
setDisabledImage(java.lang.String image)
Sets the name of the image to be displayed when the node is disabled. |
void |
setDisabledImageAltText(java.lang.String disabledImageAltText)
setDisabledImageAltText sets the alternate text to the disabled image in the viewer. |
void |
setEnabled(boolean enabled)
Set the enabled state of the node, which will change the icon and style used for a disabled node. |
void |
setExpanded(boolean state)
Sets the expanded state of the node. |
void |
setExpandedImage(java.lang.String image)
Returns the name of the expanded image. |
void |
setExpandedImageAltText(java.lang.String expandedImageAltText)
Sets the alternate text to the expanded image in the viewer. |
void |
setImageLocation(java.lang.String imageLocation)
If present this property overrides the imageLocation property of the TreeView. |
void |
setLastNode(boolean lastNode)
Sets a flag to determine if a node is the last node of a set of children. |
void |
setName(java.lang.String name)
Sets the name of the node object. |
void |
setNodeCellStyleClass(java.lang.String styleClass)
Sets the node cell style class on the node. |
void |
setNodeCellStyleKey(java.lang.String styleKey)
Sets the node cell style key on the node. |
void |
setPostExpandNodeFunctionName(java.lang.String postexpand)
Sets the name of a user-supplied JavaScript function which will be called after node expansion executes. |
void |
setPostSelectNodeFunctionName(java.lang.String postselect)
Sets the name of a user-supplied JavaScript function which will be called after the normal select behavior executes when a node is selected. |
void |
setPreExpandNodeFunctionName(java.lang.String preexpand)
Sets the name of a user-supplied JavaScript function which will be called before node expansion executes. |
void |
setPreSelectNodeFunctionName(java.lang.String preselect)
Sets the name of a user-supplied JavaScript function which will be called prior to normal select behavior when a node is selected. |
void |
setRendererFunctionName(java.lang.String renderer)
Sets the name of a JavaScript function which will be called to render a node. |
void |
setSelectNodeFunctionName(java.lang.String select)
Sets the name of a JavaScript function which will be called to select a node. |
void |
setSourceParent(TreeNodeInterface sourceParent)
Set the source parent of the node, which is the parent in a source tree where it originally came from if it was moved. |
void |
setStyleClassPrefix(java.lang.String styleClassPrefix)
If present this property overrides the styleClassPrefix property of the TreeView. |
void |
setTabIndex(int tabIndex)
Sets the tabbing order for access in viewer. |
void |
setTarget(java.lang.String target)
Sets the value of the target= argument used on the anchor tags generated. |
void |
setText(java.lang.String text)
Sets the text associated with the node. |
void |
setTitle(java.lang.String title)
Sets the title to the URL link in the viewer, usually shown as a tooltip. |
void |
setURL(java.lang.String url)
Sets the url associated with node. |
| Methods inherited from class com.sas.servlet.tbeans.models.Node |
|---|
addItems, getIndex, getNodeType, getNodeTypes, getObjectData, isExternalUpdateSupported, setExternalUpdateSupported, setNodeExpandedText, setNodeText, setNodeType, setObjectData, toString |
| Methods inherited from interface com.sas.servlet.tbeans.models.NodeInterface |
|---|
getNodeType |
| Constructor Detail |
|---|
public TreeNode()
public TreeNode(java.lang.String name,
java.lang.String text,
java.lang.String url,
java.lang.String defaultImage,
java.lang.String expandedImage)
name - the name of the TreeNode object that is createdtext - the text to display in treeurl - the url to associate with the nodedefaultImage - the image to display when folder is closedexpandedImage - the image to display when folder is open
public TreeNode(java.lang.String name,
java.lang.String text,
java.lang.String url)
name - the name of the TreeNode object that is createdtext - the text to display in treeurl - the url to associate with the node
public TreeNode(java.lang.String name,
java.lang.String text)
name - the name of the TreeNode object that is createdtext - the text to displayed in treepublic TreeNode(java.lang.String text)
name - the name of the TreeNode object that is createdtext - the text to displayed in tree| Method Detail |
|---|
public java.lang.String getName()
TreeNodeInterface
getName in interface TreeNodeInterfacepublic void setName(java.lang.String name)
TreeNodeInterface
setName in interface TreeNodeInterfacename - string name of the node.public void setExpanded(boolean state)
TreeNodeInterface
setExpanded in interface TreeNodeInterfacestate - boolean value which determines if a node is expanded.public boolean isExpanded()
TreeNodeInterface
isExpanded in interface TreeNodeInterfacepublic java.lang.String getText()
TreeNodeInterface
getText in interface TreeNodeInterfacepublic java.lang.String getNodeText()
NodeInterface
getNodeText in interface NodeInterfacegetNodeText in class Nodepublic void setText(java.lang.String text)
TreeNodeInterface
setText in interface TreeNodeInterfacetext - the text string that is to be displayed next to the node.public java.lang.String getURL()
TreeNodeInterface
getURL in interface TreeNodeInterfaceTreeNodeInterface.setURL(String),
BaseTreeView.setUsingURLLinks(boolean)public java.lang.String getNodeExpandedText()
NodeInterface
getNodeExpandedText in interface NodeInterfacegetNodeExpandedText in class Nodepublic void setURL(java.lang.String url)
TreeNodeInterface
setURL in interface TreeNodeInterfaceurl - the url link associated with the nodeTreeNodeInterface.getURL(),
BaseTreeView.setUsingURLLinks(boolean)public java.lang.String getDefaultImage()
TreeNodeInterface
getDefaultImage in interface TreeNodeInterfacepublic void setDefaultImage(java.lang.String image)
TreeNodeInterface
setDefaultImage in interface TreeNodeInterfacepublic java.lang.String getExpandedImage()
TreeNodeInterface
getExpandedImage in interface TreeNodeInterfacepublic void setExpandedImage(java.lang.String image)
TreeNodeInterface
setExpandedImage in interface TreeNodeInterfacepublic void setLastNode(boolean lastNode)
TreeNodeInterface
setLastNode in interface TreeNodeInterfacelastNode - boolean value lastNode, true if node is the lastNode, false otherwise.public boolean isLastNode()
TreeNodeInterface
isLastNode in interface TreeNodeInterfacepublic void setNodeCellStyleClass(java.lang.String styleClass)
public java.lang.String getNodeCellStyleClass()
getNodeCellStyleClass in interface StaticNodeCellStyleInterfacepublic void setNodeCellStyleKey(java.lang.String styleKey)
public java.lang.String getNodeCellStyleKey()
getNodeCellStyleKey in interface StaticNodeCellStyleKeyInterfacepublic void setAccessKey(java.lang.String accessKey)
TreeNodeInterface
setAccessKey in interface TreeNodeInterfaceaccessKey - key entry used as access key for link.public java.lang.String getAccessKey()
TreeNodeInterface
getAccessKey in interface TreeNodeInterfacepublic void setTabIndex(int tabIndex)
TreeNodeInterface
setTabIndex in interface TreeNodeInterfacetabIndex - the numeric order in which the tab key is used.public int getTabIndex()
TreeNodeInterface
getTabIndex in interface TreeNodeInterfacepublic void setDefaultImageAltText(java.lang.String defaultImageAltText)
TreeNodeInterface
setDefaultImageAltText in interface TreeNodeInterfacepublic java.lang.String getDefaultImageAltText()
TreeNodeInterface
getDefaultImageAltText in interface TreeNodeInterfacepublic void setExpandedImageAltText(java.lang.String expandedImageAltText)
TreeNodeInterface
setExpandedImageAltText in interface TreeNodeInterfacepublic java.lang.String getExpandedImageAltText()
TreeNodeInterface
getExpandedImageAltText in interface TreeNodeInterfacepublic void setTitle(java.lang.String title)
TreeNodeInterface
setTitle in interface TreeNodeInterfacetitle - descriptive title of the URL link.public java.lang.String getTitle()
TreeNodeInterface
getTitle in interface TreeNodeInterfacepublic void setDescription(java.lang.String desc)
TreeNodeInterface
setDescription in interface TreeNodeInterfacedesc - The description of the nodepublic java.lang.String getDescription()
TreeNodeInterface
getDescription in interface TreeNodeInterfacepublic java.lang.String getTarget()
TreeNodeInterface
getTarget in interface TreeNodeInterfacepublic void setTarget(java.lang.String target)
TreeNodeInterface
setTarget in interface TreeNodeInterfacepublic void setSourceParent(TreeNodeInterface sourceParent)
TreeNodeInterface
setSourceParent in interface TreeNodeInterfacepublic TreeNodeInterface getSourceParent()
TreeNodeInterface
getSourceParent in interface TreeNodeInterfacepublic void setEnabled(boolean enabled)
TreeNodeInterface
setEnabled in interface TreeNodeInterfacepublic boolean isEnabled()
TreeNodeInterface
isEnabled in interface TreeNodeInterfacepublic java.lang.String getDisabledImage()
TreeNodeInterface
getDisabledImage in interface TreeNodeInterfacepublic void setDisabledImage(java.lang.String image)
TreeNodeInterface
setDisabledImage in interface TreeNodeInterfacepublic java.lang.String getDisabledImageAltText()
TreeNodeInterface
getDisabledImageAltText in interface TreeNodeInterfacepublic void setDisabledImageAltText(java.lang.String disabledImageAltText)
TreeNodeInterface
setDisabledImageAltText in interface TreeNodeInterfacepublic java.lang.String getRendererFunctionName()
TreeNodeInterface
getRendererFunctionName in interface TreeNodeInterfaceTreeNodeInterface.setRendererFunctionName(String),
BaseTreeView.getNodeRendererFunctionName()public void setRendererFunctionName(java.lang.String renderer)
TreeNodeInterface
<script>
function nodeRenderer(node)
{
return node.text;
}
</script>
The returned value is set on the innerHTML of the HTML element.
In addition to the default node renderer,
one simple node renderer is provided which allows the node text to
include HTML.
It may be used by setting the node renderer as follows:
treenode.setRendererFunctionName("sas_TreeView_HTMLNodeRenderer");
setRendererFunctionName in interface TreeNodeInterfaceBaseTreeView.setNodeRendererFunctionName(String)public java.lang.String getSelectNodeFunctionName()
TreeNodeInterface
getSelectNodeFunctionName in interface TreeNodeInterfaceTreeNodeInterface.setSelectNodeFunctionName(String),
BaseTreeView.getSelectNodeFunctionName()public void setSelectNodeFunctionName(java.lang.String select)
TreeNodeInterface
function selectNodeFunction(node,el)
{
if (node.text == "test";)
el.className = "selectedTestStyle";
else el.className = "selectedNormalStyle";
}
The first parameter is the node being selected.
The second parameter is the HTML element representing the node.
setSelectNodeFunctionName in interface TreeNodeInterfaceTreeNodeInterface.getSelectNodeFunctionName(),
BaseTreeView.setSelectNodeFunctionName(String)public java.lang.String getDeselectNodeFunctionName()
TreeNodeInterface
getDeselectNodeFunctionName in interface TreeNodeInterfaceTreeNodeInterface.setDeselectNodeFunctionName(String),
BaseTreeView.getDeselectNodeFunctionName()public void setDeselectNodeFunctionName(java.lang.String deselect)
TreeNodeInterface
function deselectNodeFunction(node,el)
{
if (node.text == "test";)
el.className = "deselectedTestStyle";
else el.className = "deselectedNormalStyle";
}
The first parameter is the node being selected.
The second parameter is the HTML element representing the node.
setDeselectNodeFunctionName in interface TreeNodeInterfaceBaseTreeView.setDeselectNodeFunctionName(String)public java.lang.String getImageLocation()
TreeNodeInterface
getImageLocation in interface TreeNodeInterfaceBaseTreeView.getImageLocation()public void setImageLocation(java.lang.String imageLocation)
TreeNodeInterface
setImageLocation in interface TreeNodeInterfaceBaseTreeView.setImageLocation(String)public java.lang.String getStyleClassPrefix()
TreeNodeInterface
getStyleClassPrefix in interface TreeNodeInterfaceBaseTreeView.getStyleClassPrefix()public void setStyleClassPrefix(java.lang.String styleClassPrefix)
TreeNodeInterface
setStyleClassPrefix in interface TreeNodeInterfaceBaseTreeView.getStyleClassPrefix()public java.util.Map getStyleMap()
ComplexStyleInterface
getStyleMap in interface ComplexStyleInterfacepublic java.lang.String getPreSelectNodeFunctionName()
TreeNodeInterface
getPreSelectNodeFunctionName in interface TreeNodeInterfaceTreeNodeInterface.setPreSelectNodeFunctionName(String)public void setPreSelectNodeFunctionName(java.lang.String preselect)
TreeNodeInterface
function preSelectNodeFunction(node,el)
{
...some user-defined action;
return true;
}
The first parameter is the node being selected.
The second parameter is the HTML element representing the node.
setPreSelectNodeFunctionName in interface TreeNodeInterfaceTreeNodeInterface.getPreSelectNodeFunctionName()public java.lang.String getPostSelectNodeFunctionName()
TreeNodeInterface
getPostSelectNodeFunctionName in interface TreeNodeInterfaceTreeNodeInterface.setPreSelectNodeFunctionName(String)public void setPostSelectNodeFunctionName(java.lang.String postselect)
TreeNodeInterface
function postSelectNodeFunction(node,el)
{
...some user-defined action;
return true;
}
The first parameter is the node being selected.
The second parameter is the HTML element representing the node.
setPostSelectNodeFunctionName in interface TreeNodeInterfaceTreeNodeInterface.getPreSelectNodeFunctionName()public java.lang.String getPostExpandNodeFunctionName()
TreeNodeExpandInterface
getPostExpandNodeFunctionName in interface com.sas.servlet.tbeans.models.TreeNodeExpandInterfaceTreeNodeExpandInterface.setPostExpandNodeFunctionName(String)public void setPostExpandNodeFunctionName(java.lang.String postexpand)
TreeNodeExpandInterface
function postExpandNodeFunction(node,el)
{
...some user-defined action;
return true;
}
The first parameter is the node being selected.
The second parameter is the HTML element representing the node.
setPostExpandNodeFunctionName in interface com.sas.servlet.tbeans.models.TreeNodeExpandInterfaceTreeNodeExpandInterface.getPostExpandNodeFunctionName()public java.lang.String getPreExpandNodeFunctionName()
TreeNodeExpandInterface
getPreExpandNodeFunctionName in interface com.sas.servlet.tbeans.models.TreeNodeExpandInterfaceTreeNodeExpandInterface.setPreExpandNodeFunctionName(String)public void setPreExpandNodeFunctionName(java.lang.String preexpand)
TreeNodeExpandInterface
function postExpandNodeFunction(node,el)
{
...some user-defined action;
return true;
}
The first parameter is the node being selected.
The second parameter is the HTML element representing the node.
setPreExpandNodeFunctionName in interface com.sas.servlet.tbeans.models.TreeNodeExpandInterfaceTreeNodeExpandInterface.getPreExpandNodeFunctionName()
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||