0dffcbf68e36d8649ffa76961a71d9e889662f3f
[jalviewjs.git] / site / swingjs / j2s / javax / swing / event / TreeModelEvent.js
1 Clazz.declarePackage ("javax.swing.event");\r
2 Clazz.load (["java.util.EventObject"], "javax.swing.event.TreeModelEvent", ["java.lang.StringBuffer", "javax.swing.tree.TreePath"], function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.path = null;\r
5 this.childIndices = null;\r
6 this.children = null;\r
7 Clazz.instantialize (this, arguments);\r
8 }, javax.swing.event, "TreeModelEvent", java.util.EventObject);\r
9 Clazz.makeConstructor (c$, \r
10 function (source, path, childIndices, children) {\r
11 this.construct (source,  new javax.swing.tree.TreePath (path), childIndices, children);\r
12 }, "~O,~A,~A,~A");\r
13 Clazz.makeConstructor (c$, \r
14 function (source, path, childIndices, children) {\r
15 Clazz.superConstructor (this, javax.swing.event.TreeModelEvent, [source]);\r
16 this.path = path;\r
17 this.childIndices = childIndices;\r
18 this.children = children;\r
19 }, "~O,javax.swing.tree.TreePath,~A,~A");\r
20 Clazz.makeConstructor (c$, \r
21 function (source, path) {\r
22 this.construct (source,  new javax.swing.tree.TreePath (path));\r
23 }, "~O,~A");\r
24 Clazz.makeConstructor (c$, \r
25 function (source, path) {\r
26 Clazz.superConstructor (this, javax.swing.event.TreeModelEvent, [source]);\r
27 this.path = path;\r
28 this.childIndices =  Clazz.newIntArray (0, 0);\r
29 }, "~O,javax.swing.tree.TreePath");\r
30 Clazz.defineMethod (c$, "getTreePath", \r
31 function () {\r
32 return this.path;\r
33 });\r
34 Clazz.defineMethod (c$, "getPath", \r
35 function () {\r
36 if (this.path != null) return this.path.getPath ();\r
37 return null;\r
38 });\r
39 Clazz.defineMethod (c$, "getChildren", \r
40 function () {\r
41 if (this.children != null) {\r
42 var cCount = this.children.length;\r
43 var retChildren =  new Array (cCount);\r
44 System.arraycopy (this.children, 0, retChildren, 0, cCount);\r
45 return retChildren;\r
46 }return null;\r
47 });\r
48 Clazz.defineMethod (c$, "getChildIndices", \r
49 function () {\r
50 if (this.childIndices != null) {\r
51 var cCount = this.childIndices.length;\r
52 var retArray =  Clazz.newIntArray (cCount, 0);\r
53 System.arraycopy (this.childIndices, 0, retArray, 0, cCount);\r
54 return retArray;\r
55 }return null;\r
56 });\r
57 Clazz.overrideMethod (c$, "toString", \r
58 function () {\r
59 var retBuffer =  new StringBuffer ();\r
60 retBuffer.append (this.getClass ().getName () + " " + Integer.toString (this.hashCode ()));\r
61 if (this.path != null) retBuffer.append (" path " + this.path);\r
62 if (this.childIndices != null) {\r
63 retBuffer.append (" indices [ ");\r
64 for (var counter = 0; counter < this.childIndices.length; counter++) retBuffer.append (Integer.toString (this.childIndices[counter]) + " ");\r
65 \r
66 retBuffer.append ("]");\r
67 }if (this.children != null) {\r
68 retBuffer.append (" children [ ");\r
69 for (var counter = 0; counter < this.children.length; counter++) retBuffer.append (this.children[counter] + " ");\r
70 \r
71 retBuffer.append ("]");\r
72 }return retBuffer.toString ();\r
73 });\r
74 });\r