Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / javax / swing / text / Segment.js
index 7d61529..a74525d 100644 (file)
-Clazz.declarePackage ("javax.swing.text");\r
-Clazz.load (["java.text.CharacterIterator"], "javax.swing.text.Segment", ["java.lang.IllegalArgumentException", "$.StringIndexOutOfBoundsException"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.array = null;\r
-this.offset = 0;\r
-this.count = 0;\r
-this.partialReturn = false;\r
-this.pos = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text, "Segment", null, [Cloneable, java.text.CharacterIterator, CharSequence]);\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-this.construct (null, 0, 0);\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (array, offset, count) {\r
-this.array = array;\r
-this.offset = offset;\r
-this.count = count;\r
-this.partialReturn = false;\r
-}, "~A,~N,~N");\r
-Clazz.defineMethod (c$, "setPartialReturn", \r
-function (p) {\r
-this.partialReturn = p;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isPartialReturn", \r
-function () {\r
-return this.partialReturn;\r
-});\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-if (this.array != null) {\r
-return  String.instantialize (this.array, this.offset, this.count);\r
-}return  String.instantialize ();\r
-});\r
-Clazz.overrideMethod (c$, "first", \r
-function () {\r
-this.pos = this.offset;\r
-if (this.count != 0) {\r
-return this.array[this.pos];\r
-}return '\uffff';\r
-});\r
-Clazz.overrideMethod (c$, "last", \r
-function () {\r
-this.pos = this.offset + this.count;\r
-if (this.count != 0) {\r
-this.pos -= 1;\r
-return this.array[this.pos];\r
-}return '\uffff';\r
-});\r
-Clazz.overrideMethod (c$, "current", \r
-function () {\r
-if (this.count != 0 && this.pos < this.offset + this.count) {\r
-return this.array[this.pos];\r
-}return '\uffff';\r
-});\r
-Clazz.overrideMethod (c$, "next", \r
-function () {\r
-this.pos += 1;\r
-var end = this.offset + this.count;\r
-if (this.pos >= end) {\r
-this.pos = end;\r
-return '\uffff';\r
-}return this.current ();\r
-});\r
-Clazz.overrideMethod (c$, "previous", \r
-function () {\r
-if (this.pos == this.offset) {\r
-return '\uffff';\r
-}this.pos -= 1;\r
-return this.current ();\r
-});\r
-Clazz.overrideMethod (c$, "setIndex", \r
-function (position) {\r
-var end = this.offset + this.count;\r
-if ((position < this.offset) || (position > end)) {\r
-throw  new IllegalArgumentException ("bad position: " + position);\r
-}this.pos = position;\r
-if ((this.pos != end) && (this.count != 0)) {\r
-return this.array[this.pos];\r
-}return '\uffff';\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "getBeginIndex", \r
-function () {\r
-return this.offset;\r
-});\r
-Clazz.overrideMethod (c$, "getEndIndex", \r
-function () {\r
-return this.offset + this.count;\r
-});\r
-Clazz.overrideMethod (c$, "getIndex", \r
-function () {\r
-return this.pos;\r
-});\r
-Clazz.overrideMethod (c$, "charAt", \r
-function (index) {\r
-if (index < 0 || index >= this.count) {\r
-throw  new StringIndexOutOfBoundsException (index);\r
-}return this.array[this.offset + index];\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "length", \r
-function () {\r
-return this.count;\r
-});\r
-Clazz.overrideMethod (c$, "subSequence", \r
-function (start, end) {\r
-if (start < 0) {\r
-throw  new StringIndexOutOfBoundsException (start);\r
-}if (end > this.count) {\r
-throw  new StringIndexOutOfBoundsException (end);\r
-}if (start > end) {\r
-throw  new StringIndexOutOfBoundsException (end - start);\r
-}var segment =  new javax.swing.text.Segment ();\r
-segment.array = this.array;\r
-segment.offset = this.offset + start;\r
-segment.count = end - start;\r
-return segment;\r
-}, "~N,~N");\r
-Clazz.overrideMethod (c$, "clone", \r
-function () {\r
-var o;\r
-try {\r
-o = Clazz.superCall (this, javax.swing.text.Segment, "clone", []);\r
-} catch (cnse) {\r
-if (Clazz.exceptionOf (cnse, CloneNotSupportedException)) {\r
-o = null;\r
-} else {\r
-throw cnse;\r
-}\r
-}\r
-return o;\r
-});\r
-});\r
+Clazz.declarePackage ("javax.swing.text");
+Clazz.load (["java.text.CharacterIterator"], "javax.swing.text.Segment", ["java.lang.IllegalArgumentException", "$.StringIndexOutOfBoundsException"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.array = null;
+this.offset = 0;
+this.count = 0;
+this.partialReturn = false;
+this.pos = 0;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text, "Segment", null, [Cloneable, java.text.CharacterIterator, CharSequence]);
+Clazz.makeConstructor (c$, 
+function () {
+this.construct (null, 0, 0);
+});
+Clazz.makeConstructor (c$, 
+function (array, offset, count) {
+this.array = array;
+this.offset = offset;
+this.count = count;
+this.partialReturn = false;
+}, "~A,~N,~N");
+Clazz.defineMethod (c$, "setPartialReturn", 
+function (p) {
+this.partialReturn = p;
+}, "~B");
+Clazz.defineMethod (c$, "isPartialReturn", 
+function () {
+return this.partialReturn;
+});
+Clazz.overrideMethod (c$, "toString", 
+function () {
+if (this.array != null) {
+return  String.instantialize (this.array, this.offset, this.count);
+}return  String.instantialize ();
+});
+Clazz.overrideMethod (c$, "first", 
+function () {
+this.pos = this.offset;
+if (this.count != 0) {
+return this.array[this.pos];
+}return '\uffff';
+});
+Clazz.overrideMethod (c$, "last", 
+function () {
+this.pos = this.offset + this.count;
+if (this.count != 0) {
+this.pos -= 1;
+return this.array[this.pos];
+}return '\uffff';
+});
+Clazz.overrideMethod (c$, "current", 
+function () {
+if (this.count != 0 && this.pos < this.offset + this.count) {
+return this.array[this.pos];
+}return '\uffff';
+});
+Clazz.overrideMethod (c$, "next", 
+function () {
+this.pos += 1;
+var end = this.offset + this.count;
+if (this.pos >= end) {
+this.pos = end;
+return '\uffff';
+}return this.current ();
+});
+Clazz.overrideMethod (c$, "previous", 
+function () {
+if (this.pos == this.offset) {
+return '\uffff';
+}this.pos -= 1;
+return this.current ();
+});
+Clazz.overrideMethod (c$, "setIndex", 
+function (position) {
+var end = this.offset + this.count;
+if ((position < this.offset) || (position > end)) {
+throw  new IllegalArgumentException ("bad position: " + position);
+}this.pos = position;
+if ((this.pos != end) && (this.count != 0)) {
+return this.array[this.pos];
+}return '\uffff';
+}, "~N");
+Clazz.overrideMethod (c$, "getBeginIndex", 
+function () {
+return this.offset;
+});
+Clazz.overrideMethod (c$, "getEndIndex", 
+function () {
+return this.offset + this.count;
+});
+Clazz.overrideMethod (c$, "getIndex", 
+function () {
+return this.pos;
+});
+Clazz.overrideMethod (c$, "charAt", 
+function (index) {
+if (index < 0 || index >= this.count) {
+throw  new StringIndexOutOfBoundsException (index);
+}return this.array[this.offset + index];
+}, "~N");
+Clazz.overrideMethod (c$, "length", 
+function () {
+return this.count;
+});
+Clazz.overrideMethod (c$, "subSequence", 
+function (start, end) {
+if (start < 0) {
+throw  new StringIndexOutOfBoundsException (start);
+}if (end > this.count) {
+throw  new StringIndexOutOfBoundsException (end);
+}if (start > end) {
+throw  new StringIndexOutOfBoundsException (end - start);
+}var segment =  new javax.swing.text.Segment ();
+segment.array = this.array;
+segment.offset = this.offset + start;
+segment.count = end - start;
+return segment;
+}, "~N,~N");
+Clazz.overrideMethod (c$, "clone", 
+function () {
+var o;
+try {
+o = Clazz.superCall (this, javax.swing.text.Segment, "clone", []);
+} catch (cnse) {
+if (Clazz.exceptionOf (cnse, CloneNotSupportedException)) {
+o = null;
+} else {
+throw cnse;
+}
+}
+return o;
+});
+});