X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=bin%2Fcom%2Fstevesoft%2Fpat%2FRBuffer.js;h=27970cf7f62e2bffb2fc56f7696c7b191e3be7d0;hp=529f8a2986589babaa4e0b825090ad82948eff1c;hb=7301a2415adab88038b291fc54caeeb3a5a47a44;hpb=6154cb57a6eac3bb1344b8342495f5bb701ee921 diff --git a/bin/com/stevesoft/pat/RBuffer.js b/bin/com/stevesoft/pat/RBuffer.js index 529f8a2..27970cf 100644 --- a/bin/com/stevesoft/pat/RBuffer.js +++ b/bin/com/stevesoft/pat/RBuffer.js @@ -1,32 +1,32 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (null, "com.stevesoft.pat.RBuffer", ["java.lang.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.done = false; -this.sb = null; -this.pos = 0; -this.epos = 0; -this.next = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "RBuffer"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.makeConstructor (c$, -function (sb) { -this.sb = sb; -}, "StringBuffer"); -Clazz.overrideMethod (c$, "toString", -function () { -return "sb=" + this.sb.toString ().$replace ('\n', ' ') + " pos=" + this.pos + " epos=" + this.epos + " sb.length()=" + this.sb.length () + "\n" + this.sp (this.pos + 3) + "^" + this.sp (this.epos - this.pos - 1) + "^"; -}); -Clazz.defineMethod (c$, "sp", -function (n) { -if (n <= 0) { -return ""; -}var sb = new StringBuffer (n); -for (var i = 0; i < n; i++) { -sb.append (' '); -} -return sb.toString (); -}, "~N"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (null, "com.stevesoft.pat.RBuffer", ["java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.done = false; +this.sb = null; +this.pos = 0; +this.epos = 0; +this.next = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "RBuffer"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.makeConstructor (c$, +function (sb) { +this.sb = sb; +}, "StringBuffer"); +Clazz.overrideMethod (c$, "toString", +function () { +return "sb=" + this.sb.toString ().$replace ('\n', ' ') + " pos=" + this.pos + " epos=" + this.epos + " sb.length()=" + this.sb.length () + "\n" + this.sp (this.pos + 3) + "^" + this.sp (this.epos - this.pos - 1) + "^"; +}); +Clazz.defineMethod (c$, "sp", +function (n) { +if (n <= 0) { +return ""; +}var sb = new StringBuffer (n); +for (var i = 0; i < n; i++) { +sb.append (' '); +} +return sb.toString (); +}, "~N"); +});