Remove getsfarray
[jalview.git] / src / jalview / datamodel / SequenceNode.java
index 905bd15..ac2e9e2 100755 (executable)
+/*\r
+ * Jalview - A Sequence Alignment Editor and Viewer\r
+ * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
+ */\r
 package jalview.datamodel;\r
 \r
-import java.awt.Color;\r
-\r
-public class SequenceNode extends BinaryNode {\r
-\r
-  public float dist;\r
-  public int count;\r
-  public float height;\r
-  public float ycount;\r
-  public Color color = Color.black;\r
-  public boolean dummy = false;\r
-  public SequenceNode() {\r
-    super();\r
-  }\r
-\r
-  public SequenceNode(Object val, SequenceNode parent, float dist,String name) {\r
-    super(val,parent,name);\r
-    this.dist = dist;\r
-  }\r
-  public SequenceNode(Object val, SequenceNode parent, String name, float dist, int bootstrap, boolean dummy) {\r
-    super(val,parent,name);\r
-    this.dist = dist;\r
-    this.bootstrap = bootstrap;\r
-    this.dummy = dummy;\r
-  }\r
-\r
-\r
-  /**\r
-   * @param dummy true if node is created for the representation of polytomous trees\r
-   */\r
-\r
-  public boolean isDummy() {\r
-    return dummy;\r
-  }\r
-  public boolean setDummy(boolean newstate) {\r
-    boolean oldstate = dummy;\r
-    dummy = newstate;\r
-    return oldstate;\r
-  }\r
-\r
-  /**\r
-   * ascends the tree but doesn't stop until a non-dummy node is discovered.\r
-   * This will probably break if the tree is a mixture of BinaryNodes and SequenceNodes.\r
-   */\r
-\r
-  public SequenceNode AscendTree() {\r
-    SequenceNode c = this;\r
-    do {\r
-      c = (SequenceNode) c.parent();\r
-    } while (c!=null && c.dummy);\r
-    return c;\r
-  }\r
+import java.awt.*;\r
+\r
+\r
+/**\r
+ * DOCUMENT ME!\r
+ *\r
+ * @author $author$\r
+ * @version $Revision$\r
+ */\r
+public class SequenceNode extends BinaryNode\r
+{\r
+    /** DOCUMENT ME!! */\r
+    public float dist;\r
+\r
+    /** DOCUMENT ME!! */\r
+    public int count;\r
+\r
+    /** DOCUMENT ME!! */\r
+    public float height;\r
+\r
+    /** DOCUMENT ME!! */\r
+    public float ycount;\r
+\r
+    /** DOCUMENT ME!! */\r
+    public Color color = Color.black;\r
+\r
+    /** DOCUMENT ME!! */\r
+    public boolean dummy = false;\r
+    private boolean placeholder = false;\r
+\r
+    /**\r
+     * Creates a new SequenceNode object.\r
+     */\r
+    public SequenceNode()\r
+    {\r
+        super();\r
+    }\r
+\r
+    /**\r
+     * Creates a new SequenceNode object.\r
+     *\r
+     * @param val DOCUMENT ME!\r
+     * @param parent DOCUMENT ME!\r
+     * @param dist DOCUMENT ME!\r
+     * @param name DOCUMENT ME!\r
+     */\r
+    public SequenceNode(Object val, SequenceNode parent, float dist, String name)\r
+    {\r
+        super(val, parent, name);\r
+        this.dist = dist;\r
+    }\r
+\r
+    /**\r
+     * Creates a new SequenceNode object.\r
+     *\r
+     * @param val DOCUMENT ME!\r
+     * @param parent DOCUMENT ME!\r
+     * @param name DOCUMENT ME!\r
+     * @param dist DOCUMENT ME!\r
+     * @param bootstrap DOCUMENT ME!\r
+     * @param dummy DOCUMENT ME!\r
+     */\r
+    public SequenceNode(Object val, SequenceNode parent, String name,\r
+        float dist, int bootstrap, boolean dummy)\r
+    {\r
+        super(val, parent, name);\r
+        this.dist = dist;\r
+        this.bootstrap = bootstrap;\r
+        this.dummy = dummy;\r
+    }\r
+\r
+    /**\r
+     * @param dummy true if node is created for the representation of polytomous trees\r
+     */\r
+    public boolean isDummy()\r
+    {\r
+        return dummy;\r
+    }\r
+\r
+    /* @param placeholder is true if the sequence refered to in the\r
+     *  element node is not actually present in the associated alignment\r
+     */\r
+    public boolean isPlaceholder()\r
+    {\r
+        return placeholder;\r
+    }\r
+\r
+    /**\r
+     * DOCUMENT ME!\r
+     *\r
+     * @param newstate DOCUMENT ME!\r
+     *\r
+     * @return DOCUMENT ME!\r
+     */\r
+    public boolean setDummy(boolean newstate)\r
+    {\r
+        boolean oldstate = dummy;\r
+        dummy = newstate;\r
+\r
+        return oldstate;\r
+    }\r
+\r
+    /**\r
+     * DOCUMENT ME!\r
+     *\r
+     * @param Placeholder DOCUMENT ME!\r
+     */\r
+    public void setPlaceholder(boolean Placeholder)\r
+    {\r
+        this.placeholder = Placeholder;\r
+    }\r
+\r
+    /**\r
+     * ascends the tree but doesn't stop until a non-dummy node is discovered.\r
+     * This will probably break if the tree is a mixture of BinaryNodes and SequenceNodes.\r
+     */\r
+    public SequenceNode AscendTree()\r
+    {\r
+        SequenceNode c = this;\r
+\r
+        do\r
+        {\r
+            c = (SequenceNode) c.parent();\r
+        }\r
+        while ((c != null) && c.dummy);\r
+\r
+        return c;\r
+    }\r
 }\r