Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / javax / swing / SpinnerNumberModel.js
index 8e8acfc..e00f5dc 100644 (file)
-Clazz.declarePackage ("javax.swing");\r
-Clazz.load (["javax.swing.AbstractSpinnerModel"], "javax.swing.SpinnerNumberModel", ["java.lang.Byte", "$.Double", "$.Float", "$.IllegalArgumentException", "$.Long", "$.Number", "$.Short"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.stepSize = null;\r
-this.value = null;\r
-this.minimum = null;\r
-this.maximum = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing, "SpinnerNumberModel", javax.swing.AbstractSpinnerModel);\r
-Clazz.makeConstructor (c$, \r
-function (value, minimum, maximum, stepSize) {\r
-Clazz.superConstructor (this, javax.swing.SpinnerNumberModel, []);\r
-if ((value == null) || (stepSize == null)) {\r
-throw  new IllegalArgumentException ("value and stepSize must be non-null");\r
-}if (!(((minimum == null) || (minimum.compareTo (value) <= 0)) && ((maximum == null) || (maximum.compareTo (value) >= 0)))) {\r
-throw  new IllegalArgumentException ("(minimum <= value <= maximum) is false");\r
-}this.value = value;\r
-this.minimum = minimum;\r
-this.maximum = maximum;\r
-this.stepSize = stepSize;\r
-}, "Number,Comparable,Comparable,Number");\r
-Clazz.makeConstructor (c$, \r
-function (value, minimum, maximum, stepSize) {\r
-this.construct ( new Integer (value),  new Integer (minimum),  new Integer (maximum),  new Integer (stepSize));\r
-}, "~N,~N,~N,~N");\r
-Clazz.makeConstructor (c$, \r
-function (value, minimum, maximum, stepSize) {\r
-this.construct ( new Double (value),  new Double (minimum),  new Double (maximum),  new Double (stepSize));\r
-}, "~N,~N,~N,~N");\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-this.construct ( new Integer (0), null, null,  new Integer (1));\r
-});\r
-Clazz.defineMethod (c$, "setMinimum", \r
-function (minimum) {\r
-if ((minimum == null) ? (this.minimum != null) : !minimum.equals (this.minimum)) {\r
-this.minimum = minimum;\r
-this.fireStateChanged ();\r
-}}, "Comparable");\r
-Clazz.defineMethod (c$, "getMinimum", \r
-function () {\r
-return this.minimum;\r
-});\r
-Clazz.defineMethod (c$, "setMaximum", \r
-function (maximum) {\r
-if ((maximum == null) ? (this.maximum != null) : !maximum.equals (this.maximum)) {\r
-this.maximum = maximum;\r
-this.fireStateChanged ();\r
-}}, "Comparable");\r
-Clazz.defineMethod (c$, "getMaximum", \r
-function () {\r
-return this.maximum;\r
-});\r
-Clazz.defineMethod (c$, "setStepSize", \r
-function (stepSize) {\r
-if (stepSize == null) {\r
-throw  new IllegalArgumentException ("null stepSize");\r
-}if (!stepSize.equals (this.stepSize)) {\r
-this.stepSize = stepSize;\r
-this.fireStateChanged ();\r
-}}, "Number");\r
-Clazz.defineMethod (c$, "getStepSize", \r
-function () {\r
-return this.stepSize;\r
-});\r
-Clazz.defineMethod (c$, "incrValue", \r
- function (dir) {\r
-var newValue;\r
-if ((Clazz.instanceOf (this.value, Float)) || (Clazz.instanceOf (this.value, Double))) {\r
-var v = this.value.doubleValue () + (this.stepSize.doubleValue () * dir);\r
-if (Clazz.instanceOf (this.value, Double)) {\r
-newValue =  new Double (v);\r
-} else {\r
-newValue =  new Float (v);\r
-}} else {\r
-var v = this.value.longValue () + (this.stepSize.longValue () * dir);\r
-if (Clazz.instanceOf (this.value, Long)) {\r
-newValue =  new Long (v);\r
-} else if (Clazz.instanceOf (this.value, Integer)) {\r
-newValue =  new Integer (v);\r
-} else if (Clazz.instanceOf (this.value, Short)) {\r
-newValue =  new Short (v);\r
-} else {\r
-newValue =  new Byte (v);\r
-}}if ((this.maximum != null) && (this.maximum.compareTo (newValue) < 0)) {\r
-return null;\r
-}if ((this.minimum != null) && (this.minimum.compareTo (newValue) > 0)) {\r
-return null;\r
-} else {\r
-return newValue;\r
-}}, "~N");\r
-Clazz.overrideMethod (c$, "getNextValue", \r
-function () {\r
-return this.incrValue (1);\r
-});\r
-Clazz.overrideMethod (c$, "getPreviousValue", \r
-function () {\r
-return this.incrValue (-1);\r
-});\r
-Clazz.defineMethod (c$, "getNumber", \r
-function () {\r
-return this.value;\r
-});\r
-Clazz.overrideMethod (c$, "getValue", \r
-function () {\r
-return this.value;\r
-});\r
-Clazz.overrideMethod (c$, "setValue", \r
-function (value) {\r
-if ((value == null) || !(Clazz.instanceOf (value, Number))) {\r
-throw  new IllegalArgumentException ("illegal value");\r
-}if (!value.equals (this.value)) {\r
-this.value = value;\r
-this.fireStateChanged ();\r
-}}, "~O");\r
-});\r
+Clazz.declarePackage ("javax.swing");
+Clazz.load (["javax.swing.AbstractSpinnerModel"], "javax.swing.SpinnerNumberModel", ["java.lang.Byte", "$.Double", "$.Float", "$.IllegalArgumentException", "$.Long", "$.Number", "$.Short"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.stepSize = null;
+this.value = null;
+this.minimum = null;
+this.maximum = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing, "SpinnerNumberModel", javax.swing.AbstractSpinnerModel);
+Clazz.makeConstructor (c$, 
+function (value, minimum, maximum, stepSize) {
+Clazz.superConstructor (this, javax.swing.SpinnerNumberModel, []);
+if ((value == null) || (stepSize == null)) {
+throw  new IllegalArgumentException ("value and stepSize must be non-null");
+}if (!(((minimum == null) || (minimum.compareTo (value) <= 0)) && ((maximum == null) || (maximum.compareTo (value) >= 0)))) {
+throw  new IllegalArgumentException ("(minimum <= value <= maximum) is false");
+}this.value = value;
+this.minimum = minimum;
+this.maximum = maximum;
+this.stepSize = stepSize;
+}, "Number,Comparable,Comparable,Number");
+Clazz.makeConstructor (c$, 
+function (value, minimum, maximum, stepSize) {
+this.construct ( new Integer (value),  new Integer (minimum),  new Integer (maximum),  new Integer (stepSize));
+}, "~N,~N,~N,~N");
+Clazz.makeConstructor (c$, 
+function (value, minimum, maximum, stepSize) {
+this.construct ( new Double (value),  new Double (minimum),  new Double (maximum),  new Double (stepSize));
+}, "~N,~N,~N,~N");
+Clazz.makeConstructor (c$, 
+function () {
+this.construct ( new Integer (0), null, null,  new Integer (1));
+});
+Clazz.defineMethod (c$, "setMinimum", 
+function (minimum) {
+if ((minimum == null) ? (this.minimum != null) : !minimum.equals (this.minimum)) {
+this.minimum = minimum;
+this.fireStateChanged ();
+}}, "Comparable");
+Clazz.defineMethod (c$, "getMinimum", 
+function () {
+return this.minimum;
+});
+Clazz.defineMethod (c$, "setMaximum", 
+function (maximum) {
+if ((maximum == null) ? (this.maximum != null) : !maximum.equals (this.maximum)) {
+this.maximum = maximum;
+this.fireStateChanged ();
+}}, "Comparable");
+Clazz.defineMethod (c$, "getMaximum", 
+function () {
+return this.maximum;
+});
+Clazz.defineMethod (c$, "setStepSize", 
+function (stepSize) {
+if (stepSize == null) {
+throw  new IllegalArgumentException ("null stepSize");
+}if (!stepSize.equals (this.stepSize)) {
+this.stepSize = stepSize;
+this.fireStateChanged ();
+}}, "Number");
+Clazz.defineMethod (c$, "getStepSize", 
+function () {
+return this.stepSize;
+});
+Clazz.defineMethod (c$, "incrValue", 
+ function (dir) {
+var newValue;
+if ((Clazz.instanceOf (this.value, Float)) || (Clazz.instanceOf (this.value, Double))) {
+var v = this.value.doubleValue () + (this.stepSize.doubleValue () * dir);
+if (Clazz.instanceOf (this.value, Double)) {
+newValue =  new Double (v);
+} else {
+newValue =  new Float (v);
+}} else {
+var v = this.value.longValue () + (this.stepSize.longValue () * dir);
+if (Clazz.instanceOf (this.value, Long)) {
+newValue =  new Long (v);
+} else if (Clazz.instanceOf (this.value, Integer)) {
+newValue =  new Integer (v);
+} else if (Clazz.instanceOf (this.value, Short)) {
+newValue =  new Short (v);
+} else {
+newValue =  new Byte (v);
+}}if ((this.maximum != null) && (this.maximum.compareTo (newValue) < 0)) {
+return null;
+}if ((this.minimum != null) && (this.minimum.compareTo (newValue) > 0)) {
+return null;
+} else {
+return newValue;
+}}, "~N");
+Clazz.overrideMethod (c$, "getNextValue", 
+function () {
+return this.incrValue (1);
+});
+Clazz.overrideMethod (c$, "getPreviousValue", 
+function () {
+return this.incrValue (-1);
+});
+Clazz.defineMethod (c$, "getNumber", 
+function () {
+return this.value;
+});
+Clazz.overrideMethod (c$, "getValue", 
+function () {
+return this.value;
+});
+Clazz.overrideMethod (c$, "setValue", 
+function (value) {
+if ((value == null) || !(Clazz.instanceOf (value, Number))) {
+throw  new IllegalArgumentException ("illegal value");
+}if (!value.equals (this.value)) {
+this.value = value;
+this.fireStateChanged ();
+}}, "~O");
+});