org.extremecomponents.tree.model
Class TreeModelUtils

java.lang.Object
  extended byorg.extremecomponents.tree.model.TreeModelUtils

public class TreeModelUtils
extends java.lang.Object

org.extremecomponents.tree.model.TreeModelUtils.java -

Author:
phorn

Constructor Summary
TreeModelUtils()
           
 
Method Summary
static void addChildren(TreeModel model, java.util.List displayList, TreeNode node)
          Recursive call used by the filter function to add back the filtered out children but keeps them collapsed unless they have been openned manually be the open parameter.
static void addClosedChildren(TreeModel model, java.util.List displayList)
          Used by the filter function to add back the filtered out children.
static void findBeanParents(TreeModel model, java.util.List parents, java.lang.Object bean)
          Recursive call used by the filter function to add back the filtered out parents.
static java.util.List findParents(TreeModel model, java.util.List searchList)
          Used by the filter function to add back the filtered out parents.
static java.lang.Object getBeanId(TreeModel model, java.lang.Object bean)
           
static java.lang.String getNodeKey(TreeModel model, java.lang.Object id)
           
static boolean isOpen(TreeModel model, TreeNode node, boolean filterControlled)
          Find out if the node and all parents are open.
static void loadChildren(TreeModel model, java.util.List displayList, java.util.List searchList, TreeNode node, int currentDepth)
           
static java.util.List loadTreeStructure(TreeModel model, java.util.List inputList)
          Recursively loads the tree structure into the treeList attribute and sets the treeList as the collection to use.
static boolean nodeIsBeanParent(TreeModel model, TreeNode node, java.lang.Object bean)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeModelUtils

public TreeModelUtils()
Method Detail

loadTreeStructure

public static java.util.List loadTreeStructure(TreeModel model,
                                               java.util.List inputList)
                                        throws java.lang.Exception
Recursively loads the tree structure into the treeList attribute and sets the treeList as the collection to use.

Parameters:
model -
inputList -
Throws:
java.lang.Exception

loadChildren

public static void loadChildren(TreeModel model,
                                java.util.List displayList,
                                java.util.List searchList,
                                TreeNode node,
                                int currentDepth)
                         throws java.lang.Exception
Parameters:
model -
displayList -
searchList -
node -
currentDepth -
Throws:
java.lang.Exception

findParents

public static java.util.List findParents(TreeModel model,
                                         java.util.List searchList)
                                  throws java.lang.Exception
Used by the filter function to add back the filtered out parents.

Parameters:
model -
searchList -
Returns:
Throws:
java.lang.Exception

findBeanParents

public static void findBeanParents(TreeModel model,
                                   java.util.List parents,
                                   java.lang.Object bean)
                            throws java.lang.Exception
Recursive call used by the filter function to add back the filtered out parents.

Parameters:
model -
parents -
bean -
Throws:
java.lang.Exception

addClosedChildren

public static void addClosedChildren(TreeModel model,
                                     java.util.List displayList)
                              throws java.lang.Exception
Used by the filter function to add back the filtered out children.

Parameters:
model -
displayList -
Throws:
java.lang.Exception

addChildren

public static void addChildren(TreeModel model,
                               java.util.List displayList,
                               TreeNode node)
                        throws java.lang.Exception
Recursive call used by the filter function to add back the filtered out children but keeps them collapsed unless they have been openned manually be the open parameter.

Parameters:
model -
displayList -
node -
Throws:
java.lang.Exception

nodeIsBeanParent

public static boolean nodeIsBeanParent(TreeModel model,
                                       TreeNode node,
                                       java.lang.Object bean)
                                throws java.lang.Exception
Parameters:
model -
node -
bean -
Returns:
Throws:
java.lang.Exception

getBeanId

public static java.lang.Object getBeanId(TreeModel model,
                                         java.lang.Object bean)
                                  throws java.lang.Exception
Parameters:
model -
bean -
Returns:
Throws:
java.lang.Exception

isOpen

public static boolean isOpen(TreeModel model,
                             TreeNode node,
                             boolean filterControlled)
Find out if the node and all parents are open.

Parameters:
model -
node -
filterControlled -
Returns:

getNodeKey

public static java.lang.String getNodeKey(TreeModel model,
                                          java.lang.Object id)
Parameters:
model -
id - value of the node.
Returns:
Returns the parameter key used to indicate this node is open.


Copyright © 2004 sourceforge. All Rights Reserved.