From: amwaterhouse Date: Mon, 19 Sep 2005 12:49:39 +0000 (+0000) Subject: Alignment of node labels modified X-Git-Tag: Release_2_06~48 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a6cd54c46366acd8bc3350a79374b18f9eb0b240;p=jalview.git Alignment of node labels modified --- diff --git a/src/jalview/gui/TreeCanvas.java b/src/jalview/gui/TreeCanvas.java index 7b74078..9524544 100755 --- a/src/jalview/gui/TreeCanvas.java +++ b/src/jalview/gui/TreeCanvas.java @@ -195,7 +195,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, if (showDistances && (node.dist > 0)) { - nodeLabel = new Format("%5.2f").form(node.dist); + nodeLabel = new Format("%5.2f").form(node.dist).trim(); } if (showBootstrap) @@ -210,7 +210,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, if (!nodeLabel.equals("")) { - g.drawString(nodeLabel, xstart, ypos - 10); + g.drawString(nodeLabel, xstart+2, ypos - 2); } String name = (markPlaceholders && node.isPlaceholder()) @@ -273,8 +273,8 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable, if (showDistances && (node.dist > 0)) { - g.drawString(new Format("%5.2f").form(node.dist), xstart, - ypos - 5); + g.drawString(new Format("%5.2f").form(node.dist).trim(), xstart+2, + ypos - 2); } } }