Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / javax / swing / text / TabSet.js
index 79910fb..3afc2d7 100644 (file)
@@ -1,97 +1,97 @@
-Clazz.declarePackage ("javax.swing.text");\r
-Clazz.load (null, "javax.swing.text.TabSet", ["java.lang.IllegalArgumentException", "$.StringBuffer"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.tabs = null;\r
-this.$hashCode = 2147483647;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text, "TabSet");\r
-Clazz.makeConstructor (c$, \r
-function (tabs) {\r
-if (tabs != null) {\r
-var tabCount = tabs.length;\r
-this.tabs =  new Array (tabCount);\r
-System.arraycopy (tabs, 0, this.tabs, 0, tabCount);\r
-} else this.tabs = null;\r
-}, "~A");\r
-Clazz.defineMethod (c$, "getTabCount", \r
-function () {\r
-return (this.tabs == null) ? 0 : this.tabs.length;\r
-});\r
-Clazz.defineMethod (c$, "getTab", \r
-function (index) {\r
-var numTabs = this.getTabCount ();\r
-if (index < 0 || index >= numTabs) throw  new IllegalArgumentException (index + " is outside the range of tabs");\r
-return this.tabs[index];\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getTabAfter", \r
-function (location) {\r
-var index = this.getTabIndexAfter (location);\r
-return (index == -1) ? null : this.tabs[index];\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getTabIndex", \r
-function (tab) {\r
-for (var counter = this.getTabCount () - 1; counter >= 0; counter--) if (this.getTab (counter) === tab) return counter;\r
-\r
-return -1;\r
-}, "javax.swing.text.TabStop");\r
-Clazz.defineMethod (c$, "getTabIndexAfter", \r
-function (location) {\r
-var current;\r
-var min;\r
-var max;\r
-min = 0;\r
-max = this.getTabCount ();\r
-while (min != max) {\r
-current = Clazz.doubleToInt ((max - min) / 2) + min;\r
-if (location > this.tabs[current].getPosition ()) {\r
-if (min == current) min = max;\r
- else min = current;\r
-} else {\r
-if (current == 0 || location > this.tabs[current - 1].getPosition ()) return current;\r
-max = current;\r
-}}\r
-return -1;\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "equals", \r
-function (o) {\r
-if (o === this) {\r
-return true;\r
-}if (Clazz.instanceOf (o, javax.swing.text.TabSet)) {\r
-var ts = o;\r
-var count = this.getTabCount ();\r
-if (ts.getTabCount () != count) {\r
-return false;\r
-}for (var i = 0; i < count; i++) {\r
-var ts1 = this.getTab (i);\r
-var ts2 = ts.getTab (i);\r
-if ((ts1 == null && ts2 != null) || (ts1 != null && !this.getTab (i).equals (ts.getTab (i)))) {\r
-return false;\r
-}}\r
-return true;\r
-}return false;\r
-}, "~O");\r
-Clazz.overrideMethod (c$, "hashCode", \r
-function () {\r
-if (this.$hashCode == 2147483647) {\r
-this.$hashCode = 0;\r
-var len = this.getTabCount ();\r
-for (var i = 0; i < len; i++) {\r
-var ts = this.getTab (i);\r
-this.$hashCode ^= ts != null ? this.getTab (i).hashCode () : 0;\r
-}\r
-if (this.$hashCode == 2147483647) {\r
-this.$hashCode -= 1;\r
-}}return this.$hashCode;\r
-});\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-var tabCount = this.getTabCount ();\r
-var buffer =  new StringBuffer ("[ ");\r
-for (var counter = 0; counter < tabCount; counter++) {\r
-if (counter > 0) buffer.append (" - ");\r
-buffer.append (this.getTab (counter).toString ());\r
-}\r
-buffer.append (" ]");\r
-return buffer.toString ();\r
-});\r
-});\r
+Clazz.declarePackage ("javax.swing.text");
+Clazz.load (null, "javax.swing.text.TabSet", ["java.lang.IllegalArgumentException", "$.StringBuffer"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.tabs = null;
+this.$hashCode = 2147483647;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text, "TabSet");
+Clazz.makeConstructor (c$, 
+function (tabs) {
+if (tabs != null) {
+var tabCount = tabs.length;
+this.tabs =  new Array (tabCount);
+System.arraycopy (tabs, 0, this.tabs, 0, tabCount);
+} else this.tabs = null;
+}, "~A");
+Clazz.defineMethod (c$, "getTabCount", 
+function () {
+return (this.tabs == null) ? 0 : this.tabs.length;
+});
+Clazz.defineMethod (c$, "getTab", 
+function (index) {
+var numTabs = this.getTabCount ();
+if (index < 0 || index >= numTabs) throw  new IllegalArgumentException (index + " is outside the range of tabs");
+return this.tabs[index];
+}, "~N");
+Clazz.defineMethod (c$, "getTabAfter", 
+function (location) {
+var index = this.getTabIndexAfter (location);
+return (index == -1) ? null : this.tabs[index];
+}, "~N");
+Clazz.defineMethod (c$, "getTabIndex", 
+function (tab) {
+for (var counter = this.getTabCount () - 1; counter >= 0; counter--) if (this.getTab (counter) === tab) return counter;
+
+return -1;
+}, "javax.swing.text.TabStop");
+Clazz.defineMethod (c$, "getTabIndexAfter", 
+function (location) {
+var current;
+var min;
+var max;
+min = 0;
+max = this.getTabCount ();
+while (min != max) {
+current = Clazz.doubleToInt ((max - min) / 2) + min;
+if (location > this.tabs[current].getPosition ()) {
+if (min == current) min = max;
+ else min = current;
+} else {
+if (current == 0 || location > this.tabs[current - 1].getPosition ()) return current;
+max = current;
+}}
+return -1;
+}, "~N");
+Clazz.overrideMethod (c$, "equals", 
+function (o) {
+if (o === this) {
+return true;
+}if (Clazz.instanceOf (o, javax.swing.text.TabSet)) {
+var ts = o;
+var count = this.getTabCount ();
+if (ts.getTabCount () != count) {
+return false;
+}for (var i = 0; i < count; i++) {
+var ts1 = this.getTab (i);
+var ts2 = ts.getTab (i);
+if ((ts1 == null && ts2 != null) || (ts1 != null && !this.getTab (i).equals (ts.getTab (i)))) {
+return false;
+}}
+return true;
+}return false;
+}, "~O");
+Clazz.overrideMethod (c$, "hashCode", 
+function () {
+if (this.$hashCode == 2147483647) {
+this.$hashCode = 0;
+var len = this.getTabCount ();
+for (var i = 0; i < len; i++) {
+var ts = this.getTab (i);
+this.$hashCode ^= ts != null ? this.getTab (i).hashCode () : 0;
+}
+if (this.$hashCode == 2147483647) {
+this.$hashCode -= 1;
+}}return this.$hashCode;
+});
+Clazz.overrideMethod (c$, "toString", 
+function () {
+var tabCount = this.getTabCount ();
+var buffer =  new StringBuffer ("[ ");
+for (var counter = 0; counter < tabCount; counter++) {
+if (counter > 0) buffer.append (" - ");
+buffer.append (this.getTab (counter).toString ());
+}
+buffer.append (" ]");
+return buffer.toString ();
+});
+});