SPT RWT Application API

com.sptci.rwt.webui.tree
Class AbstractNode<S extends MetaData>

java.lang.Object
  extended by echopointng.tree.DefaultMutableTreeNode
      extended by com.sptci.epng.TreeNode<S>
          extended by com.sptci.rwt.webui.tree.AbstractNode<S>
All Implemented Interfaces:
MutableTreeNode, TreeNode, Serializable
Direct Known Subclasses:
CatalogueNode, ContainerNode, DBMSNode, LeafNode, SchemaNode, TableNode, ViewNode

public abstract class AbstractNode<S extends MetaData>
extends com.sptci.epng.TreeNode<S>

An abstract TreeNode that represents MetaData objects.

© Copyright 2007 Sans Pareil Technologies, Inc.

Version:
$Id: AbstractNode.java 4123 2008-05-25 21:49:01Z rakesh $
Author:
Rakesh Vidyadharan 2007-09-28
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class echopointng.tree.DefaultMutableTreeNode
DefaultMutableTreeNode.BreadthFirstEnumeration, DefaultMutableTreeNode.PathBetweenNodesEnumeration, DefaultMutableTreeNode.PostorderEnumeration, DefaultMutableTreeNode.PreorderEnumeration
 
Field Summary
 
Fields inherited from class com.sptci.epng.TreeNode
initialised
 
Fields inherited from class echopointng.tree.DefaultMutableTreeNode
actionCommand, allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
protected AbstractNode()
          Create a new tree node with no userObject specified.
  AbstractNode(S userObject)
          Create a new tree node using the specified metadata object.
 
Method Summary
protected abstract  void createChildren()
          Create the child nodes for this node.
 int getChildCount()
          Return the number of child nodes under this node.
 boolean isLeaf()
          Determine whether this node holds children or not.
protected  void processFatalException(String name, Throwable throwable)
          Display an error message if fetching meta data fails.
protected  void processFatalException(Throwable throwable)
          Display an error message if fetching meta data fails.
 
Methods inherited from class com.sptci.epng.TreeNode
getUserObject, setUserObject
 
Methods inherited from class echopointng.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, depthFirstEnumeration, getActionCommand, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObjectPath, insert, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setActionCommand, setAllowsChildren, setParent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractNode

protected AbstractNode()
Create a new tree node with no userObject specified.


AbstractNode

public AbstractNode(S userObject)
Create a new tree node using the specified metadata object. The object represents a object in the database.

Parameters:
userObject - The model object for this node.
Method Detail

getChildCount

public int getChildCount()
Return the number of child nodes under this node. Lazily loaded on first request.

Specified by:
getChildCount in interface TreeNode
Overrides:
getChildCount in class DefaultMutableTreeNode
Returns:
The number of children for this node.
See Also:
createChildren()

isLeaf

public boolean isLeaf()
Determine whether this node holds children or not. Over-ridden to always indicate that there are children.

Specified by:
isLeaf in interface TreeNode
Overrides:
isLeaf in class DefaultMutableTreeNode
Returns:
Returns true if the receiver is a leaf. Always returns false.

createChildren

protected abstract void createChildren()
Create the child nodes for this node.


processFatalException

protected void processFatalException(Throwable throwable)
Display an error message if fetching meta data fails.

Parameters:
throwable - The exception that was raised.

processFatalException

protected void processFatalException(String name,
                                     Throwable throwable)
Display an error message if fetching meta data fails. Over-loaded to replace a $object$ place holder with the specified name.

Parameters:
name - The name of the database object that was being analysed.
throwable - The exception that was raised.

SPT RWT Application API