home *** CD-ROM | disk | FTP | other *** search
- class TreeDisplay {
- private int count;
- private TreeNode[] nodeList;
- private int length;
-
- public TreeDisplay(int var1) {
- this.length = var1;
- this.nodeList = new TreeNode[var1];
- }
-
- public TreeNode getLine(int var1) {
- return var1 >= this.length ? null : this.nodeList[var1];
- }
-
- public void updateDisplay(Tree var1) {
- TreeNode var2 = var1.getRoot();
- if (var2 != null) {
- for(int var3 = 0; var3 < this.length; ++var3) {
- this.nodeList[var3] = null;
- }
-
- this.count = 0;
- var2 = var2.nextNode != null ? var2.nextNode : var2.subNode;
- this.updateLoop(var2);
- }
- }
-
- private void updateLoop(TreeNode var1) {
- if (var1 != null) {
- this.nodeList[this.count++] = var1;
- if (var1.data.open) {
- this.updateLoop(var1.subNode);
- }
-
- this.updateLoop(var1.nextNode);
- }
- }
- }
-