2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3 * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
20 import java.util.Hashtable;
23 import jalview.datamodel.AlignmentAnnotation;
24 import jalview.datamodel.AlignmentI;
25 import jalview.datamodel.ColumnSelection;
26 import jalview.datamodel.SequenceCollectionI;
27 import jalview.datamodel.SequenceI;
28 import jalview.schemes.ColourSchemeI;
34 public interface AlignViewportI
44 * calculate the height for visible annotation, revalidating bounds where
45 * necessary ABSTRACT GUI METHOD
47 * @return total height of annotation
49 public int calcPanelHeight();
51 boolean hasHiddenColumns();
53 boolean isValidCharWidth();
55 boolean isShowConsensusHistogram();
57 boolean isShowSequenceLogo();
59 boolean isNormaliseSequenceLogo();
61 ColourSchemeI getGlobalColourScheme();
63 AlignmentI getAlignment();
65 ColumnSelection getColumnSelection();
67 Hashtable[] getSequenceConsensusHash();
69 Hashtable[] getRnaStructureConsensusHash();
71 boolean getIgnoreGapsConsensus();
73 boolean getCentreColumnLabels();
75 boolean isCalculationInProgress(AlignmentAnnotation alignmentAnnotation);
77 AlignmentAnnotation getAlignmentQualityAnnot();
79 AlignmentAnnotation getAlignmentConservationAnnotation();
82 * get the container for alignment consensus annotation
86 AlignmentAnnotation getAlignmentConsensusAnnotation();
89 * Test to see if viewport is still open and active
91 * @return true indicates that all references to viewport should be dropped
96 * get the associated calculation thread manager for the view
100 AlignCalcManagerI getCalcManager();
103 * get the percentage gaps allowed in a conservation calculation
106 public int getConsPercGaps();
109 * set the consensus result object for the viewport
113 void setSequenceConsensusHash(Hashtable[] hconsensus);
117 * @return the alignment annotatino row for the structure consensus
120 AlignmentAnnotation getAlignmentStrucConsensusAnnotation();
123 * set the Rna structure consensus result object for the viewport
125 * @param hStrucConsensus
127 void setRnaStructureConsensusHash(Hashtable[] hStrucConsensus);
130 * set global colourscheme
134 void setGlobalColourScheme(ColourSchemeI rhc);
136 Map<SequenceI, SequenceCollectionI> getHiddenRepSequences();
138 void setHiddenRepSequences(
139 Map<SequenceI, SequenceCollectionI> hiddenRepSequences);
142 * hides or shows dynamic annotation rows based on groups and group and
143 * alignment associated auto-annotation state flags apply the current
144 * group/autoannotation settings to the alignment view. Usually you should
145 * call the AlignmentViewPanel.adjustAnnotationHeight() method afterwards to
146 * ensure the annotation panel bounds are set correctly.
148 * @param applyGlobalSettings
149 * - apply to all autoannotation rows or just the ones associated
150 * with the current visible region
151 * @param preserveNewGroupSettings
152 * - don't apply global settings to groups which don't already have
153 * group associated annotation
155 void updateGroupAnnotationSettings(boolean applyGlobalSettings,
156 boolean preserveNewGroupSettings);
159 * @return true if a reference sequence is set and should be displayed
161 public boolean isDisplayReferenceSeq();
164 * @return set the flag for displaying reference sequences when they are
167 public void setDisplayReferenceSeq(boolean displayReferenceSeq);
170 * @return true if colourschemes should render according to reference sequence
171 * rather than consensus if available
173 public boolean isColourByReferenceSeq();
176 * @return true set flag for deciding if colourschemes should render according
177 * to reference sequence rather than consensus if available
179 public void setColourByReferenceSeq(boolean colourByReferenceSeq);