import java.awt.*;
import jalview.analysis.*;
-import jalview.api.StructureSelectionManagerProvider;
+import jalview.api.AlignViewportI;
import jalview.bin.*;
* @author $author$
* @version $Revision: 1.141 $
*/
-public class AlignViewport implements SelectionSource, VamsasSource
+public class AlignViewport implements SelectionSource, VamsasSource, AlignViewportI
{
private static final int RIGHT_JUSTIFY = 1;
showConsensusHistogram = Cache.getDefault("SHOW_CONSENSUS_HISTOGRAM",
true);
showSequenceLogo = Cache.getDefault("SHOW_CONSENSUS_LOGO", false);
+ normaliseSequenceLogo = Cache.getDefault("NORMALISE_CONSENSUS_LOGO", false);
showGroupConsensus = Cache.getDefault("SHOW_GROUP_CONSENSUS", false);
// TODO: add menu option action that nulls or creates consensus object
// depending on if the user wants to see the annotation or not in a
* should consensus profile be rendered by default
*/
public boolean showSequenceLogo = false;
-
+ /**
+ * should consensus profile be rendered normalised to row height
+ */
+ public boolean normaliseSequenceLogo = false;
/**
* should consensus histograms be rendered by default
*/
}
return seqvectors.toArray(new SequenceI[seqvectors.size()][]);
}
+
+
+ public boolean isNormaliseSequenceLogo()
+ {
+ return normaliseSequenceLogo;
+ }
+
+ public void setNormaliseSequenceLogo(boolean state)
+ {
+ normaliseSequenceLogo = state;
+ }
+
+ public boolean isCalcInProgress()
+ {
+ // TODO generalise to iterate over all calculators associated with av
+ return updatingConsensus || updatingConservation || updatingStrucConsensus;
+ }
+
+ public boolean isCalculationInProgress(
+ AlignmentAnnotation alignmentAnnotation)
+ {
+ if (!alignmentAnnotation.autoCalculated)
+ return false;
+ if ((updatingConsensus && consensus==alignmentAnnotation)
+ || (updatingConservation && (conservation==alignmentAnnotation || quality==alignmentAnnotation))
+ || (updatingStrucConsensus && strucConsensus==alignmentAnnotation)
+ )
+ {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @return true if alignment characters should be displayed
+ */
+ public boolean isValidCharWidth()
+ {
+ return validCharWidth;
+ }
+
+ @Override
+ public Hashtable[] getSequenceConsensusHash()
+ {
+ return hconsensus;
+ }
+
+ @Override
+ public Hashtable[] getRnaStructureConsensusHash()
+ {
+ return hStrucConsensus;
+ }
}