All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.servlet.tbeans.models
Interface TreeNodeInterface

All Superinterfaces:
  ComplexStyleInterface, javax.swing.tree.MutableTreeNode, NodeInterface, javax.swing.tree.TreeNode

All Known Implementing Classes:
  JDBCToTreeViewModelAdapter.LevelTreeNode, TreeNode

    public interface TreeNodeInterface

extends NodeInterface, ComplexStyleInterface

TreeNodeInterface is an interface for creating a tree node. 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.

See Also:
  `TreeView`, `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` | `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` | `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.
`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 expanded)` 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` | `setPostSelectNodeFunctionName(java.lang.String postSelectFunctionName)` 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` | `setPreSelectNodeFunctionName(java.lang.String preSelectFunctionName)` 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 interface com.sas.servlet.tbeans.models.NodeInterface
`getNodeExpandedText, getNodeText, getNodeType`

Methods inherited from interface com.sas.servlet.tbeans.ComplexStyleInterface
`getStyleMap`

Method Detail

### getDefaultImage

    java.lang.String getDefaultImage()

  Returns the name of the default image. This should not be the fully qualified name such as

      http://myWebServer/gifs/imageName.gif

  Specify only the name of the file, in this example imageName.gif. The TreeView will supply the location of the images. If no image is specified the TreeView will determine the image name.

  Returns:
    the name of the default image.

### setDefaultImage

    void setDefaultImage(java.lang.String Image)

  Sets the name of the default image. This should not be the fully qualified name such as

      http://myWebServer/gifs/imageName.gif

  Specify only the name of the file, in this example imageName.gif. The TreeView will supply the location of the images. If no image is specified the TreeView will determine the image name.

  Parameters:
    `image` - - the name of the default image.

### getExpandedImage

    java.lang.String getExpandedImage()

  Returns the name of the expanded image. This should not be the fully qualified name such as

      http://myWebServer/gifs/imageName.gif

  Specify only the name of the file, in this example imageName.gif. The TreeView will supply the location of the images. If no image is specified the defaultImage will be used. If the defaultImage and the expandedImage are null the TreeView will determine the image name.

  Returns:
    the name of the expanded image.

### setExpandedImage

    void setExpandedImage(java.lang.String Image)

  Returns the name of the expanded image. This should not be the fully qualified name such as

      http://myWebServer/gifs/imageName.gif

  Specify only the name of the file, in this example imageName.gif. The TreeView will supply the location of the images. If no image is specified the defaultImage will be used. If the defaultImage and the expandedImage are null the TreeView will determine the image name.

  Parameters:
    `image` - the name of the expanded image

### getURL

    java.lang.String getURL()

  Returns the url associated with the node. This URL may be used as the href attribute on an anchor tag for this node.

  Returns:
    the url link associated with the node
  See Also:
    `setURL(String)`, `BaseTreeView.setUsingURLLinks(boolean)`

### setURL

    void setURL(java.lang.String url)

  Sets the url associated with node. This URL may be used as the href attribute on an anchor tag for this node.

  Parameters:
    `url` - the url link associated with the node
  See Also:
    `getURL()`, `BaseTreeView.setUsingURLLinks(boolean)`

### setText

    void setText(java.lang.String text)

  Sets the text associated with the node. This is the text that will be displayed next to the image on the node.

  Parameters:
    `text` - the text string that is to be displayed next to the node.

### getText

    java.lang.String getText()

  Returns the text associated with the node. This is the text that will be displayed next to the node image.

  Returns:
    text the string value which is the text displayed on the node.

### setExpanded

    void setExpanded(boolean expanded)

  Sets the expanded state of the node. True if the node is to be expanded and show it's children. This will also determine if the ExpandedImage or DefaultImage is to be used as the image. Default value is false. True indicates the image is expanded.

  Parameters:
    `expanded` - boolean value which determines if a node is expanded.

### isExpanded

    boolean isExpanded()

  Returns the boolean value which indicates whether a node is expanded.

  Returns:
    expanded boolean value which determines if a node is expanded.

### setName

    void setName(java.lang.String name)

  Sets the name of the node object.

  Parameters:
    `name` - string name of the node.

### getName

    java.lang.String getName()

  Returns the name of the node.

  Returns:
    name String

### setLastNode

    void setLastNode(boolean lastNode)

  Sets a flag to determine if a node is the last node of a set of children. Defaults to false.

  Parameters:
    `lastNode` - boolean value lastNode, true if node is the lastNode, false otherwise.

### isLastNode

    boolean isLastNode()

  Returns the boolean value which determines if a node is the last node in a set of children.

  Returns:
    lastNode boolean value, true if node is last node, false otherwise.

### setAccessKey

    void setAccessKey(java.lang.String accessKey)

  Sets the accesskey if a URL link is being used. This allows the user to access the link via the keyboard. For example, if the accesskey is set to "C", a user can use the Alt-C combination to go to the link text and press enter to activate the link. This is only available in PROGRESSIVE mode.

  Parameters:
    `accessKey` - key entry used as access key for link.

### getAccessKey

    java.lang.String getAccessKey()

  Returns the accesskey for URL accessibility. This allows a user to access a link using the Alt-'key' combination to access a link. This is only available in PROGRESSIVE mode.

  Returns:
    key entry used as access key for link.

### setTabIndex

    void setTabIndex(int tabIndex)

  Sets the tabbing order for access in viewer. This is only available in PROGRESSIVE mode.

  Parameters:
    `tabIndex` - the numeric order in which the tab key is used.

### getTabIndex

    int getTabIndex()

  Returns the tab order value of the node. The tab order is the order in which the tab key will follow when tabbing in the viewer. This is only available in PROGRESSIVE mode.

  Returns:
    tabIndex

### setDefaultImageAltText

    void setDefaultImageAltText(java.lang.String defaultImageAltText)

  Sets the text which is to be used as alternate to an image.

  Parameters:
    `defaulImageAltText` - alternate text for the image displayed in the viewer.

### getDefaultImageAltText

    java.lang.String getDefaultImageAltText()

  Returns the text which is to be used as alternate to an image.

  Returns:
    text used as an alternative to the image.

### setExpandedImageAltText

    void setExpandedImageAltText(java.lang.String expandedImageAltText)

  Sets the alternate text to the expanded image in the viewer.

  Parameters:
    `expandedImageAltText` -

### getExpandedImageAltText

    java.lang.String getExpandedImageAltText()

  Returns the alternate text to the expanded image.

  Returns:
    expandedImageAltText

### setTitle

    void setTitle(java.lang.String title)

  Sets the title to the URL link in the viewer, usually shown as a tooltip. This title should be a short but descriptive title to where the URL link will take them.

  Parameters:
    `title` - descriptive title of the URL link.

### getTitle

    java.lang.String getTitle()

  Returns the title to the URL link in the viewer, usually shown as a tooltip. This title should be a short but descriptive title to where the URL link will take them.

  Returns:
    title descriptive title to the URL link

### setDescription

    void setDescription(java.lang.String desc)

  Sets the description associated with this node.

  Parameters:
    `desc` - The description of the node

### getDescription

    java.lang.String getDescription()

  Returns the description of this node.

  Returns:
    the description of the node

### getTarget

    java.lang.String getTarget()

  Returns the value of the target= argument used on the anchor tags generated. This value determines where/how the links associated with the nodes on the tree are displayed.

  Returns:
    target= argument of each folders anchor tag.

### setTarget

    void setTarget(java.lang.String target)

  Sets the value of the target= argument used on the anchor tags generated. This value determines where/how the links associated with the nodes on the tree are displayed.

### setSourceParent

    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.

### getSourceParent

    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.

  Returns:
    sourceParent the node's parent in a source tree.

### setEnabled

    void setEnabled(boolean enabled)

  Set the enabled state of the node, which will change the icon and style used for a disabled node.

### isEnabled

    boolean isEnabled()

  Get the enabled state of the node, which determines the icon and style used for the node.

### getDisabledImage

    java.lang.String getDisabledImage()

  Returns the name of the image to be displayed when the node is disabled. The image name must be an absolute or relative URL.

  Parameters:
    `Image` - the URL for defaultImage.

### setDisabledImage

    void setDisabledImage(java.lang.String image)

  Sets the name of the image to be displayed when the node is disabled. The image name must be an absolute or relative URL.

  Parameters:
    `Image` - the URL for defaultImage.

### getDisabledImageAltText

    java.lang.String getDisabledImageAltText()

  getDisabledImageAltText returns the text which is to be used as alternate to an image.

  Returns:
    defaultImageAltText text used as an alternative to the image.

### setDisabledImageAltText

    void setDisabledImageAltText(java.lang.String disabledImageAltText)

  setDisabledImageAltText sets the alternate text to the disabled image in the viewer.

  Parameters:
    `disabledImageAltText` -

### getRendererFunctionName

    java.lang.String getRendererFunctionName()

  Gets the name of the JavaScript function which will be called to render a node. If present this property overrides the nodeRendererFunctionName property of the TreeView. Only available when nodeLoading is set to FULL.

  Returns:
    the name of the JavaScript function to render a node
  See Also:
    `setRendererFunctionName(String)`, `BaseTreeView.getNodeRendererFunctionName()`

### setRendererFunctionName

    void setRendererFunctionName(java.lang.String renderer)

  Sets the name of a JavaScript function which will be called to render a node. If present this property overrides the nodeRendererFunctionName property of the TreeView. The function should look similar to `<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");`

  Parameters:
    `the` - name of the JavaScript function to render a node
  See Also:
    `BaseTreeView.setNodeRendererFunctionName(String)`

