|
EspressReport v 5.5 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--quadbase.common.util.internal.XMLDefaultTreeNode
| Field Summary | |
protected boolean |
allowsChildren
|
protected java.util.Vector |
children
array of children, may be null if this node has no children |
static java.util.Enumeration |
EMPTY_ENUMERATION
An enumeration that is always empty. |
protected XMLDefaultTreeNode |
parent
this node's parent, or null if this node has no parent |
protected java.lang.Object |
userObject
optional user object |
| Fields inherited from interface quadbase.common.util.internal.XMLConditionType |
BETWEEN, EQUAL, GREATERTHAN, GREATERTHANOREQUAL, IN, LESSTHAN, LESSTHANOREQUAL, NOTEQUAL |
| Constructor Summary | |
XMLDefaultTreeNode()
Creates a tree node that has no parent and no children, but which allows children. |
|
XMLDefaultTreeNode(java.lang.Object userObject)
Creates a tree node with no parent, no children, but which allows children, and initializes it with the specified user object. |
|
XMLDefaultTreeNode(java.lang.Object userObject,
boolean allowsChildren)
Creates a tree node with no parent, no children, but which allows children, and initializes it with the specified user object. |
|
| Method Summary | |
void |
add(XMLDefaultTreeNode newChild)
Removes newChild from its parent and makes it a child of
this node by adding it to the end of this node's child array. |
java.util.Enumeration |
children()
Creates and returns a forward-order enumeration of this node's children. |
java.lang.Object |
clone()
|
boolean |
execute()
|
boolean |
getAllowsChildren()
Returns true if this node is allowed to have children. |
XMLDefaultTreeNode |
getChildAt(int index)
Returns the child at the specified index in this node's child array. |
int |
getChildCount()
Returns the number of children of this node. |
XMLFieldInfo |
getField(java.lang.String paramName)
|
XMLDefaultTreeNode |
getFirstChild()
Returns this node's first child. |
int |
getIndex(XMLDefaultTreeNode aChild)
Returns the index of the specified child in this node's child array. |
XMLDefaultTreeNode |
getLastChild()
Returns this node's last child. |
java.lang.String |
getName()
Returns this node's user object. |
XMLDefaultTreeNode |
getParent()
Returns this node's parent or null if this node has no parent. |
java.lang.Object |
getUserObject()
|
void |
insert(XMLDefaultTreeNode newChild,
int childIndex)
|
boolean |
isExecutable()
|
boolean |
isLeaf()
Returns true if this node has no children. |
boolean |
isNodeChild(XMLDefaultTreeNode aNode)
Returns true if aNode is a child of this node. |
boolean |
isRoot()
Returns true if this node is the root of the tree. |
void |
remove(int childIndex)
Removes the child at the specified index from this node's children and sets that node's parent to null. |
void |
remove(XMLDefaultTreeNode aChild)
Removes aChild from this node's child array, giving it a
null parent. |
void |
removeAllChildren()
Removes all of this node's children, setting their parents to null. |
void |
removeFromParent()
Removes the subtree rooted at this node from the tree, giving this node a null parent. |
void |
setName(java.lang.String userObject)
Sets the user object for this node to userObject. |
void |
setParent(XMLDefaultTreeNode newParent)
Sets this node's parent to newParent but does not
change the parent's child array. |
void |
setUserObject(java.lang.Object userObj)
|
java.lang.String |
toString()
Returns the result of sending toString() to this node's
user object, or null if this node has no user object. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected XMLDefaultTreeNode parent
protected java.util.Vector children
protected boolean allowsChildren
protected java.lang.Object userObject
public static final java.util.Enumeration EMPTY_ENUMERATION
| Constructor Detail |
public XMLDefaultTreeNode()
public XMLDefaultTreeNode(java.lang.Object userObject)
userObject - an Object provided by the user that constitutes
the node's data
public XMLDefaultTreeNode(java.lang.Object userObject,
boolean allowsChildren)
userObject - an Object provided by the user that constitutes
the node's data| Method Detail |
public boolean execute()
public boolean isExecutable()
throws java.lang.Exception
public void insert(XMLDefaultTreeNode newChild,
int childIndex)
public void remove(int childIndex)
MutableTreeNode.childIndex - the index in this node's child array
of the child to removejava.lang.ArrayIndexOutOfBoundsException - if
childIndex is out of boundspublic void setParent(XMLDefaultTreeNode newParent)
newParent but does not
change the parent's child array. This method is called from
insert() and remove() to
reassign a child's parent, it should not be messaged from anywhere
else.newParent - this node's new parentpublic XMLDefaultTreeNode getParent()
public XMLDefaultTreeNode getChildAt(int index)
index - an index into this node's child arrayjava.lang.ArrayIndexOutOfBoundsException - if index
is out of boundspublic int getChildCount()
public int getIndex(XMLDefaultTreeNode aChild)
-1. This method performs a linear search and is O(n)
where n is the number of children.aChild - the TreeNode to search for among this node's children-1 if the specified node is a not
a child of this nodejava.lang.IllegalArgumentException - if aChild
is nullpublic boolean isNodeChild(XMLDefaultTreeNode aNode)
aNode is a child of this node. If
aNode is null, this method returns false.aNode is a child of this node; false if
aNode is nullpublic java.util.Enumeration children()
public boolean getAllowsChildren()
public void setName(java.lang.String userObject)
userObject.userObject - the Object that constitutes this node's
user-specified datagetName(),
toString()public java.lang.String getName()
setUserObject(java.lang.Object),
toString()public void removeFromParent()
public void remove(XMLDefaultTreeNode aChild)
aChild from this node's child array, giving it a
null parent.aChild - a child of this node to removejava.lang.IllegalArgumentException - if aChild
is null or is not a child of this nodepublic void removeAllChildren()
public void add(XMLDefaultTreeNode newChild)
newChild from its parent and makes it a child of
this node by adding it to the end of this node's child array.newChild - node to add as a child of this nodejava.lang.IllegalArgumentException - if newChild
is nulljava.lang.IllegalStateException - if this node does not allow
childreninsert(quadbase.common.util.internal.XMLDefaultTreeNode, int)public boolean isRoot()
public XMLDefaultTreeNode getFirstChild()
java.util.NoSuchElementException - if this node has no childrenpublic XMLDefaultTreeNode getLastChild()
java.util.NoSuchElementException - if this node has no childrenpublic boolean isLeaf()
getAllowsChildrengetAllowsChildren()public java.lang.String toString()
toString() to this node's
user object, or null if this node has no user object.toString in class java.lang.ObjectgetUserObject()public java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.Object getUserObject()
public void setUserObject(java.lang.Object userObj)
public XMLFieldInfo getField(java.lang.String paramName)
|
EspressReport v 5.5 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||