JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / swingjs / j2s / javax / swing / event / RowSorterEvent.js
1 Clazz.declarePackage ("javax.swing.event");\r
2 Clazz.load (["java.lang.Enum", "java.util.EventObject"], "javax.swing.event.RowSorterEvent", ["java.lang.IllegalArgumentException"], function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.type = null;\r
5 this.oldViewToModel = null;\r
6 Clazz.instantialize (this, arguments);\r
7 }, javax.swing.event, "RowSorterEvent", java.util.EventObject);\r
8 Clazz.makeConstructor (c$, \r
9 function (source) {\r
10 this.construct (source, javax.swing.event.RowSorterEvent.Type.SORT_ORDER_CHANGED, null);\r
11 }, "javax.swing.RowSorter");\r
12 Clazz.makeConstructor (c$, \r
13 function (source, type, previousRowIndexToModel) {\r
14 Clazz.superConstructor (this, javax.swing.event.RowSorterEvent, [source]);\r
15 if (type == null) {\r
16 throw  new IllegalArgumentException ("type must be non-null");\r
17 }this.type = type;\r
18 this.oldViewToModel = previousRowIndexToModel;\r
19 }, "javax.swing.RowSorter,javax.swing.event.RowSorterEvent.Type,~A");\r
20 Clazz.defineMethod (c$, "getSource", \r
21 function () {\r
22 return Clazz.superCall (this, javax.swing.event.RowSorterEvent, "getSource", []);\r
23 });\r
24 Clazz.defineMethod (c$, "getType", \r
25 function () {\r
26 return this.type;\r
27 });\r
28 Clazz.defineMethod (c$, "convertPreviousRowIndexToModel", \r
29 function (index) {\r
30 if (this.oldViewToModel != null && index >= 0 && index < this.oldViewToModel.length) {\r
31 return this.oldViewToModel[index];\r
32 }return -1;\r
33 }, "~N");\r
34 Clazz.defineMethod (c$, "getPreviousRowCount", \r
35 function () {\r
36 return (this.oldViewToModel == null) ? 0 : this.oldViewToModel.length;\r
37 });\r
38 Clazz.pu$h(self.c$);\r
39 c$ = Clazz.declareType (javax.swing.event.RowSorterEvent, "Type", Enum);\r
40 Clazz.defineEnumConstant (c$, "SORT_ORDER_CHANGED", 0, []);\r
41 Clazz.defineEnumConstant (c$, "SORTED", 1, []);\r
42 c$ = Clazz.p0p ();\r
43 });\r