X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fdatamodel%2FAlignmentAnnotation.java;h=a3328b317d8d7e31acf9940392e04848fbca6ab5;hb=c16c1633e1a5acc9f44e4de40b9abbb8a59b99b4;hp=381a05470cd0dfdbd398e150a1e51c3e2173c9ae;hpb=506d60f0e188723ddc91c26824b41ac7034df3fe;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index 381a054..a3328b3 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -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,10 +201,9 @@ public class AlignmentAnnotation firstChar != 'H' && firstChar != 'E' && firstChar != '-' - && firstChar != '-' && firstChar < jalview.schemes.ResidueProperties.aaIndex.length) { - if (jalview.schemes.ResidueProperties.aaIndex[firstChar] < 23) + if (jalview.schemes.ResidueProperties.aaIndex[firstChar] < 23) // TODO: parameterise to gap symbol number { nonSSLabel = true; } @@ -284,6 +310,15 @@ public class AlignmentAnnotation min = annotations[i].value; } } + // ensure zero is origin for min/max ranges on only one side of zero + if (min>0) { + min = 0; + } else { + if (max<0) + { + max = 0; + } + } } graphMin = min; @@ -319,6 +354,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 +521,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");