org.jaffa.presentation.portlet.widgets.model
Class TreeModel

java.lang.Object
  extended byorg.jaffa.presentation.portlet.widgets.model.WidgetModel
      extended byorg.jaffa.presentation.portlet.widgets.model.TreeModel

public class TreeModel
extends WidgetModel

Model for the Tree widget.


Field Summary
static String ATTRIBUTE_NODE_TYPE
          Constant for the attribute node type.
 
Constructor Summary
TreeModel()
           
 
Method Summary
 Node getNode(String id)
          Returns a node if it exists based on the passed ID string.
 Node getRootNode()
          Returns the root node.
 boolean isExpanded(Node n)
          Returns a true if the input Node is expanded.
 void setAllExpanded()
          Sets all the nodes to be expanded.
 void setExpanded(ArrayList num)
          Sets an attribute on the node to expanded ="true" for caching.
 void setNoneExpanded()
          Sets all the nodes to be non-expanded.
 void setRootNode(Node node)
          Sets a node to be the root node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_NODE_TYPE

public static final String ATTRIBUTE_NODE_TYPE
Constant for the attribute node type.

See Also:
Constant Field Values
Constructor Detail

TreeModel

public TreeModel()
Method Detail

setRootNode

public void setRootNode(Node node)
Sets a node to be the root node.

Parameters:
node - node to be made root.

getRootNode

public Node getRootNode()
Returns the root node.

Returns:
the root node.

getNode

public Node getNode(String id)
Returns a node if it exists based on the passed ID string.

Parameters:
id - The node id.
Returns:
a node if it exists based on the passed ID string.

setExpanded

public void setExpanded(ArrayList num)
Sets an attribute on the node to expanded ="true" for caching.

Parameters:
num - A List of String objects, each String containing the node id.

isExpanded

public boolean isExpanded(Node n)
Returns a true if the input Node is expanded.

Parameters:
n - The Node.
Returns:
a true if the input Node is expanded.

setAllExpanded

public void setAllExpanded()
Sets all the nodes to be expanded.


setNoneExpanded

public void setNoneExpanded()
Sets all the nodes to be non-expanded.



Copyright © 2002-2004 JAFFA Project.