jaxcent.yui
Class Tree

java.lang.Object
  extended byjaxcent.JaxcentPage
      extended byjaxcent.yui.Tree

public class Tree
extends jaxcent.JaxcentPage

Class Tree encapsulates the YUI Tree component. Objects of this class must be initialized with the id for the DIV where the tree is to be placed. After that, nodes can be added/removed to the tree, and other operations can be performed.


Constructor Summary
Tree()
           
 
Method Summary
 TreeNode addDateNode(java.util.Date date)
          Add a non-editable date node to the tree root
 TreeNode addEditableDateNode(java.util.Date date)
          Add an editable date node to the tree root
 TreeNode addEditableTextNode(java.lang.String text)
          Add an editable text node to the tree root
 TreeNode addTextNode(java.lang.String text)
          Add a non-editable text node to the tree root
 void collapseAll()
          Collapse the entire tree.
 void draw()
          The draw method updates the tree.
 void expandAll()
          Expand the entire tree.
 void init(java.lang.String treeDivId)
          To create the tree on the page, init must be called with the id for a DIV where the tree is to be drawn.
protected  void onClick(TreeNode node)
          Over-ridable method for receiving click events on tree nodes.
protected  void onJavaScriptRequest(java.lang.String cmd, java.lang.String[] args)
           
 void setDateFormat(char sep, boolean monthFirst)
          Sets the format for displaying the date in date nodes.
 
Methods inherited from class jaxcent.JaxcentPage
checkElementExists, deleteCookie, deleteElementById, evalJavaScriptCode, evalJavaScriptCode, execJavaScriptCode, execJavaScriptCode, getAllFormData, getAllSessionData, getAppContext, getAppContextKeys, getClientJaxcentURL, getClientVersion, getCookie, getCookies, getCurrentPath, getFormSaveEnabled, getFromAppContext, getHttpSession, getJaxcentVersion, getLocale, getLocales, getRemoteAddr, getScreenSize, getStatusText, getWindowSize, goBack, goForward, invalidateHttpSession, makeContentURL, navigate, onFinalFormData, onLoad, onUnload, removeAppContextKey, resetFromSession, saveInAppContext, setBatchUpdates, setCookie, setCookie, setFormSaveEnabled, setStatusText, showConfirmDialog, showInputDialog, showMessageDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tree

public Tree()
Method Detail

init

public void init(java.lang.String treeDivId)
          throws jaxcent.Jaxception
To create the tree on the page, init must be called with the id for a DIV where the tree is to be drawn.

Throws:
jaxcent.Jaxception

draw

public void draw()
          throws jaxcent.Jaxception
The draw method updates the tree.

Throws:
jaxcent.Jaxception

addTextNode

public TreeNode addTextNode(java.lang.String text)
                     throws jaxcent.Jaxception
Add a non-editable text node to the tree root

Throws:
jaxcent.Jaxception

addEditableTextNode

public TreeNode addEditableTextNode(java.lang.String text)
                             throws jaxcent.Jaxception
Add an editable text node to the tree root

Throws:
jaxcent.Jaxception

setDateFormat

public void setDateFormat(char sep,
                          boolean monthFirst)
                   throws jaxcent.Jaxception
Sets the format for displaying the date in date nodes. sep is the character to use to separate parts of the date. monthFirst is false if month comes after date, true if month comes first.

Throws:
jaxcent.Jaxception

addDateNode

public TreeNode addDateNode(java.util.Date date)
                     throws jaxcent.Jaxception
Add a non-editable date node to the tree root

Throws:
jaxcent.Jaxception

addEditableDateNode

public TreeNode addEditableDateNode(java.util.Date date)
                             throws jaxcent.Jaxception
Add an editable date node to the tree root

Throws:
jaxcent.Jaxception

expandAll

public void expandAll()
               throws jaxcent.Jaxception
Expand the entire tree.

Throws:
jaxcent.Jaxception

collapseAll

public void collapseAll()
                 throws jaxcent.Jaxception
Collapse the entire tree.

Throws:
jaxcent.Jaxception

onClick

protected void onClick(TreeNode node)
Over-ridable method for receiving click events on tree nodes.


onJavaScriptRequest

protected void onJavaScriptRequest(java.lang.String cmd,
                                   java.lang.String[] args)