2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
3 * Copyright (C) 2014 The Jalview Authors
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
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
23 import java.awt.Color;
24 import java.util.Hashtable;
27 import jalview.analysis.Conservation;
28 import jalview.datamodel.AlignmentAnnotation;
29 import jalview.datamodel.AlignmentI;
30 import jalview.datamodel.AlignmentView;
31 import jalview.datamodel.CigarArray;
32 import jalview.datamodel.ColumnSelection;
33 import jalview.datamodel.SequenceCollectionI;
34 import jalview.datamodel.SequenceGroup;
35 import jalview.datamodel.SequenceI;
36 import jalview.schemes.ColourSchemeI;
42 public interface AlignViewportI
52 * calculate the height for visible annotation, revalidating bounds where
53 * necessary ABSTRACT GUI METHOD
55 * @return total height of annotation
57 public int calcPanelHeight();
59 boolean hasHiddenColumns();
61 boolean isValidCharWidth();
63 boolean isShowConsensusHistogram();
65 boolean isShowSequenceLogo();
67 boolean isNormaliseSequenceLogo();
69 ColourSchemeI getGlobalColourScheme();
71 AlignmentI getAlignment();
73 ColumnSelection getColumnSelection();
75 Hashtable[] getSequenceConsensusHash();
77 Hashtable[] getRnaStructureConsensusHash();
79 boolean getIgnoreGapsConsensus();
81 boolean getCentreColumnLabels();
83 boolean isCalculationInProgress(AlignmentAnnotation alignmentAnnotation);
85 AlignmentAnnotation getAlignmentQualityAnnot();
87 AlignmentAnnotation getAlignmentConservationAnnotation();
90 * get the container for alignment consensus annotation
94 AlignmentAnnotation getAlignmentConsensusAnnotation();
97 * Test to see if viewport is still open and active
99 * @return true indicates that all references to viewport should be dropped
104 * get the associated calculation thread manager for the view
108 AlignCalcManagerI getCalcManager();
111 * get the percentage gaps allowed in a conservation calculation
114 public int getConsPercGaps();
117 * set the consensus result object for the viewport
121 void setSequenceConsensusHash(Hashtable[] hconsensus);
125 * @return the alignment annotatino row for the structure consensus
128 AlignmentAnnotation getAlignmentStrucConsensusAnnotation();
131 * set the Rna structure consensus result object for the viewport
133 * @param hStrucConsensus
135 void setRnaStructureConsensusHash(Hashtable[] hStrucConsensus);
138 * set global colourscheme
142 void setGlobalColourScheme(ColourSchemeI rhc);
144 Map<SequenceI, SequenceCollectionI> getHiddenRepSequences();
146 void setHiddenRepSequences(
147 Map<SequenceI, SequenceCollectionI> hiddenRepSequences);
150 * hides or shows dynamic annotation rows based on groups and group and
151 * alignment associated auto-annotation state flags apply the current
152 * group/autoannotation settings to the alignment view. Usually you should
153 * call the AlignmentViewPanel.adjustAnnotationHeight() method afterwards to
154 * ensure the annotation panel bounds are set correctly.
156 * @param applyGlobalSettings
157 * - apply to all autoannotation rows or just the ones associated
158 * with the current visible region
159 * @param preserveNewGroupSettings
160 * - don't apply global settings to groups which don't already have
161 * group associated annotation
163 void updateGroupAnnotationSettings(boolean applyGlobalSettings,
164 boolean preserveNewGroupSettings);
166 void setSequenceColour(SequenceI seq, Color col);
168 Color getSequenceColour(SequenceI seq);
170 void updateSequenceIdColours();
172 SequenceGroup getSelectionGroup();
174 SequenceI[] getSequenceSelection();
176 void clearSequenceColours();
178 CigarArray getViewAsCigars(boolean selectedRegionOnly);
180 AlignmentView getAlignmentView(boolean selectedOnly);
182 AlignmentView getAlignmentView(boolean selectedOnly, boolean markGroups);
184 String[] getViewAsString(boolean selectedRegionOnly);
186 void setSelectionGroup(SequenceGroup sg);
188 char getGapCharacter();
190 void setColumnSelection(ColumnSelection cs);
192 void setConservation(Conservation cons);
194 FeaturesDisplayedI getFeaturesDisplayed();
196 String getSequenceSetId();