void makeChildren() { children = new ArrayList<>(); if (var instanceof Structure) { Structure s = (Structure) var; List vars = s.getVariables(); for (int i = 0; i < vars.size(); i++) children.add(new VariableNode(this, (VariableIF) vars.get(i))); } if (debugTree) System.out.println("children=" + var.getShortName() + " "); }
public String toString() { return var.getShortName(); }
public int getIndex(TreeNode child) { if (debugTree) System.out.println("getIndex=" + var.getShortName() + " " + child); return children.indexOf(child); }
VariableNode(TreeNode parent, VariableIF var) { this.parent = parent; this.var = var; if (debugTree) System.out.println("new var=" + var.getShortName() + " "); // firePropertyChangeEvent(new PropertyChangeEvent(this, "TreeNode", null, var)); }