Methods Summary |
---|
public void | addTreeModelListener(javax.swing.event.TreeModelListener l)
|
public java.lang.Object | getChild(java.lang.Object parent, int index)
if (parent == null) {
return null;
}
AST p = (AST)parent;
AST c = p.getFirstChild();
if (c == null) {
throw new ArrayIndexOutOfBoundsException("node has no children");
}
int i = 0;
while (c != null && i < index) {
c = c.getNextSibling();
i++;
}
return c;
|
public int | getChildCount(java.lang.Object parent)
if (parent == null) {
throw new IllegalArgumentException("root is null");
}
AST p = (AST)parent;
AST c = p.getFirstChild();
int i = 0;
while (c != null) {
c = c.getNextSibling();
i++;
}
return i;
|
public int | getIndexOfChild(java.lang.Object parent, java.lang.Object child)
if (parent == null || child == null) {
throw new IllegalArgumentException("root or child is null");
}
AST p = (AST)parent;
AST c = p.getFirstChild();
if (c == null) {
throw new ArrayIndexOutOfBoundsException("node has no children");
}
int i = 0;
while (c != null && c != child) {
c = c.getNextSibling();
i++;
}
if (c == child) {
return i;
}
throw new java.util.NoSuchElementException("node is not a child");
|
public java.lang.Object | getRoot()
return root;
|
public boolean | isLeaf(java.lang.Object node)
if (node == null) {
throw new IllegalArgumentException("node is null");
}
AST t = (AST)node;
return t.getFirstChild() == null;
|
public void | removeTreeModelListener(javax.swing.event.TreeModelListener l)
|
public void | valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
System.out.println("heh, who is calling this mystery method?");
|