|
Algernon Software | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.tree.DefaultMutableTreeNode org.algernon.app.j2p.J2PFrame org.algernon.app.j2p.J2PClass
J2PClass does...
Nested Class Summary |
Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode |
|
Field Summary | |
private List |
f_subClasses
|
private List |
f_superClasses
|
Fields inherited from class org.algernon.app.j2p.J2PFrame |
CHILD_ERROR_COLOR, ERROR_COLOR, MAX_NAME_LENGTH |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
J2PClass(String name,
String originalName)
|
Method Summary | |
void |
addSubClass(J2PClass subclass)
Adds a subclass |
void |
addSuperClass(J2PClass superclass)
Adds a superclass. |
Enumeration |
children()
Returns an enumeration of the children of this class. |
boolean |
getAllowsChildren()
Returns true if this node is allowed to have children. |
TreeNode |
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. |
int |
getIndex(TreeNode aChild)
Returns the index of the specified child in this node's child array. |
TreeNode |
getParent()
Returns this node's parent or null if this node has no parent. |
Collection |
getSubClasses()
Returns the subclasses of this class. |
Collection |
getSuperClasses()
Returns the superclass(es) of this class. |
boolean |
isLeaf()
Returns true if this node has no children. |
boolean |
isLeafClass()
Returns true if this is a leaf class. |
void |
removeSubClass(J2PClass subclass)
Removes a subclass |
void |
removeSuperClass(J2PClass superclass)
Removes a superclass |
Methods inherited from class org.algernon.app.j2p.J2PFrame |
childHasError, getError, getName, getOriginalName, hasError, isIgnored, setError, setIsIgnored, setName, setOriginalName, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private List f_subClasses
private List f_superClasses
Constructor Detail |
public J2PClass(String name, String originalName)
Method Detail |
public void addSuperClass(J2PClass superclass)
public void addSubClass(J2PClass subclass)
public Collection getSubClasses()
public Enumeration children()
children
in interface TreeNode
children
in class J2PFrame
public Collection getSuperClasses()
public boolean isLeafClass()
public void removeSuperClass(J2PClass superclass)
public void removeSubClass(J2PClass subclass)
public boolean getAllowsChildren()
getAllowsChildren
in interface TreeNode
getAllowsChildren
in class J2PFrame
public TreeNode getChildAt(int index)
getChildAt
in interface TreeNode
getChildAt
in class J2PFrame
index
- an index into this node's child array
ArrayIndexOutOfBoundsException
- if index
is out of boundspublic int getChildCount()
getChildCount
in interface TreeNode
getChildCount
in class J2PFrame
public int getIndex(TreeNode aChild)
-1
. This method performs a linear search and is O(n)
where n is the number of children.
getIndex
in interface TreeNode
getIndex
in class J2PFrame
aChild
- the TreeNode to search for among this node's children
-1
if the specified node is a not
a child of this node
IllegalArgumentException
- if aChild
is nullpublic boolean isLeaf()
getAllowsChildren
isLeaf
in interface TreeNode
isLeaf
in class J2PFrame
getAllowsChildren()
public TreeNode getParent()
getParent
in interface TreeNode
getParent
in class J2PFrame
|
Algernon Software | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |