X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjalview%2Fappletgui%2FTreeCanvas.js;fp=site%2Fj2s%2Fjalview%2Fappletgui%2FTreeCanvas.js;h=43b95d7619c66e40d33124dc878bbbdd99fa3a1b;hp=69da9f2fc087f4f04ea326941993e4a39fdc8879;hb=36d803e4a1f98728e91e80de5fa0b95e0cadb0d4;hpb=5b669b6c1a4f1f29b178283a46bc22fcd66aabad diff --git a/site/j2s/jalview/appletgui/TreeCanvas.js b/site/j2s/jalview/appletgui/TreeCanvas.js index 69da9f2..43b95d7 100644 --- a/site/j2s/jalview/appletgui/TreeCanvas.js +++ b/site/j2s/jalview/appletgui/TreeCanvas.js @@ -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) {