added tree node property for sequence placeholders.
[jalview.git] / src / jalview / datamodel / SequenceNode.java
index 905bd15..5e16c57 100755 (executable)
@@ -1,6 +1,6 @@
 package jalview.datamodel;\r
 \r
-import java.awt.Color;\r
+import java.awt.*;\r
 \r
 public class SequenceNode extends BinaryNode {\r
 \r
@@ -10,6 +10,8 @@ public class SequenceNode extends BinaryNode {
   public float ycount;\r
   public Color color = Color.black;\r
   public boolean dummy = false;\r
+  private boolean placeholder = false;\r
+\r
   public SequenceNode() {\r
     super();\r
   }\r
@@ -33,12 +35,25 @@ public class SequenceNode extends BinaryNode {
   public boolean isDummy() {\r
     return dummy;\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
   public boolean setDummy(boolean newstate) {\r
     boolean oldstate = dummy;\r
     dummy = newstate;\r
     return oldstate;\r
   }\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