jadex.swing.sequence
Class SequenceTreeNode

java.lang.Object
  |
  +--jadex.swing.sequence.SequenceTreeNode
All Implemented Interfaces:
javax.swing.tree.TreeNode

public class SequenceTreeNode
extends java.lang.Object
implements javax.swing.tree.TreeNode

A customized TreeNode used in SequenceTreeDisplay by using JDOM element.


Constructor Summary
SequenceTreeNode()
          Creates new SequenceTreeNode
SequenceTreeNode(org.jdom.Element seq)
          Second construcor
 
Method Summary
 java.util.Enumeration children()
          Get all children in an Enumeration.
 boolean equals(java.lang.Object o)
          Comparing if two elements are equal.
 boolean getAllowsChildren()
          Get if this node allows children.
 javax.swing.tree.TreeNode getChildAt(int p1)
          Get a treeNode given the index of the child.
 int getChildCount()
          Get the total number of the children.
 int getIndex(javax.swing.tree.TreeNode p1)
          Get the index of a child node.
 javax.swing.tree.TreeNode getParent()
          Get the parent of this TreeNode.
 org.jdom.Element getSequence()
          Get the wrapped sequence element.
 boolean isLeaf()
          See if this TreeNode is a leaf.
 void setSequence(org.jdom.Element seq)
          Set the wrapped sequence element.
 java.lang.String toString()
          This method return the name of the sequence element.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SequenceTreeNode

public SequenceTreeNode()
Creates new SequenceTreeNode

SequenceTreeNode

public SequenceTreeNode(org.jdom.Element seq)
Second construcor
Parameters:
seq - the sequence element for the current treenode
Method Detail

setSequence

public void setSequence(org.jdom.Element seq)
Set the wrapped sequence element.
Parameters:
seq - the wrapped sequence element.

getSequence

public org.jdom.Element getSequence()
Get the wrapped sequence element.
Returns:
the wrapped sequence element.

toString

public java.lang.String toString()
This method return the name of the sequence element.
Overrides:
toString in class java.lang.Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.

equals

public boolean equals(java.lang.Object o)
Comparing if two elements are equal.
Overrides:
equals in class java.lang.Object
Following copied from class: java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

getIndex

public int getIndex(javax.swing.tree.TreeNode p1)
Get the index of a child node.
Specified by:
getIndex in interface javax.swing.tree.TreeNode
Parameters:
p1 - a child node.

getAllowsChildren

public boolean getAllowsChildren()
Get if this node allows children.
Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode
Returns:
always true.

getChildAt

public javax.swing.tree.TreeNode getChildAt(int p1)
Get a treeNode given the index of the child.
Specified by:
getChildAt in interface javax.swing.tree.TreeNode
Parameters:
p1 - the index of the child.

getChildCount

public int getChildCount()
Get the total number of the children.
Specified by:
getChildCount in interface javax.swing.tree.TreeNode
Returns:
the total number of the children.

children

public java.util.Enumeration children()
Get all children in an Enumeration.
Specified by:
children in interface javax.swing.tree.TreeNode

isLeaf

public boolean isLeaf()
See if this TreeNode is a leaf.
Specified by:
isLeaf in interface javax.swing.tree.TreeNode

getParent

public javax.swing.tree.TreeNode getParent()
Get the parent of this TreeNode.
Specified by:
getParent in interface javax.swing.tree.TreeNode
Returns:
the parent TreeNode of this TreeNode.