JAL-1807 - Bob's last(?) before leaving Dundee -- adds fast file loading
[jalviewjs.git] / site / j2s / jalview / appletgui / ScalePanel.js
index 42830b7..ad32e61 100644 (file)
@@ -1,5 +1,5 @@
 Clazz.declarePackage ("jalview.appletgui");
-Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener"], "jalview.appletgui.ScalePanel", ["awt2swing.MenuItem", "$.PopupMenu", "jalview.datamodel.SequenceGroup", "jalview.util.MessageManager", "java.awt.Color", "java.awt.event.ActionListener"], function () {
+Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener"], "jalview.appletgui.ScalePanel", ["awt2swing.MenuItem", "$.PopupMenu", "$.Util", "jalview.datamodel.SequenceGroup", "jalview.util.MessageManager", "java.awt.Color", "java.awt.event.ActionListener"], function () {
 c$ = Clazz.decorateAsClass (function () {
 this.offy = 4;
 this.$width = 0;
@@ -186,7 +186,7 @@ for (var i = scalestartx; i < endx; i += 5) {
 if ((i % 10) == 0) {
 string = String.valueOf (this.av.getColumnSelection ().adjustForHiddenColumns (i));
 if ((i - startx - 1) * avcharWidth > maxX) {
-gg.drawString (string, (i - startx - 1) * avcharWidth, y);
+awt2swing.Util.drawString (gg, string, (i - startx - 1) * avcharWidth, y);
 maxX = (i - startx + 1) * avcharWidth + fm.stringWidth (string);
 }gg.drawLine (((i - startx - 1) * avcharWidth) + (Clazz.doubleToInt (avcharWidth / 2)), y + 2, ((i - startx - 1) * avcharWidth) + (Clazz.doubleToInt (avcharWidth / 2)), y + (fm.getDescent () * 2));
 } else {
@@ -203,7 +203,7 @@ continue;
 }gg.fillPolygon ( Clazz.newIntArray (-1, [res * avcharWidth - Clazz.doubleToInt (avcharHeight / 4), res * avcharWidth + Clazz.doubleToInt (avcharHeight / 4), res * avcharWidth]),  Clazz.newIntArray (-1, [y - Clazz.doubleToInt (avcharHeight / 2), y - Clazz.doubleToInt (avcharHeight / 2), y + 8]), 3);
 }
 }if (this.reveal != null && this.reveal[0] > startx && this.reveal[0] < endx) {
-gg.drawString (jalview.util.MessageManager.getString ("label.reveal_columns"), this.reveal[0] * avcharWidth, 0);
+awt2swing.Util.drawString (gg, jalview.util.MessageManager.getString ("label.reveal_columns"), this.reveal[0] * avcharWidth, 0);
 }}}, "java.awt.Graphics,~N,~N,~N,~N");
 c$.$ScalePanel$1$ = function () {
 Clazz.pu$h(self.c$);