X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjalview%2Fappletgui%2FSequenceRenderer.js;h=908e633e644b58a3fa8481f7ee5d6ad2d99134c1;hp=103924e80e2f0fef45dbf8f32ec0f7d51b2b00be;hb=36d803e4a1f98728e91e80de5fa0b95e0cadb0d4;hpb=5b669b6c1a4f1f29b178283a46bc22fcd66aabad diff --git a/site/j2s/jalview/appletgui/SequenceRenderer.js b/site/j2s/jalview/appletgui/SequenceRenderer.js index 103924e..908e633 100644 --- a/site/j2s/jalview/appletgui/SequenceRenderer.js +++ b/site/j2s/jalview/appletgui/SequenceRenderer.js @@ -1,5 +1,5 @@ Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["jalview.api.SequenceRenderer"], "jalview.appletgui.SequenceRenderer", ["jalview.util.Comparison", "java.awt.Color", "$.Font"], function () { +Clazz.load (["jalview.api.SequenceRenderer"], "jalview.appletgui.SequenceRenderer", ["awt2swing.Util", "jalview.util.Comparison", "java.awt.Color", "$.Font"], function () { c$ = Clazz.decorateAsClass (function () { this.av = null; this.fm = null; @@ -41,7 +41,7 @@ col = fr.findFeatureColour (col, seq, position); Clazz.defineMethod (c$, "getBoxColour", function (cs, seq, i) { if (cs != null) { -this.resBoxColour = cs.findColour (seq.getCharAt (i), i, seq); +this.resBoxColour = cs.findColourSeq (seq.getCharAt (i), i, seq); } else if (this.forOverview && !jalview.util.Comparison.isGap (seq.getCharAt (i))) { this.resBoxColour = java.awt.Color.lightGray; } else { @@ -141,7 +141,7 @@ this.graphics.setFont (boldFont); this.graphics.setFont (this.av.font); bold = false; }}charOffset = Clazz.doubleToInt ((avCharWidth - this.fm.charWidth (s)) / 2); -this.graphics.drawString (String.valueOf (s), charOffset + avCharWidth * (i - start), y1); +awt2swing.Util.drawString (this.graphics, String.valueOf (s), charOffset + avCharWidth * (i - start), y1); } }, "jalview.datamodel.SequenceI,~N,~N,~N"); Clazz.defineMethod (c$, "getDisplayChar", @@ -177,7 +177,7 @@ for (var i = start; i <= end; i++) { if (i < seq.getLength ()) { s = seq.getCharAt (i); }charOffset = Clazz.doubleToInt ((avCharWidth - this.fm.charWidth (s)) / 2); -this.graphics.drawString (String.valueOf (s), charOffset + x1 + avCharWidth * (i - start), y1 + avCharHeight - pady); +awt2swing.Util.drawString (this.graphics, String.valueOf (s), charOffset + x1 + avCharWidth * (i - start), y1 + avCharHeight - pady); } }}, "jalview.datamodel.SequenceI,~N,~N,~N,~N"); Clazz.defineMethod (c$, "drawCursor", @@ -191,6 +191,6 @@ this.graphics.setColor (java.awt.Color.white); var s = seq.getCharAt (res); if (this.av.validCharWidth) { charOffset = Clazz.doubleToInt ((this.av.getCharWidth () - this.fm.charWidth (s)) / 2); -this.graphics.drawString (String.valueOf (s), charOffset + x1, (y1 + this.av.getCharHeight ()) - pady); +awt2swing.Util.drawString (this.graphics, String.valueOf (s), charOffset + x1, (y1 + this.av.getCharHeight ()) - pady); }}, "jalview.datamodel.SequenceI,~N,~N,~N"); });