|
Algernon Software | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
org.algernon.app.j2p.J2PFrame
J2PFrame is an abstract base class for Java2Protege classes and slots.
Nested Class Summary |
Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode |
|
Field Summary | |
protected String |
CHILD_ERROR_COLOR
|
protected String |
ERROR_COLOR
|
private J2PError |
f_error
|
private boolean |
f_isIgnored
|
private String |
f_name
|
private String |
f_originalName
|
protected int |
MAX_NAME_LENGTH
|
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
J2PFrame(String name,
String originalName)
|
Method Summary | |
boolean |
childHasError()
|
abstract Enumeration |
children()
Creates and returns a forward-order enumeration of this node's children. |
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. |
J2PError |
getError()
Returns the error. |
int |
getIndex(TreeNode aChild)
Returns the index of the specified child in this node's child array. |
String |
getName()
Returns the name |
String |
getOriginalName()
|
TreeNode |
getParent()
Returns this node's parent or null if this node has no parent. |
boolean |
hasError()
gets the hasError flag. |
boolean |
isIgnored()
returns true if the user doesn't want to export this one. |
boolean |
isLeaf()
Returns true if this node has no children. |
void |
setError(J2PError error)
sets the hasError flag. |
void |
setIsIgnored(boolean newValue)
Sets the isIgnored flag. |
void |
setName(String newName)
Sets the name of this class. |
void |
setOriginalName(String originalName)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private String f_name
private String f_originalName
private J2PError f_error
private boolean f_isIgnored
protected String ERROR_COLOR
protected String CHILD_ERROR_COLOR
protected int MAX_NAME_LENGTH
Constructor Detail |
public J2PFrame(String name, String originalName)
Method Detail |
public void setName(String newName)
public String getName()
public String toString()
public void setError(J2PError error)
public J2PError getError()
public boolean hasError()
public boolean childHasError()
public boolean isIgnored()
public void setIsIgnored(boolean newValue)
public String getOriginalName()
public void setOriginalName(String originalName)
public abstract Enumeration children()
children
in interface TreeNode
public boolean getAllowsChildren()
getAllowsChildren
in interface TreeNode
public TreeNode getChildAt(int index)
getChildAt
in interface TreeNode
index
- an index into this node's child array
ArrayIndexOutOfBoundsException
- if index
is out of boundspublic int getChildCount()
getChildCount
in interface TreeNode
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
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
getAllowsChildren()
public TreeNode getParent()
getParent
in interface TreeNode
|
Algernon Software | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |