JAL-1807 - Bob's last(?) before leaving Dundee -- adds fast file loading
[jalviewjs.git] / site / j2s / jalview / appletgui / TreeCanvas.js
index 69da9f2..43b95d7 100644 (file)
@@ -1,5 +1,5 @@
 Clazz.declarePackage ("jalview.appletgui");
-Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener", "java.util.Hashtable"], "jalview.appletgui.TreeCanvas", ["jalview.analysis.Conservation", "jalview.appletgui.PaintRefresher", "jalview.datamodel.SequenceGroup", "$.SequenceI", "$.SequenceNode", "jalview.schemes.ColourSchemeProperty", "$.ResidueProperties", "$.UserColourScheme", "jalview.util.Format", "$.MappingUtils", "java.awt.Color", "$.Dimension", "$.Point", "$.Rectangle", "java.util.Vector"], function () {
+Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener", "java.util.Hashtable"], "jalview.appletgui.TreeCanvas", ["awt2swing.Util", "jalview.analysis.Conservation", "jalview.appletgui.PaintRefresher", "jalview.datamodel.SequenceGroup", "$.SequenceI", "$.SequenceNode", "jalview.schemes.ColourSchemeProperty", "$.ResidueProperties", "$.UserColourScheme", "jalview.util.Format", "$.MappingUtils", "java.awt.Color", "$.Dimension", "$.Point", "$.Rectangle", "java.util.Vector"], function () {
 c$ = Clazz.decorateAsClass (function () {
 this.tree = null;
 this.scrollPane = null;
@@ -90,7 +90,7 @@ if (this.showDistances) {
 nodeLabel = nodeLabel + " : ";
 }nodeLabel = nodeLabel + String.valueOf (node.getBootstrap ());
 }}if (!nodeLabel.equals ("")) {
-g.drawString (nodeLabel, xstart + 2, ypos - 2);
+awt2swing.Util.drawString (g, nodeLabel, xstart + 2, ypos - 2);
 }var name = (this.markPlaceholders && node.isPlaceholder ()) ? (" * " + node.getName ()) : node.getName ();
 var fm = g.getFontMetrics (this.$font);
 var charWidth = fm.stringWidth (name) + 3;
@@ -102,7 +102,7 @@ if (selected != null && selected.getSequences (null).contains (node.element ()))
 g.setColor (java.awt.Color.gray);
 g.fillRect (xend + 10, ypos - charHeight + 3, charWidth, charHeight);
 g.setColor (java.awt.Color.white);
-}g.drawString (name, xend + 10, ypos);
+}awt2swing.Util.drawString (g, name, xend + 10, ypos);
 g.setColor (java.awt.Color.black);
 } else {
 this.drawNode (g, node.left (), chunk, scale, width, offx, offy);
@@ -133,7 +133,7 @@ if (this.showDistances) {
 nodeLabel = nodeLabel + " : ";
 }nodeLabel = nodeLabel + String.valueOf (node.getBootstrap ());
 }}if (!nodeLabel.equals ("")) {
-g.drawString (nodeLabel, xstart + 2, ypos - 2);
+awt2swing.Util.drawString (g, nodeLabel, xstart + 2, ypos - 2);
 }}}, "java.awt.Graphics,jalview.datamodel.SequenceNode,~N,~N,~N,~N,~N");
 Clazz.defineMethod (c$, "findElement", 
 function (x, y) {