### getSelectNodeFunctionName

    java.lang.String getSelectNodeFunctionName()

  Gets the name of a JavaScript function which will be called to select a node. If present this property overrides the selectNodeFunctionName property of the TreeView. Only available when nodeLoading is set to FULL.

  Returns:
    the name of the JavaScript function called when node is selected.
  See Also:
    `setSelectNodeFunctionName(String)`, `BaseTreeView.getSelectNodeFunctionName()`

### setSelectNodeFunctionName

    void setSelectNodeFunctionName(java.lang.String select)

  Sets the name of a JavaScript function which will be called to select a node. If present this property overrides the selectNodeFunctionName property of the TreeView. This function should update the style of the selected node to differentiate it from nodes which are not selected, for example by highlighting it. Only available when nodeLoading is set to FULL. The function should look similar to `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.

  Parameters:
    `the` - name of the JavaScript function called when the node is selected
  See Also:
    `getSelectNodeFunctionName()`, `BaseTreeView.setSelectNodeFunctionName(String)`

### getDeselectNodeFunctionName

    java.lang.String getDeselectNodeFunctionName()

  Gets the name of a JavaScript function which will be called to deselect a node. If present this property overrides the deselectNodeFunctionName property of the TreeView. Only available when nodeLoading is set to FULL.

  Returns:
    String The name of the JavaScript function called when node is deselected.
  See Also:
    `setDeselectNodeFunctionName(String)`, `BaseTreeView.getDeselectNodeFunctionName()`

### setDeselectNodeFunctionName

    void setDeselectNodeFunctionName(java.lang.String deselect)

  Sets the name of a JavaScript function which will be called to deselect a node. If present this property overrides the deselectNodeFunctionName property of the TreeView. Only available when nodeLoading is set to FULL. The function should look similar to `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.

  Parameters:
    `the` - name of the JavaScript function called when the node is deselected
  See Also:
    `BaseTreeView.setDeselectNodeFunctionName(String)`

