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.AnnotatedCollectionI;
26 import jalview.datamodel.ColumnSelection;
27 import jalview.datamodel.SequenceCollectionI;
28 import jalview.datamodel.SequenceI;
29 import jalview.schemes.ColourSchemeI;
30 import jalview.schemes.RNAHelicesColour;
36 public interface AlignViewportI
46 * calculate the height for visible annotation, revalidating bounds where
47 * necessary ABSTRACT GUI METHOD
49 * @return total height of annotation
51 public int calcPanelHeight();
53 boolean hasHiddenColumns();
55 boolean isValidCharWidth();
57 boolean isShowConsensusHistogram();
59 boolean isShowSequenceLogo();
61 boolean isNormaliseSequenceLogo();
63 ColourSchemeI getGlobalColourScheme();
65 AlignmentI getAlignment();
67 ColumnSelection getColumnSelection();
69 Hashtable[] getSequenceConsensusHash();
71 Hashtable[] getRnaStructureConsensusHash();
73 boolean getIgnoreGapsConsensus();
75 boolean getCentreColumnLabels();
77 boolean isCalculationInProgress(AlignmentAnnotation alignmentAnnotation);
79 AlignmentAnnotation getAlignmentQualityAnnot();
81 AlignmentAnnotation getAlignmentConservationAnnotation();
84 * get the container for alignment consensus annotation
88 AlignmentAnnotation getAlignmentConsensusAnnotation();
91 * Test to see if viewport is still open and active
93 * @return true indicates that all references to viewport should be dropped
98 * get the associated calculation thread manager for the view
102 AlignCalcManagerI getCalcManager();
105 * get the percentage gaps allowed in a conservation calculation
108 public int getConsPercGaps();
111 * set the consensus result object for the viewport
115 void setSequenceConsensusHash(Hashtable[] hconsensus);
119 * @return the alignment annotatino row for the structure consensus
122 AlignmentAnnotation getAlignmentStrucConsensusAnnotation();
125 * set the Rna structure consensus result object for the viewport
127 * @param hStrucConsensus
129 void setRnaStructureConsensusHash(Hashtable[] hStrucConsensus);
132 * set global colourscheme
136 void setGlobalColourScheme(ColourSchemeI rhc);
138 Map<SequenceI, SequenceCollectionI> getHiddenRepSequences();
140 void setHiddenRepSequences(
141 Map<SequenceI, SequenceCollectionI> hiddenRepSequences);
144 * hides or shows dynamic annotation rows based on groups and group and
145 * alignment associated auto-annotation state flags apply the current
146 * group/autoannotation settings to the alignment view. Usually you should
147 * call the AlignmentViewPanel.adjustAnnotationHeight() method afterwards to
148 * ensure the annotation panel bounds are set correctly.
150 * @param applyGlobalSettings
151 * - apply to all autoannotation rows or just the ones associated
152 * with the current visible region
153 * @param preserveNewGroupSettings
154 * - don't apply global settings to groups which don't already have
155 * group associated annotation
157 void updateGroupAnnotationSettings(boolean applyGlobalSettings,
158 boolean preserveNewGroupSettings);