X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FTreeCanvas.java;fp=src%2Fjalview%2Fappletgui%2FTreeCanvas.java;h=7040c42f26aaf554723f5e4508233b44944194f3;hb=7f5ab7d1f58d870622968e0e6a430f33403b8e4f;hp=e30879cb8efef0e90fe3238fa6a7026288abfaa2;hpb=d6a30c6516e8e2f923c8c2f6dce7592cb3b7d974;p=jalview.git diff --git a/src/jalview/appletgui/TreeCanvas.java b/src/jalview/appletgui/TreeCanvas.java index e30879c..7040c42 100755 --- a/src/jalview/appletgui/TreeCanvas.java +++ b/src/jalview/appletgui/TreeCanvas.java @@ -146,7 +146,7 @@ public class TreeCanvas extends Panel implements MouseListener, } public void drawNode(Graphics g, SequenceNode node, float chunk, - float scale, int width, int offx, int offy) + double scale, int width, int offx, int offy) { if (node == null) { @@ -157,8 +157,8 @@ public class TreeCanvas extends Panel implements MouseListener, { // Drawing leaf node - float height = node.height; - float dist = node.dist; + double height = node.height; + double dist = node.dist; int xstart = (int) ((height - dist) * scale) + offx; int xend = (int) (height * scale) + offx; @@ -240,8 +240,8 @@ public class TreeCanvas extends Panel implements MouseListener, drawNode(g, (SequenceNode) node.right(), chunk, scale, width, offx, offy); - float height = node.height; - float dist = node.dist; + double height = node.height; + double dist = node.dist; int xstart = (int) ((height - dist) * scale) + offx; int xend = (int) (height * scale) + offx; @@ -338,7 +338,7 @@ public class TreeCanvas extends Panel implements MouseListener, SequenceNode top = tree.getTopNode(); - float wscale = (float) (width * .8 - offx * 2) / tree.getMaxHeight(); + double wscale = (float) (width * .8 - offx * 2) / tree.getMaxHeight(); if (top.count == 0) { top.count = ((SequenceNode) top.left()).count @@ -350,7 +350,7 @@ public class TreeCanvas extends Panel implements MouseListener, } public void pickNode(Rectangle pickBox, SequenceNode node, float chunk, - float scale, int width, int offx, int offy) + double scale, int width, int offx, int offy) { if (node == null) { @@ -359,7 +359,7 @@ public class TreeCanvas extends Panel implements MouseListener, if (node.left() == null && node.right() == null) { - float height = node.height; + double height = node.height; // float dist = node.dist; // int xstart = (int) ( (height - dist) * scale) + offx; @@ -465,7 +465,7 @@ public class TreeCanvas extends Panel implements MouseListener, // for // scrollbar - float wscale = (width - labelLength - offx * 2) / tree.getMaxHeight(); + double wscale = (width - labelLength - offx * 2) / tree.getMaxHeight(); SequenceNode top = tree.getTopNode();