individual label format settings for each annotation row. Removed excess term in...
[jalview.git] / src / jalview / datamodel / AlignmentAnnotation.java
index 381a054..d8ad4fc 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * 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 (Development Version 2.4.1)
+ * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
  * 
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -101,6 +101,33 @@ public class AlignmentAnnotation
 
   public boolean belowAlignment = true;
 
+  public SequenceGroup groupRef =null ;
+
+  /**
+   * display every column label, even if there is a row of identical labels
+   */
+  public boolean showAllColLabels=false;
+  
+  /**
+   * scale the column label to fit within the alignment column.
+   */
+  public boolean scaleColLabel = false;
+
+  /**
+   * centre the column labels relative to the alignment column
+   */
+  public boolean centreColLabels = false;
+
+  
+  /* (non-Javadoc)
+   * @see java.lang.Object#finalize()
+   */
+  protected void finalize() throws Throwable
+  {
+    groupRef = null;
+    super.finalize();
+  }
+
   public static int getGraphValueFromString(String string)
   {
     if (string.equalsIgnoreCase("BAR_GRAPH"))
@@ -174,7 +201,6 @@ public class AlignmentAnnotation
         firstChar != 'H'
                 && firstChar != 'E'
                 && firstChar != '-'
-                && firstChar != '-'
                 && firstChar < jalview.schemes.ResidueProperties.aaIndex.length)
         {
           if (jalview.schemes.ResidueProperties.aaIndex[firstChar] < 23)
@@ -319,6 +345,7 @@ public class AlignmentAnnotation
     this.graph = annotation.graph;
     this.graphHeight = annotation.graphHeight;
     this.graphGroup = annotation.graphGroup;
+    this.groupRef = annotation.groupRef;
     this.editable = annotation.editable;
     this.autoCalculated = annotation.autoCalculated;
     this.hasIcons = annotation.hasIcons;
@@ -485,8 +512,8 @@ public class AlignmentAnnotation
 
       buffer.append(", ");
     }
-
-    if (label.equals("Consensus"))
+    // TODO: remove disgusting hack for 'special' treatment of consensus line.
+    if (label.indexOf("Consensus")==0)
     {
       buffer.append("\n");