Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / javax / swing / tree / DefaultMutableTreeNode.js
index 0102651..75564ff 100644 (file)
-Clazz.declarePackage ("javax.swing.tree");\r
-Clazz.load (["java.util.Enumeration", "javax.swing.tree.MutableTreeNode", "java.util.NoSuchElementException"], "javax.swing.tree.DefaultMutableTreeNode", ["java.lang.ArrayIndexOutOfBoundsException", "$.Error", "$.IllegalArgumentException", "$.IllegalStateException", "java.util.Stack", "$.Vector"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.parent = null;\r
-this.$children = null;\r
-this.userObject = null;\r
-this.allowsChildren = false;\r
-if (!Clazz.isClassDefined ("javax.swing.tree.DefaultMutableTreeNode.PreorderEnumeration")) {\r
-javax.swing.tree.DefaultMutableTreeNode.$DefaultMutableTreeNode$PreorderEnumeration$ ();\r
-}\r
-if (!Clazz.isClassDefined ("javax.swing.tree.DefaultMutableTreeNode.PostorderEnumeration")) {\r
-javax.swing.tree.DefaultMutableTreeNode.$DefaultMutableTreeNode$PostorderEnumeration$ ();\r
-}\r
-if (!Clazz.isClassDefined ("javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration")) {\r
-javax.swing.tree.DefaultMutableTreeNode.$DefaultMutableTreeNode$BreadthFirstEnumeration$ ();\r
-}\r
-if (!Clazz.isClassDefined ("javax.swing.tree.DefaultMutableTreeNode.PathBetweenNodesEnumeration")) {\r
-javax.swing.tree.DefaultMutableTreeNode.$DefaultMutableTreeNode$PathBetweenNodesEnumeration$ ();\r
-}\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.tree, "DefaultMutableTreeNode", null, [Cloneable, javax.swing.tree.MutableTreeNode]);\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-this.construct (null);\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (userObject) {\r
-this.construct (userObject, true);\r
-}, "~O");\r
-Clazz.makeConstructor (c$, \r
-function (userObject, allowsChildren) {\r
-this.parent = null;\r
-this.allowsChildren = allowsChildren;\r
-this.userObject = userObject;\r
-}, "~O,~B");\r
-Clazz.overrideMethod (c$, "insert", \r
-function (newChild, childIndex) {\r
-if (!this.allowsChildren) {\r
-throw  new IllegalStateException ("node does not allow children");\r
-} else if (newChild == null) {\r
-throw  new IllegalArgumentException ("new child is null");\r
-} else if (this.isNodeAncestor (newChild)) {\r
-throw  new IllegalArgumentException ("new child is an ancestor");\r
-}var oldParent = newChild.getParent ();\r
-if (oldParent != null) {\r
-oldParent.remove (newChild);\r
-}newChild.setParent (this);\r
-if (this.$children == null) {\r
-this.$children =  new java.util.Vector ();\r
-}this.$children.insertElementAt (newChild, childIndex);\r
-}, "javax.swing.tree.MutableTreeNode,~N");\r
-Clazz.defineMethod (c$, "remove", \r
-function (childIndex) {\r
-var child = this.getChildAt (childIndex);\r
-this.$children.removeElementAt (childIndex);\r
-child.setParent (null);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "setParent", \r
-function (newParent) {\r
-this.parent = newParent;\r
-}, "javax.swing.tree.MutableTreeNode");\r
-Clazz.defineMethod (c$, "getParent", \r
-function () {\r
-return this.parent;\r
-});\r
-Clazz.overrideMethod (c$, "getChildAt", \r
-function (index) {\r
-if (this.$children == null) {\r
-throw  new ArrayIndexOutOfBoundsException ("node has no children");\r
-}return this.$children.elementAt (index);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getChildCount", \r
-function () {\r
-if (this.$children == null) {\r
-return 0;\r
-} else {\r
-return this.$children.size ();\r
-}});\r
-Clazz.overrideMethod (c$, "getIndex", \r
-function (aChild) {\r
-if (aChild == null) {\r
-throw  new IllegalArgumentException ("argument is null");\r
-}if (!this.isNodeChild (aChild)) {\r
-return -1;\r
-}return this.$children.indexOf (aChild);\r
-}, "javax.swing.tree.TreeNode");\r
-Clazz.defineMethod (c$, "children", \r
-function () {\r
-if (this.$children == null) {\r
-return javax.swing.tree.DefaultMutableTreeNode.EMPTY_ENUMERATION;\r
-} else {\r
-return this.$children.elements ();\r
-}});\r
-Clazz.defineMethod (c$, "setAllowsChildren", \r
-function (allows) {\r
-if (allows != this.allowsChildren) {\r
-this.allowsChildren = allows;\r
-if (!this.allowsChildren) {\r
-this.removeAllChildren ();\r
-}}}, "~B");\r
-Clazz.overrideMethod (c$, "getAllowsChildren", \r
-function () {\r
-return this.allowsChildren;\r
-});\r
-Clazz.overrideMethod (c$, "setUserObject", \r
-function (userObject) {\r
-this.userObject = userObject;\r
-}, "~O");\r
-Clazz.defineMethod (c$, "getUserObject", \r
-function () {\r
-return this.userObject;\r
-});\r
-Clazz.overrideMethod (c$, "removeFromParent", \r
-function () {\r
-var parent = this.getParent ();\r
-if (parent != null) {\r
-parent.remove (this);\r
-}});\r
-Clazz.defineMethod (c$, "remove", \r
-function (aChild) {\r
-if (aChild == null) {\r
-throw  new IllegalArgumentException ("argument is null");\r
-}if (!this.isNodeChild (aChild)) {\r
-throw  new IllegalArgumentException ("argument is not a child");\r
-}this.remove (this.getIndex (aChild));\r
-}, "javax.swing.tree.MutableTreeNode");\r
-Clazz.defineMethod (c$, "removeAllChildren", \r
-function () {\r
-for (var i = this.getChildCount () - 1; i >= 0; i--) {\r
-this.remove (i);\r
-}\r
-});\r
-Clazz.defineMethod (c$, "add", \r
-function (newChild) {\r
-if (newChild != null && newChild.getParent () === this) this.insert (newChild, this.getChildCount () - 1);\r
- else this.insert (newChild, this.getChildCount ());\r
-}, "javax.swing.tree.MutableTreeNode");\r
-Clazz.defineMethod (c$, "isNodeAncestor", \r
-function (anotherNode) {\r
-if (anotherNode == null) {\r
-return false;\r
-}var ancestor = this;\r
-do {\r
-if (ancestor === anotherNode) {\r
-return true;\r
-}} while ((ancestor = ancestor.getParent ()) != null);\r
-return false;\r
-}, "javax.swing.tree.TreeNode");\r
-Clazz.defineMethod (c$, "isNodeDescendant", \r
-function (anotherNode) {\r
-if (anotherNode == null) return false;\r
-return anotherNode.isNodeAncestor (this);\r
-}, "javax.swing.tree.DefaultMutableTreeNode");\r
-Clazz.defineMethod (c$, "getSharedAncestor", \r
-function (aNode) {\r
-if (aNode === this) {\r
-return this;\r
-} else if (aNode == null) {\r
-return null;\r
-}var level1;\r
-var level2;\r
-var diff;\r
-var node1;\r
-var node2;\r
-level1 = this.getLevel ();\r
-level2 = aNode.getLevel ();\r
-if (level2 > level1) {\r
-diff = level2 - level1;\r
-node1 = aNode;\r
-node2 = this;\r
-} else {\r
-diff = level1 - level2;\r
-node1 = this;\r
-node2 = aNode;\r
-}while (diff > 0) {\r
-node1 = node1.getParent ();\r
-diff--;\r
-}\r
-do {\r
-if (node1 === node2) {\r
-return node1;\r
-}node1 = node1.getParent ();\r
-node2 = node2.getParent ();\r
-} while (node1 != null);\r
-if (node1 != null || node2 != null) {\r
-throw  new Error ("nodes should be null");\r
-}return null;\r
-}, "javax.swing.tree.DefaultMutableTreeNode");\r
-Clazz.defineMethod (c$, "isNodeRelated", \r
-function (aNode) {\r
-return (aNode != null) && (this.getRoot () === aNode.getRoot ());\r
-}, "javax.swing.tree.DefaultMutableTreeNode");\r
-Clazz.defineMethod (c$, "getDepth", \r
-function () {\r
-var last = null;\r
-var enum_ = this.breadthFirstEnumeration ();\r
-while (enum_.hasMoreElements ()) {\r
-last = enum_.nextElement ();\r
-}\r
-if (last == null) {\r
-throw  new Error ("nodes should be null");\r
-}return (last).getLevel () - this.getLevel ();\r
-});\r
-Clazz.defineMethod (c$, "getLevel", \r
-function () {\r
-var ancestor;\r
-var levels = 0;\r
-ancestor = this;\r
-while ((ancestor = ancestor.getParent ()) != null) {\r
-levels++;\r
-}\r
-return levels;\r
-});\r
-Clazz.defineMethod (c$, "getPath", \r
-function () {\r
-return this.getPathToRoot (this, 0);\r
-});\r
-Clazz.defineMethod (c$, "getPathToRoot", \r
-function (aNode, depth) {\r
-var retNodes;\r
-if (aNode == null) {\r
-if (depth == 0) return null;\r
- else retNodes =  new Array (depth);\r
-} else {\r
-depth++;\r
-retNodes = this.getPathToRoot (aNode.getParent (), depth);\r
-retNodes[retNodes.length - depth] = aNode;\r
-}return retNodes;\r
-}, "javax.swing.tree.TreeNode,~N");\r
-Clazz.defineMethod (c$, "getUserObjectPath", \r
-function () {\r
-var realPath = this.getPath ();\r
-var retPath =  new Array (realPath.length);\r
-for (var counter = 0; counter < realPath.length; counter++) retPath[counter] = (realPath[counter]).getUserObject ();\r
-\r
-return retPath;\r
-});\r
-Clazz.defineMethod (c$, "getRoot", \r
-function () {\r
-var ancestor = this;\r
-var previous;\r
-do {\r
-previous = ancestor;\r
-ancestor = ancestor.getParent ();\r
-} while (ancestor != null);\r
-return previous;\r
-});\r
-Clazz.defineMethod (c$, "isRoot", \r
-function () {\r
-return this.getParent () == null;\r
-});\r
-Clazz.defineMethod (c$, "getNextNode", \r
-function () {\r
-if (this.getChildCount () == 0) {\r
-var nextSibling = this.getNextSibling ();\r
-if (nextSibling == null) {\r
-var aNode = this.getParent ();\r
-do {\r
-if (aNode == null) {\r
-return null;\r
-}nextSibling = aNode.getNextSibling ();\r
-if (nextSibling != null) {\r
-return nextSibling;\r
-}aNode = aNode.getParent ();\r
-} while (true);\r
-} else {\r
-return nextSibling;\r
-}} else {\r
-return this.getChildAt (0);\r
-}});\r
-Clazz.defineMethod (c$, "getPreviousNode", \r
-function () {\r
-var previousSibling;\r
-var myParent = this.getParent ();\r
-if (myParent == null) {\r
-return null;\r
-}previousSibling = this.getPreviousSibling ();\r
-if (previousSibling != null) {\r
-if (previousSibling.getChildCount () == 0) return previousSibling;\r
- else return previousSibling.getLastLeaf ();\r
-} else {\r
-return myParent;\r
-}});\r
-Clazz.defineMethod (c$, "preorderEnumeration", \r
-function () {\r
-return Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.PreorderEnumeration, this, null, this);\r
-});\r
-Clazz.defineMethod (c$, "postorderEnumeration", \r
-function () {\r
-return Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.PostorderEnumeration, this, null, this);\r
-});\r
-Clazz.defineMethod (c$, "breadthFirstEnumeration", \r
-function () {\r
-return Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration, this, null, this);\r
-});\r
-Clazz.defineMethod (c$, "depthFirstEnumeration", \r
-function () {\r
-return this.postorderEnumeration ();\r
-});\r
-Clazz.defineMethod (c$, "pathFromAncestorEnumeration", \r
-function (ancestor) {\r
-return Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.PathBetweenNodesEnumeration, this, null, ancestor, this);\r
-}, "javax.swing.tree.TreeNode");\r
-Clazz.defineMethod (c$, "isNodeChild", \r
-function (aNode) {\r
-var retval;\r
-if (aNode == null) {\r
-retval = false;\r
-} else {\r
-if (this.getChildCount () == 0) {\r
-retval = false;\r
-} else {\r
-retval = (aNode.getParent () === this);\r
-}}return retval;\r
-}, "javax.swing.tree.TreeNode");\r
-Clazz.defineMethod (c$, "getFirstChild", \r
-function () {\r
-if (this.getChildCount () == 0) {\r
-throw  new java.util.NoSuchElementException ("node has no children");\r
-}return this.getChildAt (0);\r
-});\r
-Clazz.defineMethod (c$, "getLastChild", \r
-function () {\r
-if (this.getChildCount () == 0) {\r
-throw  new java.util.NoSuchElementException ("node has no children");\r
-}return this.getChildAt (this.getChildCount () - 1);\r
-});\r
-Clazz.defineMethod (c$, "getChildAfter", \r
-function (aChild) {\r
-if (aChild == null) {\r
-throw  new IllegalArgumentException ("argument is null");\r
-}var index = this.getIndex (aChild);\r
-if (index == -1) {\r
-throw  new IllegalArgumentException ("node is not a child");\r
-}if (index < this.getChildCount () - 1) {\r
-return this.getChildAt (index + 1);\r
-} else {\r
-return null;\r
-}}, "javax.swing.tree.TreeNode");\r
-Clazz.defineMethod (c$, "getChildBefore", \r
-function (aChild) {\r
-if (aChild == null) {\r
-throw  new IllegalArgumentException ("argument is null");\r
-}var index = this.getIndex (aChild);\r
-if (index == -1) {\r
-throw  new IllegalArgumentException ("argument is not a child");\r
-}if (index > 0) {\r
-return this.getChildAt (index - 1);\r
-} else {\r
-return null;\r
-}}, "javax.swing.tree.TreeNode");\r
-Clazz.defineMethod (c$, "isNodeSibling", \r
-function (anotherNode) {\r
-var retval;\r
-if (anotherNode == null) {\r
-retval = false;\r
-} else if (anotherNode === this) {\r
-retval = true;\r
-} else {\r
-var myParent = this.getParent ();\r
-retval = (myParent != null && myParent === anotherNode.getParent ());\r
-if (retval && !(this.getParent ()).isNodeChild (anotherNode)) {\r
-throw  new Error ("sibling has different parent");\r
-}}return retval;\r
-}, "javax.swing.tree.TreeNode");\r
-Clazz.defineMethod (c$, "getSiblingCount", \r
-function () {\r
-var myParent = this.getParent ();\r
-if (myParent == null) {\r
-return 1;\r
-} else {\r
-return myParent.getChildCount ();\r
-}});\r
-Clazz.defineMethod (c$, "getNextSibling", \r
-function () {\r
-var retval;\r
-var myParent = this.getParent ();\r
-if (myParent == null) {\r
-retval = null;\r
-} else {\r
-retval = myParent.getChildAfter (this);\r
-}if (retval != null && !this.isNodeSibling (retval)) {\r
-throw  new Error ("child of parent is not a sibling");\r
-}return retval;\r
-});\r
-Clazz.defineMethod (c$, "getPreviousSibling", \r
-function () {\r
-var retval;\r
-var myParent = this.getParent ();\r
-if (myParent == null) {\r
-retval = null;\r
-} else {\r
-retval = myParent.getChildBefore (this);\r
-}if (retval != null && !this.isNodeSibling (retval)) {\r
-throw  new Error ("child of parent is not a sibling");\r
-}return retval;\r
-});\r
-Clazz.defineMethod (c$, "isLeaf", \r
-function () {\r
-return (this.getChildCount () == 0);\r
-});\r
-Clazz.defineMethod (c$, "getFirstLeaf", \r
-function () {\r
-var node = this;\r
-while (!node.isLeaf ()) {\r
-node = node.getFirstChild ();\r
-}\r
-return node;\r
-});\r
-Clazz.defineMethod (c$, "getLastLeaf", \r
-function () {\r
-var node = this;\r
-while (!node.isLeaf ()) {\r
-node = node.getLastChild ();\r
-}\r
-return node;\r
-});\r
-Clazz.defineMethod (c$, "getNextLeaf", \r
-function () {\r
-var nextSibling;\r
-var myParent = this.getParent ();\r
-if (myParent == null) return null;\r
-nextSibling = this.getNextSibling ();\r
-if (nextSibling != null) return nextSibling.getFirstLeaf ();\r
-return myParent.getNextLeaf ();\r
-});\r
-Clazz.defineMethod (c$, "getPreviousLeaf", \r
-function () {\r
-var previousSibling;\r
-var myParent = this.getParent ();\r
-if (myParent == null) return null;\r
-previousSibling = this.getPreviousSibling ();\r
-if (previousSibling != null) return previousSibling.getLastLeaf ();\r
-return myParent.getPreviousLeaf ();\r
-});\r
-Clazz.defineMethod (c$, "getLeafCount", \r
-function () {\r
-var count = 0;\r
-var node;\r
-var enum_ = this.breadthFirstEnumeration ();\r
-while (enum_.hasMoreElements ()) {\r
-node = enum_.nextElement ();\r
-if (node.isLeaf ()) {\r
-count++;\r
-}}\r
-if (count < 1) {\r
-throw  new Error ("tree has zero leaves");\r
-}return count;\r
-});\r
-Clazz.defineMethod (c$, "toString", \r
-function () {\r
-if (this.userObject == null) {\r
-return null;\r
-} else {\r
-return this.userObject.toString ();\r
-}});\r
-Clazz.defineMethod (c$, "clone", \r
-function () {\r
-var newNode = null;\r
-try {\r
-newNode = Clazz.superCall (this, javax.swing.tree.DefaultMutableTreeNode, "clone", []);\r
-newNode.$children = null;\r
-newNode.parent = null;\r
-} catch (e) {\r
-if (Clazz.exceptionOf (e, CloneNotSupportedException)) {\r
-throw  new Error (e.toString ());\r
-} else {\r
-throw e;\r
-}\r
-}\r
-return newNode;\r
-});\r
-c$.$DefaultMutableTreeNode$PreorderEnumeration$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.stack = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.tree.DefaultMutableTreeNode, "PreorderEnumeration", null, java.util.Enumeration);\r
-Clazz.makeConstructor (c$, \r
-function (a) {\r
-var b =  new java.util.Vector (1);\r
-b.addElement (a);\r
-this.stack =  new java.util.Stack ();\r
-this.stack.push (b.elements ());\r
-}, "javax.swing.tree.TreeNode");\r
-Clazz.overrideMethod (c$, "hasMoreElements", \r
-function () {\r
-return (!this.stack.empty () && (this.stack.peek ()).hasMoreElements ());\r
-});\r
-Clazz.overrideMethod (c$, "nextElement", \r
-function () {\r
-var a = this.stack.peek ();\r
-var b = a.nextElement ();\r
-var c = b.children ();\r
-if (!a.hasMoreElements ()) {\r
-this.stack.pop ();\r
-}if (c.hasMoreElements ()) {\r
-this.stack.push (c);\r
-}return b;\r
-});\r
-c$ = Clazz.p0p ();\r
-};\r
-c$.$DefaultMutableTreeNode$PostorderEnumeration$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.root = null;\r
-this.children = null;\r
-this.subtree = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.tree.DefaultMutableTreeNode, "PostorderEnumeration", null, java.util.Enumeration);\r
-Clazz.makeConstructor (c$, \r
-function (a) {\r
-this.root = a;\r
-this.children = this.root.children ();\r
-this.subtree = javax.swing.tree.DefaultMutableTreeNode.EMPTY_ENUMERATION;\r
-}, "javax.swing.tree.TreeNode");\r
-Clazz.defineMethod (c$, "hasMoreElements", \r
-function () {\r
-return this.root != null;\r
-});\r
-Clazz.defineMethod (c$, "nextElement", \r
-function () {\r
-var a;\r
-if (this.subtree.hasMoreElements ()) {\r
-a = this.subtree.nextElement ();\r
-} else if (this.children.hasMoreElements ()) {\r
-this.subtree = Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.PostorderEnumeration, this, null, this.children.nextElement ());\r
-a = this.subtree.nextElement ();\r
-} else {\r
-a = this.root;\r
-this.root = null;\r
-}return a;\r
-});\r
-c$ = Clazz.p0p ();\r
-};\r
-c$.$DefaultMutableTreeNode$BreadthFirstEnumeration$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.queue = null;\r
-if (!Clazz.isClassDefined ("javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue")) {\r
-javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.$DefaultMutableTreeNode$BreadthFirstEnumeration$Queue$ ();\r
-}\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.tree.DefaultMutableTreeNode, "BreadthFirstEnumeration", null, java.util.Enumeration);\r
-Clazz.makeConstructor (c$, \r
-function (a) {\r
-var b =  new java.util.Vector (1);\r
-b.addElement (a);\r
-this.queue = Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue, this, null);\r
-this.queue.enqueue (b.elements ());\r
-}, "javax.swing.tree.TreeNode");\r
-Clazz.overrideMethod (c$, "hasMoreElements", \r
-function () {\r
-return (!this.queue.isEmpty () && (this.queue.firstObject ()).hasMoreElements ());\r
-});\r
-Clazz.overrideMethod (c$, "nextElement", \r
-function () {\r
-var a = this.queue.firstObject ();\r
-var b = a.nextElement ();\r
-var c = b.children ();\r
-if (!a.hasMoreElements ()) {\r
-this.queue.dequeue ();\r
-}if (c.hasMoreElements ()) {\r
-this.queue.enqueue (c);\r
-}return b;\r
-});\r
-c$.$DefaultMutableTreeNode$BreadthFirstEnumeration$Queue$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.head = null;\r
-this.tail = null;\r
-if (!Clazz.isClassDefined ("javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode")) {\r
-javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.$DefaultMutableTreeNode$BreadthFirstEnumeration$Queue$QNode$ ();\r
-}\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration, "Queue");\r
-Clazz.defineMethod (c$, "enqueue", \r
-function (a) {\r
-if (this.head == null) {\r
-this.head = this.tail = Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode, this, null, a, null);\r
-} else {\r
-this.tail.next = Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode, this, null, a, null);\r
-this.tail = this.tail.next;\r
-}}, "~O");\r
-Clazz.defineMethod (c$, "dequeue", \r
-function () {\r
-if (this.head == null) {\r
-throw  new java.util.NoSuchElementException ("No more elements");\r
-}var a = this.head.object;\r
-var b = this.head;\r
-this.head = this.head.next;\r
-if (this.head == null) {\r
-this.tail = null;\r
-} else {\r
-b.next = null;\r
-}return a;\r
-});\r
-Clazz.defineMethod (c$, "firstObject", \r
-function () {\r
-if (this.head == null) {\r
-throw  new java.util.NoSuchElementException ("No more elements");\r
-}return this.head.object;\r
-});\r
-Clazz.defineMethod (c$, "isEmpty", \r
-function () {\r
-return this.head == null;\r
-});\r
-c$.$DefaultMutableTreeNode$BreadthFirstEnumeration$Queue$QNode$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.object = null;\r
-this.next = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue, "QNode");\r
-Clazz.makeConstructor (c$, \r
-function (a, b) {\r
-this.object = a;\r
-this.next = b;\r
-}, "~O,javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode");\r
-c$ = Clazz.p0p ();\r
-};\r
-c$ = Clazz.p0p ();\r
-};\r
-c$ = Clazz.p0p ();\r
-};\r
-c$.$DefaultMutableTreeNode$PathBetweenNodesEnumeration$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.stack = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.tree.DefaultMutableTreeNode, "PathBetweenNodesEnumeration", null, java.util.Enumeration);\r
-Clazz.makeConstructor (c$, \r
-function (a, b) {\r
-if (a == null || b == null) {\r
-throw  new IllegalArgumentException ("argument is null");\r
-}var c;\r
-this.stack =  new java.util.Stack ();\r
-this.stack.push (b);\r
-c = b;\r
-while (c !== a) {\r
-c = c.getParent ();\r
-if (c == null && b !== a) {\r
-throw  new IllegalArgumentException ("node " + a + " is not an ancestor of " + b);\r
-}this.stack.push (c);\r
-}\r
-}, "javax.swing.tree.TreeNode,javax.swing.tree.TreeNode");\r
-Clazz.overrideMethod (c$, "hasMoreElements", \r
-function () {\r
-return this.stack.size () > 0;\r
-});\r
-Clazz.overrideMethod (c$, "nextElement", \r
-function () {\r
-try {\r
-return this.stack.pop ();\r
-} catch (e) {\r
-if (Clazz.exceptionOf (e, java.util.EmptyStackException)) {\r
-throw  new java.util.NoSuchElementException ("No more elements");\r
-} else {\r
-throw e;\r
-}\r
-}\r
-});\r
-c$ = Clazz.p0p ();\r
-};\r
-c$.$DefaultMutableTreeNode$1$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.declareAnonymous (javax.swing.tree, "DefaultMutableTreeNode$1", null, java.util.Enumeration);\r
-Clazz.defineMethod (c$, "hasMoreElements", \r
-function () {\r
-return false;\r
-});\r
-Clazz.defineMethod (c$, "nextElement", \r
-function () {\r
-throw  new java.util.NoSuchElementException ("No more elements");\r
-});\r
-c$ = Clazz.p0p ();\r
-};\r
-c$.EMPTY_ENUMERATION = c$.prototype.EMPTY_ENUMERATION = ((Clazz.isClassDefined ("javax.swing.tree.DefaultMutableTreeNode$1") ? 0 : javax.swing.tree.DefaultMutableTreeNode.$DefaultMutableTreeNode$1$ ()), Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode$1, this, null));\r
-});\r
+Clazz.declarePackage ("javax.swing.tree");
+Clazz.load (["java.util.Enumeration", "javax.swing.tree.MutableTreeNode", "java.util.NoSuchElementException"], "javax.swing.tree.DefaultMutableTreeNode", ["java.lang.ArrayIndexOutOfBoundsException", "$.Error", "$.IllegalArgumentException", "$.IllegalStateException", "java.util.Stack", "$.Vector"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.parent = null;
+this.$children = null;
+this.userObject = null;
+this.allowsChildren = false;
+if (!Clazz.isClassDefined ("javax.swing.tree.DefaultMutableTreeNode.PreorderEnumeration")) {
+javax.swing.tree.DefaultMutableTreeNode.$DefaultMutableTreeNode$PreorderEnumeration$ ();
+}
+if (!Clazz.isClassDefined ("javax.swing.tree.DefaultMutableTreeNode.PostorderEnumeration")) {
+javax.swing.tree.DefaultMutableTreeNode.$DefaultMutableTreeNode$PostorderEnumeration$ ();
+}
+if (!Clazz.isClassDefined ("javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration")) {
+javax.swing.tree.DefaultMutableTreeNode.$DefaultMutableTreeNode$BreadthFirstEnumeration$ ();
+}
+if (!Clazz.isClassDefined ("javax.swing.tree.DefaultMutableTreeNode.PathBetweenNodesEnumeration")) {
+javax.swing.tree.DefaultMutableTreeNode.$DefaultMutableTreeNode$PathBetweenNodesEnumeration$ ();
+}
+Clazz.instantialize (this, arguments);
+}, javax.swing.tree, "DefaultMutableTreeNode", null, [Cloneable, javax.swing.tree.MutableTreeNode]);
+Clazz.makeConstructor (c$, 
+function () {
+this.construct (null);
+});
+Clazz.makeConstructor (c$, 
+function (userObject) {
+this.construct (userObject, true);
+}, "~O");
+Clazz.makeConstructor (c$, 
+function (userObject, allowsChildren) {
+this.parent = null;
+this.allowsChildren = allowsChildren;
+this.userObject = userObject;
+}, "~O,~B");
+Clazz.overrideMethod (c$, "insert", 
+function (newChild, childIndex) {
+if (!this.allowsChildren) {
+throw  new IllegalStateException ("node does not allow children");
+} else if (newChild == null) {
+throw  new IllegalArgumentException ("new child is null");
+} else if (this.isNodeAncestor (newChild)) {
+throw  new IllegalArgumentException ("new child is an ancestor");
+}var oldParent = newChild.getParent ();
+if (oldParent != null) {
+oldParent.remove (newChild);
+}newChild.setParent (this);
+if (this.$children == null) {
+this.$children =  new java.util.Vector ();
+}this.$children.insertElementAt (newChild, childIndex);
+}, "javax.swing.tree.MutableTreeNode,~N");
+Clazz.defineMethod (c$, "remove", 
+function (childIndex) {
+var child = this.getChildAt (childIndex);
+this.$children.removeElementAt (childIndex);
+child.setParent (null);
+}, "~N");
+Clazz.defineMethod (c$, "setParent", 
+function (newParent) {
+this.parent = newParent;
+}, "javax.swing.tree.MutableTreeNode");
+Clazz.defineMethod (c$, "getParent", 
+function () {
+return this.parent;
+});
+Clazz.overrideMethod (c$, "getChildAt", 
+function (index) {
+if (this.$children == null) {
+throw  new ArrayIndexOutOfBoundsException ("node has no children");
+}return this.$children.elementAt (index);
+}, "~N");
+Clazz.defineMethod (c$, "getChildCount", 
+function () {
+if (this.$children == null) {
+return 0;
+} else {
+return this.$children.size ();
+}});
+Clazz.overrideMethod (c$, "getIndex", 
+function (aChild) {
+if (aChild == null) {
+throw  new IllegalArgumentException ("argument is null");
+}if (!this.isNodeChild (aChild)) {
+return -1;
+}return this.$children.indexOf (aChild);
+}, "javax.swing.tree.TreeNode");
+Clazz.defineMethod (c$, "children", 
+function () {
+if (this.$children == null) {
+return javax.swing.tree.DefaultMutableTreeNode.EMPTY_ENUMERATION;
+} else {
+return this.$children.elements ();
+}});
+Clazz.defineMethod (c$, "setAllowsChildren", 
+function (allows) {
+if (allows != this.allowsChildren) {
+this.allowsChildren = allows;
+if (!this.allowsChildren) {
+this.removeAllChildren ();
+}}}, "~B");
+Clazz.overrideMethod (c$, "getAllowsChildren", 
+function () {
+return this.allowsChildren;
+});
+Clazz.overrideMethod (c$, "setUserObject", 
+function (userObject) {
+this.userObject = userObject;
+}, "~O");
+Clazz.defineMethod (c$, "getUserObject", 
+function () {
+return this.userObject;
+});
+Clazz.overrideMethod (c$, "removeFromParent", 
+function () {
+var parent = this.getParent ();
+if (parent != null) {
+parent.remove (this);
+}});
+Clazz.defineMethod (c$, "remove", 
+function (aChild) {
+if (aChild == null) {
+throw  new IllegalArgumentException ("argument is null");
+}if (!this.isNodeChild (aChild)) {
+throw  new IllegalArgumentException ("argument is not a child");
+}this.remove (this.getIndex (aChild));
+}, "javax.swing.tree.MutableTreeNode");
+Clazz.defineMethod (c$, "removeAllChildren", 
+function () {
+for (var i = this.getChildCount () - 1; i >= 0; i--) {
+this.remove (i);
+}
+});
+Clazz.defineMethod (c$, "add", 
+function (newChild) {
+if (newChild != null && newChild.getParent () === this) this.insert (newChild, this.getChildCount () - 1);
+ else this.insert (newChild, this.getChildCount ());
+}, "javax.swing.tree.MutableTreeNode");
+Clazz.defineMethod (c$, "isNodeAncestor", 
+function (anotherNode) {
+if (anotherNode == null) {
+return false;
+}var ancestor = this;
+do {
+if (ancestor === anotherNode) {
+return true;
+}} while ((ancestor = ancestor.getParent ()) != null);
+return false;
+}, "javax.swing.tree.TreeNode");
+Clazz.defineMethod (c$, "isNodeDescendant", 
+function (anotherNode) {
+if (anotherNode == null) return false;
+return anotherNode.isNodeAncestor (this);
+}, "javax.swing.tree.DefaultMutableTreeNode");
+Clazz.defineMethod (c$, "getSharedAncestor", 
+function (aNode) {
+if (aNode === this) {
+return this;
+} else if (aNode == null) {
+return null;
+}var level1;
+var level2;
+var diff;
+var node1;
+var node2;
+level1 = this.getLevel ();
+level2 = aNode.getLevel ();
+if (level2 > level1) {
+diff = level2 - level1;
+node1 = aNode;
+node2 = this;
+} else {
+diff = level1 - level2;
+node1 = this;
+node2 = aNode;
+}while (diff > 0) {
+node1 = node1.getParent ();
+diff--;
+}
+do {
+if (node1 === node2) {
+return node1;
+}node1 = node1.getParent ();
+node2 = node2.getParent ();
+} while (node1 != null);
+if (node1 != null || node2 != null) {
+throw  new Error ("nodes should be null");
+}return null;
+}, "javax.swing.tree.DefaultMutableTreeNode");
+Clazz.defineMethod (c$, "isNodeRelated", 
+function (aNode) {
+return (aNode != null) && (this.getRoot () === aNode.getRoot ());
+}, "javax.swing.tree.DefaultMutableTreeNode");
+Clazz.defineMethod (c$, "getDepth", 
+function () {
+var last = null;
+var enum_ = this.breadthFirstEnumeration ();
+while (enum_.hasMoreElements ()) {
+last = enum_.nextElement ();
+}
+if (last == null) {
+throw  new Error ("nodes should be null");
+}return (last).getLevel () - this.getLevel ();
+});
+Clazz.defineMethod (c$, "getLevel", 
+function () {
+var ancestor;
+var levels = 0;
+ancestor = this;
+while ((ancestor = ancestor.getParent ()) != null) {
+levels++;
+}
+return levels;
+});
+Clazz.defineMethod (c$, "getPath", 
+function () {
+return this.getPathToRoot (this, 0);
+});
+Clazz.defineMethod (c$, "getPathToRoot", 
+function (aNode, depth) {
+var retNodes;
+if (aNode == null) {
+if (depth == 0) return null;
+ else retNodes =  new Array (depth);
+} else {
+depth++;
+retNodes = this.getPathToRoot (aNode.getParent (), depth);
+retNodes[retNodes.length - depth] = aNode;
+}return retNodes;
+}, "javax.swing.tree.TreeNode,~N");
+Clazz.defineMethod (c$, "getUserObjectPath", 
+function () {
+var realPath = this.getPath ();
+var retPath =  new Array (realPath.length);
+for (var counter = 0; counter < realPath.length; counter++) retPath[counter] = (realPath[counter]).getUserObject ();
+
+return retPath;
+});
+Clazz.defineMethod (c$, "getRoot", 
+function () {
+var ancestor = this;
+var previous;
+do {
+previous = ancestor;
+ancestor = ancestor.getParent ();
+} while (ancestor != null);
+return previous;
+});
+Clazz.defineMethod (c$, "isRoot", 
+function () {
+return this.getParent () == null;
+});
+Clazz.defineMethod (c$, "getNextNode", 
+function () {
+if (this.getChildCount () == 0) {
+var nextSibling = this.getNextSibling ();
+if (nextSibling == null) {
+var aNode = this.getParent ();
+do {
+if (aNode == null) {
+return null;
+}nextSibling = aNode.getNextSibling ();
+if (nextSibling != null) {
+return nextSibling;
+}aNode = aNode.getParent ();
+} while (true);
+} else {
+return nextSibling;
+}} else {
+return this.getChildAt (0);
+}});
+Clazz.defineMethod (c$, "getPreviousNode", 
+function () {
+var previousSibling;
+var myParent = this.getParent ();
+if (myParent == null) {
+return null;
+}previousSibling = this.getPreviousSibling ();
+if (previousSibling != null) {
+if (previousSibling.getChildCount () == 0) return previousSibling;
+ else return previousSibling.getLastLeaf ();
+} else {
+return myParent;
+}});
+Clazz.defineMethod (c$, "preorderEnumeration", 
+function () {
+return Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.PreorderEnumeration, this, null, this);
+});
+Clazz.defineMethod (c$, "postorderEnumeration", 
+function () {
+return Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.PostorderEnumeration, this, null, this);
+});
+Clazz.defineMethod (c$, "breadthFirstEnumeration", 
+function () {
+return Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration, this, null, this);
+});
+Clazz.defineMethod (c$, "depthFirstEnumeration", 
+function () {
+return this.postorderEnumeration ();
+});
+Clazz.defineMethod (c$, "pathFromAncestorEnumeration", 
+function (ancestor) {
+return Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.PathBetweenNodesEnumeration, this, null, ancestor, this);
+}, "javax.swing.tree.TreeNode");
+Clazz.defineMethod (c$, "isNodeChild", 
+function (aNode) {
+var retval;
+if (aNode == null) {
+retval = false;
+} else {
+if (this.getChildCount () == 0) {
+retval = false;
+} else {
+retval = (aNode.getParent () === this);
+}}return retval;
+}, "javax.swing.tree.TreeNode");
+Clazz.defineMethod (c$, "getFirstChild", 
+function () {
+if (this.getChildCount () == 0) {
+throw  new java.util.NoSuchElementException ("node has no children");
+}return this.getChildAt (0);
+});
+Clazz.defineMethod (c$, "getLastChild", 
+function () {
+if (this.getChildCount () == 0) {
+throw  new java.util.NoSuchElementException ("node has no children");
+}return this.getChildAt (this.getChildCount () - 1);
+});
+Clazz.defineMethod (c$, "getChildAfter", 
+function (aChild) {
+if (aChild == null) {
+throw  new IllegalArgumentException ("argument is null");
+}var index = this.getIndex (aChild);
+if (index == -1) {
+throw  new IllegalArgumentException ("node is not a child");
+}if (index < this.getChildCount () - 1) {
+return this.getChildAt (index + 1);
+} else {
+return null;
+}}, "javax.swing.tree.TreeNode");
+Clazz.defineMethod (c$, "getChildBefore", 
+function (aChild) {
+if (aChild == null) {
+throw  new IllegalArgumentException ("argument is null");
+}var index = this.getIndex (aChild);
+if (index == -1) {
+throw  new IllegalArgumentException ("argument is not a child");
+}if (index > 0) {
+return this.getChildAt (index - 1);
+} else {
+return null;
+}}, "javax.swing.tree.TreeNode");
+Clazz.defineMethod (c$, "isNodeSibling", 
+function (anotherNode) {
+var retval;
+if (anotherNode == null) {
+retval = false;
+} else if (anotherNode === this) {
+retval = true;
+} else {
+var myParent = this.getParent ();
+retval = (myParent != null && myParent === anotherNode.getParent ());
+if (retval && !(this.getParent ()).isNodeChild (anotherNode)) {
+throw  new Error ("sibling has different parent");
+}}return retval;
+}, "javax.swing.tree.TreeNode");
+Clazz.defineMethod (c$, "getSiblingCount", 
+function () {
+var myParent = this.getParent ();
+if (myParent == null) {
+return 1;
+} else {
+return myParent.getChildCount ();
+}});
+Clazz.defineMethod (c$, "getNextSibling", 
+function () {
+var retval;
+var myParent = this.getParent ();
+if (myParent == null) {
+retval = null;
+} else {
+retval = myParent.getChildAfter (this);
+}if (retval != null && !this.isNodeSibling (retval)) {
+throw  new Error ("child of parent is not a sibling");
+}return retval;
+});
+Clazz.defineMethod (c$, "getPreviousSibling", 
+function () {
+var retval;
+var myParent = this.getParent ();
+if (myParent == null) {
+retval = null;
+} else {
+retval = myParent.getChildBefore (this);
+}if (retval != null && !this.isNodeSibling (retval)) {
+throw  new Error ("child of parent is not a sibling");
+}return retval;
+});
+Clazz.defineMethod (c$, "isLeaf", 
+function () {
+return (this.getChildCount () == 0);
+});
+Clazz.defineMethod (c$, "getFirstLeaf", 
+function () {
+var node = this;
+while (!node.isLeaf ()) {
+node = node.getFirstChild ();
+}
+return node;
+});
+Clazz.defineMethod (c$, "getLastLeaf", 
+function () {
+var node = this;
+while (!node.isLeaf ()) {
+node = node.getLastChild ();
+}
+return node;
+});
+Clazz.defineMethod (c$, "getNextLeaf", 
+function () {
+var nextSibling;
+var myParent = this.getParent ();
+if (myParent == null) return null;
+nextSibling = this.getNextSibling ();
+if (nextSibling != null) return nextSibling.getFirstLeaf ();
+return myParent.getNextLeaf ();
+});
+Clazz.defineMethod (c$, "getPreviousLeaf", 
+function () {
+var previousSibling;
+var myParent = this.getParent ();
+if (myParent == null) return null;
+previousSibling = this.getPreviousSibling ();
+if (previousSibling != null) return previousSibling.getLastLeaf ();
+return myParent.getPreviousLeaf ();
+});
+Clazz.defineMethod (c$, "getLeafCount", 
+function () {
+var count = 0;
+var node;
+var enum_ = this.breadthFirstEnumeration ();
+while (enum_.hasMoreElements ()) {
+node = enum_.nextElement ();
+if (node.isLeaf ()) {
+count++;
+}}
+if (count < 1) {
+throw  new Error ("tree has zero leaves");
+}return count;
+});
+Clazz.defineMethod (c$, "toString", 
+function () {
+if (this.userObject == null) {
+return null;
+} else {
+return this.userObject.toString ();
+}});
+Clazz.defineMethod (c$, "clone", 
+function () {
+var newNode = null;
+try {
+newNode = Clazz.superCall (this, javax.swing.tree.DefaultMutableTreeNode, "clone", []);
+newNode.$children = null;
+newNode.parent = null;
+} catch (e) {
+if (Clazz.exceptionOf (e, CloneNotSupportedException)) {
+throw  new Error (e.toString ());
+} else {
+throw e;
+}
+}
+return newNode;
+});
+c$.$DefaultMutableTreeNode$PreorderEnumeration$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.stack = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.tree.DefaultMutableTreeNode, "PreorderEnumeration", null, java.util.Enumeration);
+Clazz.makeConstructor (c$, 
+function (a) {
+var b =  new java.util.Vector (1);
+b.addElement (a);
+this.stack =  new java.util.Stack ();
+this.stack.push (b.elements ());
+}, "javax.swing.tree.TreeNode");
+Clazz.overrideMethod (c$, "hasMoreElements", 
+function () {
+return (!this.stack.empty () && (this.stack.peek ()).hasMoreElements ());
+});
+Clazz.overrideMethod (c$, "nextElement", 
+function () {
+var a = this.stack.peek ();
+var b = a.nextElement ();
+var c = b.children ();
+if (!a.hasMoreElements ()) {
+this.stack.pop ();
+}if (c.hasMoreElements ()) {
+this.stack.push (c);
+}return b;
+});
+c$ = Clazz.p0p ();
+};
+c$.$DefaultMutableTreeNode$PostorderEnumeration$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.root = null;
+this.children = null;
+this.subtree = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.tree.DefaultMutableTreeNode, "PostorderEnumeration", null, java.util.Enumeration);
+Clazz.makeConstructor (c$, 
+function (a) {
+this.root = a;
+this.children = this.root.children ();
+this.subtree = javax.swing.tree.DefaultMutableTreeNode.EMPTY_ENUMERATION;
+}, "javax.swing.tree.TreeNode");
+Clazz.defineMethod (c$, "hasMoreElements", 
+function () {
+return this.root != null;
+});
+Clazz.defineMethod (c$, "nextElement", 
+function () {
+var a;
+if (this.subtree.hasMoreElements ()) {
+a = this.subtree.nextElement ();
+} else if (this.children.hasMoreElements ()) {
+this.subtree = Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.PostorderEnumeration, this, null, this.children.nextElement ());
+a = this.subtree.nextElement ();
+} else {
+a = this.root;
+this.root = null;
+}return a;
+});
+c$ = Clazz.p0p ();
+};
+c$.$DefaultMutableTreeNode$BreadthFirstEnumeration$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.queue = null;
+if (!Clazz.isClassDefined ("javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue")) {
+javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.$DefaultMutableTreeNode$BreadthFirstEnumeration$Queue$ ();
+}
+Clazz.instantialize (this, arguments);
+}, javax.swing.tree.DefaultMutableTreeNode, "BreadthFirstEnumeration", null, java.util.Enumeration);
+Clazz.makeConstructor (c$, 
+function (a) {
+var b =  new java.util.Vector (1);
+b.addElement (a);
+this.queue = Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue, this, null);
+this.queue.enqueue (b.elements ());
+}, "javax.swing.tree.TreeNode");
+Clazz.overrideMethod (c$, "hasMoreElements", 
+function () {
+return (!this.queue.isEmpty () && (this.queue.firstObject ()).hasMoreElements ());
+});
+Clazz.overrideMethod (c$, "nextElement", 
+function () {
+var a = this.queue.firstObject ();
+var b = a.nextElement ();
+var c = b.children ();
+if (!a.hasMoreElements ()) {
+this.queue.dequeue ();
+}if (c.hasMoreElements ()) {
+this.queue.enqueue (c);
+}return b;
+});
+c$.$DefaultMutableTreeNode$BreadthFirstEnumeration$Queue$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.head = null;
+this.tail = null;
+if (!Clazz.isClassDefined ("javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode")) {
+javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.$DefaultMutableTreeNode$BreadthFirstEnumeration$Queue$QNode$ ();
+}
+Clazz.instantialize (this, arguments);
+}, javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration, "Queue");
+Clazz.defineMethod (c$, "enqueue", 
+function (a) {
+if (this.head == null) {
+this.head = this.tail = Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode, this, null, a, null);
+} else {
+this.tail.next = Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode, this, null, a, null);
+this.tail = this.tail.next;
+}}, "~O");
+Clazz.defineMethod (c$, "dequeue", 
+function () {
+if (this.head == null) {
+throw  new java.util.NoSuchElementException ("No more elements");
+}var a = this.head.object;
+var b = this.head;
+this.head = this.head.next;
+if (this.head == null) {
+this.tail = null;
+} else {
+b.next = null;
+}return a;
+});
+Clazz.defineMethod (c$, "firstObject", 
+function () {
+if (this.head == null) {
+throw  new java.util.NoSuchElementException ("No more elements");
+}return this.head.object;
+});
+Clazz.defineMethod (c$, "isEmpty", 
+function () {
+return this.head == null;
+});
+c$.$DefaultMutableTreeNode$BreadthFirstEnumeration$Queue$QNode$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.object = null;
+this.next = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue, "QNode");
+Clazz.makeConstructor (c$, 
+function (a, b) {
+this.object = a;
+this.next = b;
+}, "~O,javax.swing.tree.DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode");
+c$ = Clazz.p0p ();
+};
+c$ = Clazz.p0p ();
+};
+c$ = Clazz.p0p ();
+};
+c$.$DefaultMutableTreeNode$PathBetweenNodesEnumeration$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.stack = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.tree.DefaultMutableTreeNode, "PathBetweenNodesEnumeration", null, java.util.Enumeration);
+Clazz.makeConstructor (c$, 
+function (a, b) {
+if (a == null || b == null) {
+throw  new IllegalArgumentException ("argument is null");
+}var c;
+this.stack =  new java.util.Stack ();
+this.stack.push (b);
+c = b;
+while (c !== a) {
+c = c.getParent ();
+if (c == null && b !== a) {
+throw  new IllegalArgumentException ("node " + a + " is not an ancestor of " + b);
+}this.stack.push (c);
+}
+}, "javax.swing.tree.TreeNode,javax.swing.tree.TreeNode");
+Clazz.overrideMethod (c$, "hasMoreElements", 
+function () {
+return this.stack.size () > 0;
+});
+Clazz.overrideMethod (c$, "nextElement", 
+function () {
+try {
+return this.stack.pop ();
+} catch (e) {
+if (Clazz.exceptionOf (e, java.util.EmptyStackException)) {
+throw  new java.util.NoSuchElementException ("No more elements");
+} else {
+throw e;
+}
+}
+});
+c$ = Clazz.p0p ();
+};
+c$.$DefaultMutableTreeNode$1$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.declareAnonymous (javax.swing.tree, "DefaultMutableTreeNode$1", null, java.util.Enumeration);
+Clazz.defineMethod (c$, "hasMoreElements", 
+function () {
+return false;
+});
+Clazz.defineMethod (c$, "nextElement", 
+function () {
+throw  new java.util.NoSuchElementException ("No more elements");
+});
+c$ = Clazz.p0p ();
+};
+c$.EMPTY_ENUMERATION = c$.prototype.EMPTY_ENUMERATION = ((Clazz.isClassDefined ("javax.swing.tree.DefaultMutableTreeNode$1") ? 0 : javax.swing.tree.DefaultMutableTreeNode.$DefaultMutableTreeNode$1$ ()), Clazz.innerTypeInstance (javax.swing.tree.DefaultMutableTreeNode$1, this, null));
+});