Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / java / text / CharacterIteratorFieldDelegate.js
index 86a34c9..fe28307 100644 (file)
@@ -1,51 +1,51 @@
-Clazz.declarePackage ("java.text");\r
-Clazz.load (["java.text.Format"], "java.text.CharacterIteratorFieldDelegate", ["java.util.ArrayList", "java.text.AttributedString"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.attributedStrings = null;\r
-this.size = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, java.text, "CharacterIteratorFieldDelegate", null, java.text.Format.FieldDelegate);\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-this.attributedStrings =  new java.util.ArrayList ();\r
-});\r
-Clazz.defineMethod (c$, "formatted", \r
-function (attr, value, start, end, buffer) {\r
-if (start != end) {\r
-if (start < this.size) {\r
-var index = this.size;\r
-var asIndex = this.attributedStrings.size () - 1;\r
-while (start < index) {\r
-var as = this.attributedStrings.get (asIndex--);\r
-var newIndex = index - as.length ();\r
-var aStart = Math.max (0, start - newIndex);\r
-as.addAttribute (attr, value, aStart, Math.min (end - start, as.length () - aStart) + aStart);\r
-index = newIndex;\r
-}\r
-}if (this.size < start) {\r
-this.attributedStrings.add ( new java.text.AttributedString (buffer.substring (this.size, start)));\r
-this.size = start;\r
-}if (this.size < end) {\r
-var aStart = Math.max (start, this.size);\r
-var string =  new java.text.AttributedString (buffer.substring (aStart, end));\r
-string.addAttribute (attr, value);\r
-this.attributedStrings.add (string);\r
-this.size = end;\r
-}}}, "java.text.Format.Field,~O,~N,~N,StringBuffer");\r
-Clazz.defineMethod (c$, "formatted", \r
-function (fieldID, attr, value, start, end, buffer) {\r
-this.formatted (attr, value, start, end, buffer);\r
-}, "~N,java.text.Format.Field,~O,~N,~N,StringBuffer");\r
-Clazz.defineMethod (c$, "getIterator", \r
-function (string) {\r
-if (string.length > this.size) {\r
-this.attributedStrings.add ( new java.text.AttributedString (string.substring (this.size)));\r
-this.size = string.length;\r
-}var iCount = this.attributedStrings.size ();\r
-var iterators =  new Array (iCount);\r
-for (var counter = 0; counter < iCount; counter++) {\r
-iterators[counter] = (this.attributedStrings.get (counter)).getIterator ();\r
-}\r
-return  new java.text.AttributedString (iterators).getIterator ();\r
-}, "~S");\r
-});\r
+Clazz.declarePackage ("java.text");
+Clazz.load (["java.text.Format"], "java.text.CharacterIteratorFieldDelegate", ["java.util.ArrayList", "java.text.AttributedString"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.attributedStrings = null;
+this.size = 0;
+Clazz.instantialize (this, arguments);
+}, java.text, "CharacterIteratorFieldDelegate", null, java.text.Format.FieldDelegate);
+Clazz.makeConstructor (c$, 
+function () {
+this.attributedStrings =  new java.util.ArrayList ();
+});
+Clazz.defineMethod (c$, "formatted", 
+function (attr, value, start, end, buffer) {
+if (start != end) {
+if (start < this.size) {
+var index = this.size;
+var asIndex = this.attributedStrings.size () - 1;
+while (start < index) {
+var as = this.attributedStrings.get (asIndex--);
+var newIndex = index - as.length ();
+var aStart = Math.max (0, start - newIndex);
+as.addAttribute (attr, value, aStart, Math.min (end - start, as.length () - aStart) + aStart);
+index = newIndex;
+}
+}if (this.size < start) {
+this.attributedStrings.add ( new java.text.AttributedString (buffer.substring (this.size, start)));
+this.size = start;
+}if (this.size < end) {
+var aStart = Math.max (start, this.size);
+var string =  new java.text.AttributedString (buffer.substring (aStart, end));
+string.addAttribute (attr, value);
+this.attributedStrings.add (string);
+this.size = end;
+}}}, "java.text.Format.Field,~O,~N,~N,StringBuffer");
+Clazz.defineMethod (c$, "formatted", 
+function (fieldID, attr, value, start, end, buffer) {
+this.formatted (attr, value, start, end, buffer);
+}, "~N,java.text.Format.Field,~O,~N,~N,StringBuffer");
+Clazz.defineMethod (c$, "getIterator", 
+function (string) {
+if (string.length > this.size) {
+this.attributedStrings.add ( new java.text.AttributedString (string.substring (this.size)));
+this.size = string.length;
+}var iCount = this.attributedStrings.size ();
+var iterators =  new Array (iCount);
+for (var counter = 0; counter < iCount; counter++) {
+iterators[counter] = (this.attributedStrings.get (counter)).getIterator ();
+}
+return  new java.text.AttributedString (iterators).getIterator ();
+}, "~S");
+});