From: kjvdheide Date: Fri, 15 Dec 2017 16:58:30 +0000 (+0000) Subject: JAL-1953 added Y coordinate getter method X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f8826d022ef1eb3fef6c85d7a02d0d36a4b6ed78;p=jalview.git JAL-1953 added Y coordinate getter method --- diff --git a/forester b/forester index 20ce936..1706dee 160000 --- a/forester +++ b/forester @@ -1 +1 @@ -Subproject commit 20ce9361380c461b8a7053100207034314e56e23 +Subproject commit 1706deea223bc1a30d170596192d726b6847b7eb diff --git a/src/jalview/ext/archaeopteryx/TreeNode.java b/src/jalview/ext/archaeopteryx/TreeNode.java index 1205062..13ee7d0 100644 --- a/src/jalview/ext/archaeopteryx/TreeNode.java +++ b/src/jalview/ext/archaeopteryx/TreeNode.java @@ -30,7 +30,6 @@ public class TreeNode implements ExternalTreeNodeI node = aptxNode; originalNodes.put(aptxNode, this); wrappedNodes.put(this, aptxNode); - System.out.println(getId()); } @@ -152,7 +151,6 @@ public class TreeNode implements ExternalTreeNodeI { wrappedNode = new TreeNode(aptxNode); } - return wrappedNode; } @@ -173,6 +171,7 @@ public class TreeNode implements ExternalTreeNodeI { // expand this aptxNode = new PhylogenyNode(wrappedNode.getNodeName()); + } return aptxNode; @@ -184,7 +183,8 @@ public class TreeNode implements ExternalTreeNodeI { final int prime = 31; int result = 1; - result = prime * result + ((node == null) ? 0 : node.hashCode()); + result = (int) (prime * result + + ((node == null) ? 0 : (node.hashCode() * getId()))); return result; } @@ -210,12 +210,13 @@ public class TreeNode implements ExternalTreeNodeI { return false; } - else if (getId() != other.getId()) - { - return false; - } } - else if (!node.equals(other.node)) + if (getId() != other.getId()) + { + return false; + } + + if (!node.equals(other.node)) { return false; } @@ -223,4 +224,10 @@ public class TreeNode implements ExternalTreeNodeI } + @Override + public float getYcoord() + { + return node.getYcoord(); + } + } diff --git a/src/jalview/ext/treeviewer/ExternalTreeNodeI.java b/src/jalview/ext/treeviewer/ExternalTreeNodeI.java index bdf3b8d..85be915 100644 --- a/src/jalview/ext/treeviewer/ExternalTreeNodeI.java +++ b/src/jalview/ext/treeviewer/ExternalTreeNodeI.java @@ -26,6 +26,8 @@ public interface ExternalTreeNodeI public float getXcoord(); + public float getYcoord(); + public void setBranchColor(Color branchColor); public boolean isInternal();