PAJES 3.0.21

org.pajes.html.tree
Class TreePaje.Node

java.lang.Object
  extended by org.pajes.html.tree.TreePaje.Node
Enclosing class:
TreePaje

public class TreePaje.Node
extends java.lang.Object

Inner class representing a node of the tree.


Constructor Summary
TreePaje.Node(java.lang.String name, java.lang.String description, java.lang.String url, boolean isOpen)
          Creates a new tree node.
 
Method Summary
 TreePaje.Node addChild(TreePaje.Node child)
          Adds an node to appear on the level below this node.
 TreePaje.Node addSibling(TreePaje.Node sibling)
          Adds an node to appear on the same level as this node.
 TreePaje.Node getChild()
          Gets the first child of this node.
 java.lang.String getDescription()
          Gets the description of this tree node.
 java.lang.String getName()
          Gets the JavaScript name of this node.
 TreePaje.Node getParent()
          Gets the parent node of this node.
 TreePaje.Node getSibling()
          Gets the sibling of this node.
 java.lang.String getURL()
          Gets the destination URL when this node is selected.
 boolean isHighlighted()
          Gets the highlight state of this tree node.
 boolean isOpen()
          Gets the initial state of this tree node.
 TreePaje.Node setDescription(java.lang.String description)
          Sets the description of this tree node.
 TreePaje.Node setHighlighted(boolean highlight)
          Sets whether this node is to be highlighted.
 TreePaje.Node setInitialState(boolean isOpen)
          Sets the initial state of this tree node.
 TreePaje.Node setParent(TreePaje.Node parent)
          Sets the parent node of this node.
 TreePaje.Node setProperty(java.lang.String name, java.lang.String value)
          Sets an arbitrary property on this node.
 TreePaje.Node setURL(java.lang.String url)
          Sets the destination URL when this node is selected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreePaje.Node

public TreePaje.Node(java.lang.String name,
                     java.lang.String description,
                     java.lang.String url,
                     boolean isOpen)
Creates a new tree node.

Parameters:
name - the JavaScript name of this node. This must be unique within the tree.
description - the description to appear on the tree.
url - the destination URL when this node is selected. If null, selecting the node will have no effect.
isOpen - true if the initial state of this node is open (i.e. any child elements are automatically displayed).
Throws:
TreeException - if a node with this name already exists in the tree.
Method Detail

addChild

public TreePaje.Node addChild(TreePaje.Node child)
Adds an node to appear on the level below this node.

Parameters:
child - the child tree node.
Returns:
this modified Node object.

addSibling

public TreePaje.Node addSibling(TreePaje.Node sibling)
Adds an node to appear on the same level as this node.

Parameters:
sibling - the sibling tree node.
Returns:
this modified Node object.

getChild

public TreePaje.Node getChild()
Gets the first child of this node.

Returns:
the child tree node.

getDescription

public java.lang.String getDescription()
Gets the description of this tree node.

Returns:
the description.

getName

public java.lang.String getName()
Gets the JavaScript name of this node.

Returns:
the name of the node.

getParent

public TreePaje.Node getParent()
Gets the parent node of this node.

Returns:
the parent node of this node.

getSibling

public TreePaje.Node getSibling()
Gets the sibling of this node.

Returns:
the sibling tree node.

getURL

public java.lang.String getURL()
Gets the destination URL when this node is selected.

Returns:
the destination URL when this node is selected.

isHighlighted

public boolean isHighlighted()
Gets the highlight state of this tree node.

Returns:
true if the text of this node is to be highlighted.

isOpen

public boolean isOpen()
Gets the initial state of this tree node.

Returns:
true if the initial state of this node is open (i.e. any child elements are automatically displayed).

setDescription

public TreePaje.Node setDescription(java.lang.String description)
Sets the description of this tree node.

Parameters:
description - the description to appear on the tree.
Returns:
this modified Node object.

setHighlighted

public TreePaje.Node setHighlighted(boolean highlight)
Sets whether this node is to be highlighted.

Parameters:
highlight - true if text of this node is to be highlighted.
Returns:
this modified Node object.

setInitialState

public TreePaje.Node setInitialState(boolean isOpen)
Sets the initial state of this tree node.

Parameters:
isOpen - true if the initial state of this node is open (i.e. any child elements are automatically displayed).
Returns:
this modified Node object.

setParent

public TreePaje.Node setParent(TreePaje.Node parent)
Sets the parent node of this node.

Parameters:
parent - the parent node of this node.
Returns:
this modified Node object.

setProperty

public TreePaje.Node setProperty(java.lang.String name,
                                 java.lang.String value)
Sets an arbitrary property on this node.

Parameters:
name - the name of the arbitrary property.
value - the value of the arbitrary property. If null, the property will be deleted.
Returns:
this modified Node object.

setURL

public TreePaje.Node setURL(java.lang.String url)
Sets the destination URL when this node is selected.

Parameters:
url - the destination URL when this node is selected.
Returns:
this modified Node object.

PAJES 3.0.21

Copyright © 1998-2007 Viridian Pty Limited. All Rights Reserved.