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;
25 import java.util.List;
28 import jalview.analysis.Conservation;
29 import jalview.datamodel.AlignmentAnnotation;
30 import jalview.datamodel.AlignmentI;
31 import jalview.datamodel.AlignmentView;
32 import jalview.datamodel.CigarArray;
33 import jalview.datamodel.ColumnSelection;
34 import jalview.datamodel.SequenceCollectionI;
35 import jalview.datamodel.SequenceGroup;
36 import jalview.datamodel.SequenceI;
37 import jalview.schemes.ColourSchemeI;
43 public interface AlignViewportI
53 * calculate the height for visible annotation, revalidating bounds where
54 * necessary ABSTRACT GUI METHOD
56 * @return total height of annotation
58 public int calcPanelHeight();
60 boolean hasHiddenColumns();
62 boolean isValidCharWidth();
64 boolean isShowConsensusHistogram();
66 boolean isShowSequenceLogo();
68 boolean isNormaliseSequenceLogo();
70 ColourSchemeI getGlobalColourScheme();
72 AlignmentI getAlignment();
74 ColumnSelection getColumnSelection();
76 Hashtable[] getSequenceConsensusHash();
78 Hashtable[] getRnaStructureConsensusHash();
80 boolean getIgnoreGapsConsensus();
82 boolean getCentreColumnLabels();
84 boolean isCalculationInProgress(AlignmentAnnotation alignmentAnnotation);
86 AlignmentAnnotation getAlignmentQualityAnnot();
88 AlignmentAnnotation getAlignmentConservationAnnotation();
91 * get the container for alignment consensus annotation
95 AlignmentAnnotation getAlignmentConsensusAnnotation();
98 * Test to see if viewport is still open and active
100 * @return true indicates that all references to viewport should be dropped
105 * get the associated calculation thread manager for the view
109 AlignCalcManagerI getCalcManager();
112 * get the percentage gaps allowed in a conservation calculation
115 public int getConsPercGaps();
118 * set the consensus result object for the viewport
122 void setSequenceConsensusHash(Hashtable[] hconsensus);
126 * @return the alignment annotatino row for the structure consensus
129 AlignmentAnnotation getAlignmentStrucConsensusAnnotation();
132 * set the Rna structure consensus result object for the viewport
134 * @param hStrucConsensus
136 void setRnaStructureConsensusHash(Hashtable[] hStrucConsensus);
139 * set global colourscheme
143 void setGlobalColourScheme(ColourSchemeI rhc);
145 Map<SequenceI, SequenceCollectionI> getHiddenRepSequences();
147 void setHiddenRepSequences(
148 Map<SequenceI, SequenceCollectionI> hiddenRepSequences);
151 * hides or shows dynamic annotation rows based on groups and group and
152 * alignment associated auto-annotation state flags apply the current
153 * group/autoannotation settings to the alignment view. Usually you should
154 * call the AlignmentViewPanel.adjustAnnotationHeight() method afterwards to
155 * ensure the annotation panel bounds are set correctly.
157 * @param applyGlobalSettings
158 * - apply to all autoannotation rows or just the ones associated
159 * with the current visible region
160 * @param preserveNewGroupSettings
161 * - don't apply global settings to groups which don't already have
162 * group associated annotation
164 void updateGroupAnnotationSettings(boolean applyGlobalSettings,
165 boolean preserveNewGroupSettings);
167 void setSequenceColour(SequenceI seq, Color col);
169 Color getSequenceColour(SequenceI seq);
171 void updateSequenceIdColours();
173 SequenceGroup getSelectionGroup();
175 SequenceI[] getSequenceSelection();
177 void clearSequenceColours();
179 CigarArray getViewAsCigars(boolean selectedRegionOnly);
181 AlignmentView getAlignmentView(boolean selectedOnly);
183 AlignmentView getAlignmentView(boolean selectedOnly, boolean markGroups);
185 String[] getViewAsString(boolean selectedRegionOnly);
187 void setSelectionGroup(SequenceGroup sg);
189 char getGapCharacter();
191 void setColumnSelection(ColumnSelection cs);
193 void setConservation(Conservation cons);
196 * get a copy of the currently visible alignment annotation
197 * @param selectedOnly if true - trim to selected regions on the alignment
198 * @return an empty list or new alignment annotation objects shown only visible columns trimmed to selected region only
200 List<AlignmentAnnotation> getVisibleAlignmentAnnotation(
201 boolean selectedOnly);