X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FTreeCanvas.java;h=3407c077213fd3f98dba3c25b5e24f4a61d98bb9;hb=b9d84d8a7aa2557c51307addf9e80139f07bb14b;hp=328f02a80832a9ff5e97efed1cb53a8ec029a1ea;hpb=14d1b87b4738f1e885e8e55de22d8659d0d719f0;p=jalview.git diff --git a/src/jalview/gui/TreeCanvas.java b/src/jalview/gui/TreeCanvas.java index 328f02a..3407c07 100755 --- a/src/jalview/gui/TreeCanvas.java +++ b/src/jalview/gui/TreeCanvas.java @@ -204,14 +204,14 @@ public class TreeCanvas nodeLabel = new Format("%-.2f").form(node.dist); } - if (showBootstrap) + if (showBootstrap && node.bootstrap>-1) { if (showDistances) { nodeLabel = nodeLabel + " : "; } - nodeLabel = nodeLabel + String.valueOf(node.getBootstrap()); + nodeLabel = nodeLabel + String.valueOf(node.bootstrap); } if (!nodeLabel.equals("")) @@ -284,10 +284,26 @@ public class TreeCanvas g.drawLine( (int) (height * scale) + offx, ystart, (int) (height * scale) + offx, yend); + String nodeLabel = ""; + if (showDistances && (node.dist > 0)) { - g.drawString(new Format("%-.2f").form(node.dist).trim(), xstart + 2, - ypos - 2); + nodeLabel = new Format("%-.2f").form(node.dist); + } + + if (showBootstrap && node.bootstrap>-1) + { + if (showDistances) + { + nodeLabel = nodeLabel + " : "; + } + + nodeLabel = nodeLabel + String.valueOf(node.bootstrap); + } + + if (!nodeLabel.equals("")) + { + g.drawString(nodeLabel, xstart + 2, ypos - 2); } } } @@ -847,7 +863,7 @@ public class TreeCanvas av.alignment.getWidth() - 1); sg.setName("JTreeGroup:" + sg.hashCode()); - + sg.setIdColour(col); AlignmentPanel[] aps = getAssociatedPanels(); for (int a = 0; a < aps.length; a++) {