X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjalview%2Fdatamodel%2FAnnotation.js;h=76f42d8ca5514acd76ef908c8dedefe7e608c496;hp=92e1248fc092b1e4d292e3bda5d777929d3f5c31;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=8ffd05b3abe52c0b6b79b011c0966361f82d5fe6 diff --git a/site/j2s/jalview/datamodel/Annotation.js b/site/j2s/jalview/datamodel/Annotation.js index 92e1248..76f42d8 100644 --- a/site/j2s/jalview/datamodel/Annotation.js +++ b/site/j2s/jalview/datamodel/Annotation.js @@ -1,72 +1,72 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (null, "jalview.datamodel.Annotation", ["java.lang.Float", "$.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.displayCharacter = ""; -this.description = ""; -this.secondaryStructure = ' '; -this.value = 0; -this.colour = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "Annotation"); -Clazz.makeConstructor (c$, -function (displayChar, desc, ss, val) { -this.displayCharacter = displayChar; -this.description = desc; -this.secondaryStructure = ss; -this.value = val; -}, "~S,~S,~S,~N"); -Clazz.makeConstructor (c$, -function (displayChar, desc, ss, val, colour) { -this.construct (displayChar, desc, ss, val); -this.colour = colour; -}, "~S,~S,~S,~N,java.awt.Color"); -Clazz.makeConstructor (c$, -function (that) { -if (that == null || this === that) { -return; -}if (that.displayCharacter != null) this.displayCharacter = String.instantialize (that.displayCharacter); -if (that.description != null) this.description = String.instantialize (that.description); -this.secondaryStructure = that.secondaryStructure; -this.value = that.value; -this.colour = that.colour; -}, "jalview.datamodel.Annotation"); -Clazz.makeConstructor (c$, -function (val) { -this.construct (null, null, ' ', val, null); -}, "~N"); -Clazz.overrideMethod (c$, "toString", -function () { -var sb = new StringBuffer (); -if (this.displayCharacter != null) { -sb.append ("\'"); -sb.append (this.displayCharacter); -sb.append ("\'"); -}{ -sb.append (","); -}if (this.secondaryStructure.charCodeAt (0) != 0 && !("" + this.displayCharacter).equals ("" + this.secondaryStructure)) { -sb.append ("\'"); -sb.append (this.secondaryStructure); -sb.append ("\'"); -}{ -sb.append (","); -}if (this.description != null && this.description.length > 0) { -sb.append ("\""); -sb.append (this.description); -sb.append ("\""); -}{ -sb.append (","); -}if (!Float.isNaN (this.value)) { -sb.append (this.value); -}if (this.colour != null) { -if (sb.length () > 0) { -sb.append (","); -}sb.append ("["); -sb.append (this.colour.getRed ()); -sb.append (","); -sb.append (this.colour.getGreen ()); -sb.append (","); -sb.append (this.colour.getBlue ()); -sb.append ("]"); -}return sb.toString (); -}); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (null, "jalview.datamodel.Annotation", ["java.lang.Float", "$.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.displayCharacter = ""; +this.description = ""; +this.secondaryStructure = ' '; +this.value = 0; +this.colour = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "Annotation"); +Clazz.makeConstructor (c$, +function (displayChar, desc, ss, val) { +this.displayCharacter = displayChar; +this.description = desc; +this.secondaryStructure = ss; +this.value = val; +}, "~S,~S,~S,~N"); +Clazz.makeConstructor (c$, +function (displayChar, desc, ss, val, colour) { +this.construct (displayChar, desc, ss, val); +this.colour = colour; +}, "~S,~S,~S,~N,java.awt.Color"); +Clazz.makeConstructor (c$, +function (that) { +if (that == null || this === that) { +return; +}if (that.displayCharacter != null) this.displayCharacter = String.instantialize (that.displayCharacter); +if (that.description != null) this.description = String.instantialize (that.description); +this.secondaryStructure = that.secondaryStructure; +this.value = that.value; +this.colour = that.colour; +}, "jalview.datamodel.Annotation"); +Clazz.makeConstructor (c$, +function (val) { +this.construct (null, null, ' ', val, null); +}, "~N"); +Clazz.overrideMethod (c$, "toString", +function () { +var sb = new StringBuffer (); +if (this.displayCharacter != null) { +sb.append ("\'"); +sb.append (this.displayCharacter); +sb.append ("\'"); +}{ +sb.append (","); +}if (this.secondaryStructure.charCodeAt (0) != 0 && !("" + this.displayCharacter).equals ("" + this.secondaryStructure)) { +sb.append ("\'"); +sb.append (this.secondaryStructure); +sb.append ("\'"); +}{ +sb.append (","); +}if (this.description != null && this.description.length > 0) { +sb.append ("\""); +sb.append (this.description); +sb.append ("\""); +}{ +sb.append (","); +}if (!Float.isNaN (this.value)) { +sb.append (this.value); +}if (this.colour != null) { +if (sb.length () > 0) { +sb.append (","); +}sb.append ("["); +sb.append ("" + this.colour.getRed ()); +sb.append (","); +sb.append ("" + this.colour.getGreen ()); +sb.append (","); +sb.append ("" + this.colour.getBlue ()); +sb.append ("]"); +}return sb.toString (); +}); +});