X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fviewmodel%2FAlignmentViewport.java;h=9b4e1fe375b4e9ece81dc96fa07185ee69b3ed2b;hb=dbdc8807d9059dacf65a087b7bcb8363be53fb8f;hp=a4b494af16570f819c581afaee06d44e4f2f9616;hpb=bd4ab013e64863bbbffa93c58953051e11cfb236;p=jalview.git diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index a4b494a..9b4e1fe 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -616,6 +616,8 @@ public abstract class AlignmentViewport protected boolean ignoreBelowBackGroundFrequencyCalculation = false; + protected boolean infoLetterHeight = false; + protected ResidueShaderI residueShading = new ResidueShader(); @Override @@ -779,6 +781,10 @@ public abstract class AlignmentViewport @Override public void setSequenceInformationHash(ProfilesI info, int index) { + if (hinformation.size() < index + 1) + { + return; + } hinformation.set(index, info); } @@ -1366,6 +1372,16 @@ public abstract class AlignmentViewport } + public void setInfoLetterHeight(boolean b, AlignmentViewPanel ap) + { + infoLetterHeight = b; + if (ap != null) + { + updateInformation(ap); + } + + } + private long sgrouphash = -1, colselhash = -1; /** @@ -1426,6 +1442,12 @@ public abstract class AlignmentViewport return ignoreBelowBackGroundFrequencyCalculation; } + @Override + public boolean isInfoLetterHeight() + { + return infoLetterHeight; + } + // property change stuff // JBPNote Prolly only need this in the applet version. private PropertyChangeSupport changeSupport = new PropertyChangeSupport( @@ -1997,6 +2019,7 @@ public abstract class AlignmentViewport { updateStrucConsensus(ap); } + initInformation(); updateInformation(ap); List hmmSequences; @@ -3117,4 +3140,18 @@ public abstract class AlignmentViewport + ((ignoreGapsInConsensusCalculation) ? " without gaps" : "")); return sq; } + + public boolean hasReferenceAnnotation() + { + AlignmentAnnotation[] annots = this.alignment.getAlignmentAnnotation(); + for (AlignmentAnnotation annot : annots) + { + if ("RF".equals(annot.label) || annot.label.contains("Reference")) + { + return true; + } + } + return false; + } + }