Method from net.sourceforge.jbird.chklst.ChecklistNode Detail: |
public Enumeration children() {
return null;
}
Implements TreeNode. Not implemented. Returns null. |
public boolean getAllowsChildren() {
return true;
}
Implements TreeNode. Always returns true. |
public TreeNode getChildAt(int childidx) {
int[] values = getChildren();
return new ChecklistNode(values[childidx], clistdb);
}
|
public int getChildCount() {
int answer = 0;
try {
answer = clistdb.getChildCount(list_no);
} catch (SQLException sqle) {
clistdb.getLogListener().exception(sqle);
}
return answer;
}
|
public final int[] getChildren() {
int[] answer = null;
try {
answer = clistdb.getChildNumbers(list_no);
}
catch (SQLException sqle) {
clistdb.getLogListener().exception(sqle);
}
return answer;
}
Return an integer array that contains db primary keys
of the children of this node. Keys are order
of alphabetized checklist names. |
public int getIndex(TreeNode node) {
int wanted = ((ChecklistNode)node).getListNum();
int[] values = getChildren();
for (int idx = 0; idx < values.length; idx ++) {
if (values[idx] == wanted) {
return idx;
}
}
return -1;
}
|
public final int getListNum() {
return list_no;
}
Return primary key of this checklist in the
database. |
public TreeNode getParent() {
TreeNode answer = null;
try {
answer = new ChecklistNode(
clistdb.getParentListNum(list_no), clistdb);
}
catch (SQLException sqle) {
clistdb.getLogListener().exception(sqle);
}
return answer;
}
|
public final int getParentListNum() {
ChecklistNode parent = (ChecklistNode)getParent();
return parent.getListNum();
}
|
public boolean isLeaf() {
boolean answer = false;
if (getChildCount() == 0) {
answer = true;
}
return answer;
}
|
public String toString() {
String answer = "";
try {
answer = clistdb.getTreeName(list_no);
} catch (SQLException sqle) {
// probably not necessary to do anything because
// getChecklistInfo logs exceptions.
}
return answer;
}
Return name of checklist in form suitable for displaying
in a JTree component. |