|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pixelmed.scpecg.SCPTreeRecord
public class SCPTreeRecord
Instances of the SCPTreeRecord class represent
nodes in a tree of the SCPTree class, which in
turn is used by the SCPTreeBrowser class.
Each record represents a single name-value pair, with the value potentially empty (e.g. a container).
| Constructor Summary | |
|---|---|
SCPTreeRecord(SCPTreeRecord parent,
int iname)
Construct a record for a named container, linking to the specied parent. |
|
SCPTreeRecord(SCPTreeRecord parent,
int iname,
String value)
Construct a record for a name-value pair linking to the specified parent. |
|
SCPTreeRecord(SCPTreeRecord parent,
String name)
Construct a record for a named container, linking to the specied parent. |
|
SCPTreeRecord(SCPTreeRecord parent,
String name,
String value)
Construct a record for a name-value pair linking to the specified parent. |
|
| Method Summary | |
|---|---|
Enumeration |
children()
Returns the children of this node as an Enumeration. |
int |
compareTo(Object o)
|
boolean |
equals(Object o)
|
boolean |
getAllowsChildren()
Always returns true, since children may always be added. |
TreeNode |
getChildAt(int index)
Returns the child at the specified index. |
int |
getChildCount()
Return the number of children that this node contains. |
int |
getIndex(TreeNode child)
Returns the index of the specified child from amongst this node's children, if present. |
TreeNode |
getParent()
Returns the parent node of this node. |
boolean |
isLeaf()
Returns true if the receiver is a leaf (has no children). |
String |
toString()
Dump the record as a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SCPTreeRecord(SCPTreeRecord parent,
String name,
String value)
Construct a record for a name-value pair linking to the specified parent.
Adds the new node to the children of the parent node, keeping them sorted.
parent - parent recordname - the String name of this node (by which they are sorted)value - the String value of this node
public SCPTreeRecord(SCPTreeRecord parent,
String name)
Construct a record for a named container, linking to the specied parent.
Adds the new node to the children of the parent node, keeping them sorted.
parent - parent recordname - the String name of this node (by which they are sorted)
public SCPTreeRecord(SCPTreeRecord parent,
int iname,
String value)
Construct a record for a name-value pair linking to the specified parent.
Adds the new node to the children of the parent node, keeping them sorted.
parent - parent recordiname - the numeric name of this node (by which they are sorted)value - the String value of this node
public SCPTreeRecord(SCPTreeRecord parent,
int iname)
Construct a record for a named container, linking to the specied parent.
Adds the new node to the children of the parent node, keeping them sorted.
parent - parent recordiname - the numeric name of this node (by which they are sorted)| Method Detail |
|---|
public String toString()
Dump the record as a string.
toString in class Objectpublic int compareTo(Object o)
compareTo in interface Comparableo - public boolean equals(Object o)
equals in class Objecto - public TreeNode getParent()
Returns the parent node of this node.
getParent in interface TreeNodepublic TreeNode getChildAt(int index)
Returns the child at the specified index.
getChildAt in interface TreeNodeindex - the index of the child to be returned, numbered from 0
TreeNode at the specified indexpublic int getIndex(TreeNode child)
Returns the index of the specified child from amongst this node's children, if present.
getIndex in interface TreeNodechild - the child to search for amongst this node's children
public boolean getAllowsChildren()
Always returns true, since children may always be added.
getAllowsChildren in interface TreeNodepublic boolean isLeaf()
Returns true if the receiver is a leaf (has no children).
isLeaf in interface TreeNodepublic int getChildCount()
Return the number of children that this node contains.
getChildCount in interface TreeNodepublic Enumeration children()
Returns the children of this node as an Enumeration.
children in interface TreeNode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||