### getImageLocation

    java.lang.String getImageLocation()

  If present this property overrides the imageLocation property of the TreeView.

  See Also:
    `BaseTreeView.getImageLocation()`

### setImageLocation

    void setImageLocation(java.lang.String imageLocation)

  If present this property overrides the imageLocation property of the TreeView.

  See Also:
    `BaseTreeView.setImageLocation(String)`

### getStyleClassPrefix

    java.lang.String getStyleClassPrefix()

  If present this property overrides the styleClassPrefix property of the TreeView.

  See Also:
    `BaseTreeView.getStyleClassPrefix()`

### setStyleClassPrefix

    void setStyleClassPrefix(java.lang.String styleClassPrefix)

  If present this property overrides the styleClassPrefix property of the TreeView.

  See Also:
    `BaseTreeView.getStyleClassPrefix()`

### getPreSelectNodeFunctionName

    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. Only available when nodeLoading is set to FULL.

  Returns:
    the name of the user-supplied JavaScript function called prior to normal select behavior when a node is selected.
  See Also:
    `setPreSelectNodeFunctionName(String)`

### setPreSelectNodeFunctionName

    void setPreSelectNodeFunctionName(java.lang.String preSelectFunctionName)

  Sets the name of a user-supplied JavaScript function which will be called prior to normal select behavior when a node is selected. This function should return a boolean indicating success. A return value of FALSE will stop normal behavior from processing. Only available when nodeLoading is set to FULL. The function should look similar to `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.

  Parameters:
    `the` - name of the JavaScript function called prior to normal select behavior when the node is selected
  See Also:
    `getPreSelectNodeFunctionName()`

### getPostSelectNodeFunctionName

    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. Only available when nodeLoading is set to FULL.

  Returns:
    the name of the user-supplied JavaScript function called after the normal select behavior when a node is selected.
  See Also:
    `setPreSelectNodeFunctionName(String)`

### setPostSelectNodeFunctionName

    void setPostSelectNodeFunctionName(java.lang.String postSelectFunctionName)

  Sets the name of a user-supplied JavaScript function which will be called after the normal select behavior executes when a node is selected. This function should return a boolean indicating success. A return value of FALSE will NOT stop normal behavior from processing as the normal behavior has processed prior to this function being called. Only available when nodeLoading is set to FULL. The function should look similar to `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.

  Parameters:
    `the` - name of the JavaScript function called prior to normal select behavior when the node is selected
  See Also:
    `getPreSelectNodeFunctionName()`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.