1 Clazz.declarePackage ("javax.swing.event");
2 Clazz.load (["java.util.EventObject"], "javax.swing.event.TreeModelEvent", ["java.lang.StringBuffer", "javax.swing.tree.TreePath"], function () {
3 c$ = Clazz.decorateAsClass (function () {
5 this.childIndices = null;
7 Clazz.instantialize (this, arguments);
8 }, javax.swing.event, "TreeModelEvent", java.util.EventObject);
9 Clazz.makeConstructor (c$,
10 function (source, path, childIndices, children) {
11 this.construct (source, new javax.swing.tree.TreePath (path), childIndices, children);
13 Clazz.makeConstructor (c$,
14 function (source, path, childIndices, children) {
15 Clazz.superConstructor (this, javax.swing.event.TreeModelEvent, [source]);
17 this.childIndices = childIndices;
18 this.children = children;
19 }, "~O,javax.swing.tree.TreePath,~A,~A");
20 Clazz.makeConstructor (c$,
21 function (source, path) {
22 this.construct (source, new javax.swing.tree.TreePath (path));
24 Clazz.makeConstructor (c$,
25 function (source, path) {
26 Clazz.superConstructor (this, javax.swing.event.TreeModelEvent, [source]);
28 this.childIndices = Clazz.newIntArray (0, 0);
29 }, "~O,javax.swing.tree.TreePath");
30 Clazz.defineMethod (c$, "getTreePath",
34 Clazz.defineMethod (c$, "getPath",
36 if (this.path != null) return this.path.getPath ();
39 Clazz.defineMethod (c$, "getChildren",
41 if (this.children != null) {
42 var cCount = this.children.length;
43 var retChildren = new Array (cCount);
44 System.arraycopy (this.children, 0, retChildren, 0, cCount);
48 Clazz.defineMethod (c$, "getChildIndices",
50 if (this.childIndices != null) {
51 var cCount = this.childIndices.length;
52 var retArray = Clazz.newIntArray (cCount, 0);
53 System.arraycopy (this.childIndices, 0, retArray, 0, cCount);
57 Clazz.overrideMethod (c$, "toString",
59 var retBuffer = new StringBuffer ();
60 retBuffer.append (this.getClass ().getName () + " " + Integer.toString (this.hashCode ()));
61 if (this.path != null) retBuffer.append (" path " + this.path);
62 if (this.childIndices != null) {
63 retBuffer.append (" indices [ ");
64 for (var counter = 0; counter < this.childIndices.length; counter++) retBuffer.append (Integer.toString (this.childIndices[counter]) + " ");
66 retBuffer.append ("]");
67 }if (this.children != null) {
68 retBuffer.append (" children [ ");
69 for (var counter = 0; counter < this.children.length; counter++) retBuffer.append (this.children[counter] + " ");
71 retBuffer.append ("]");
72 }return retBuffer.toString ();