X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceNode.java;h=010d4aaeb021c17b67e711ab2dd626bfa8536863;hb=6ae908d9a0e2fb6daee16f88cf862525ede5b7cf;hp=ea3e5153ee8ad92b0a156ccefc6b75277a8b49b7;hpb=506d60f0e188723ddc91c26824b41ac7034df3fe;p=jalview.git diff --git a/src/jalview/datamodel/SequenceNode.java b/src/jalview/datamodel/SequenceNode.java index ea3e515..010d4aa 100755 --- a/src/jalview/datamodel/SequenceNode.java +++ b/src/jalview/datamodel/SequenceNode.java @@ -1,25 +1,25 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4) - * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.datamodel; -import java.awt.*; - /** * DOCUMENT ME! * @@ -28,24 +28,6 @@ import java.awt.*; */ public class SequenceNode extends BinaryNode { - /** DOCUMENT ME!! */ - public float dist; - - /** DOCUMENT ME!! */ - public int count; - - /** DOCUMENT ME!! */ - public float height; - - /** DOCUMENT ME!! */ - public float ycount; - - /** DOCUMENT ME!! */ - public Color color = Color.black; - - /** DOCUMENT ME!! */ - public boolean dummy = false; - private boolean placeholder = false; /** @@ -56,58 +38,22 @@ public class SequenceNode extends BinaryNode super(); } - /** - * Creates a new SequenceNode object. - * - * @param val - * DOCUMENT ME! - * @param parent - * DOCUMENT ME! - * @param dist - * DOCUMENT ME! - * @param name - * DOCUMENT ME! - */ - public SequenceNode(Object val, SequenceNode parent, float dist, - String name) + public SequenceNode(SequenceI val, BinaryNode parent, String name, + double dist, int bootstrap, boolean dummy) { - super(val, parent, name); - this.dist = dist; + super(val, parent, name, dist, bootstrap, dummy); } - /** - * Creates a new SequenceNode object. - * - * @param val - * DOCUMENT ME! - * @param parent - * DOCUMENT ME! - * @param name - * DOCUMENT ME! - * @param dist - * DOCUMENT ME! - * @param bootstrap - * DOCUMENT ME! - * @param dummy - * DOCUMENT ME! - */ - public SequenceNode(Object val, SequenceNode parent, String name, - float dist, int bootstrap, boolean dummy) + public SequenceNode(SequenceI element, BinaryNode parent, String name, + double dist, int bootstrap) { - super(val, parent, name); - this.dist = dist; - this.bootstrap = bootstrap; - this.dummy = dummy; + super(element, parent, name, dist, bootstrap); } - /** - * @param dummy - * true if node is created for the representation of polytomous - * trees - */ - public boolean isDummy() + public SequenceNode(SequenceI element, BinaryNode parent, String name, + double dist) { - return dummy; + super(element, parent, name, dist); } /* @@ -122,24 +68,8 @@ public class SequenceNode extends BinaryNode /** * DOCUMENT ME! * - * @param newstate - * DOCUMENT ME! - * - * @return DOCUMENT ME! - */ - public boolean setDummy(boolean newstate) - { - boolean oldstate = dummy; - dummy = newstate; - - return oldstate; - } - - /** - * DOCUMENT ME! - * * @param Placeholder - * DOCUMENT ME! + * DOCUMENT ME! */ public void setPlaceholder(boolean Placeholder) { @@ -147,23 +77,6 @@ public class SequenceNode extends BinaryNode } /** - * ascends the tree but doesn't stop until a non-dummy node is discovered. - * This will probably break if the tree is a mixture of BinaryNodes and - * SequenceNodes. - */ - public SequenceNode AscendTree() - { - SequenceNode c = this; - - do - { - c = (SequenceNode) c.parent(); - } while ((c != null) && c.dummy); - - return c; - } - - /** * test if this node has a name that might be a label rather than a bootstrap * value * @@ -177,7 +90,9 @@ public class SequenceNode extends BinaryNode { char q = name.charAt(c); if ('0' <= q && q <= '9') + { continue; + } return true; } }