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