2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
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 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/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 import java.awt.Color;
22 import java.util.Hashtable;
25 import jalview.datamodel.AlignmentAnnotation;
26 import jalview.datamodel.AlignmentI;
27 import jalview.datamodel.AlignmentView;
28 import jalview.datamodel.CigarArray;
29 import jalview.datamodel.ColumnSelection;
30 import jalview.datamodel.SequenceCollectionI;
31 import jalview.datamodel.SequenceGroup;
32 import jalview.datamodel.SequenceI;
33 import jalview.schemes.ColourSchemeI;
39 public interface AlignViewportI
49 * calculate the height for visible annotation, revalidating bounds where
50 * necessary ABSTRACT GUI METHOD
52 * @return total height of annotation
54 public int calcPanelHeight();
56 boolean hasHiddenColumns();
58 boolean isValidCharWidth();
60 boolean isShowConsensusHistogram();
62 boolean isShowSequenceLogo();
64 boolean isNormaliseSequenceLogo();
66 ColourSchemeI getGlobalColourScheme();
68 AlignmentI getAlignment();
70 ColumnSelection getColumnSelection();
72 Hashtable[] getSequenceConsensusHash();
74 Hashtable[] getRnaStructureConsensusHash();
76 boolean getIgnoreGapsConsensus();
78 boolean getCentreColumnLabels();
80 boolean isCalculationInProgress(AlignmentAnnotation alignmentAnnotation);
82 AlignmentAnnotation getAlignmentQualityAnnot();
84 AlignmentAnnotation getAlignmentConservationAnnotation();
87 * get the container for alignment consensus annotation
91 AlignmentAnnotation getAlignmentConsensusAnnotation();
94 * Test to see if viewport is still open and active
96 * @return true indicates that all references to viewport should be dropped
101 * get the associated calculation thread manager for the view
105 AlignCalcManagerI getCalcManager();
108 * get the percentage gaps allowed in a conservation calculation
111 public int getConsPercGaps();
114 * set the consensus result object for the viewport
118 void setSequenceConsensusHash(Hashtable[] hconsensus);
122 * @return the alignment annotatino row for the structure consensus
125 AlignmentAnnotation getAlignmentStrucConsensusAnnotation();
128 * set the Rna structure consensus result object for the viewport
130 * @param hStrucConsensus
132 void setRnaStructureConsensusHash(Hashtable[] hStrucConsensus);
135 * set global colourscheme
139 void setGlobalColourScheme(ColourSchemeI rhc);
141 Map<SequenceI, SequenceCollectionI> getHiddenRepSequences();
143 void setHiddenRepSequences(
144 Map<SequenceI, SequenceCollectionI> hiddenRepSequences);
147 * hides or shows dynamic annotation rows based on groups and group and
148 * alignment associated auto-annotation state flags apply the current
149 * group/autoannotation settings to the alignment view. Usually you should
150 * call the AlignmentViewPanel.adjustAnnotationHeight() method afterwards to
151 * ensure the annotation panel bounds are set correctly.
153 * @param applyGlobalSettings
154 * - apply to all autoannotation rows or just the ones associated
155 * with the current visible region
156 * @param preserveNewGroupSettings
157 * - don't apply global settings to groups which don't already have
158 * group associated annotation
160 void updateGroupAnnotationSettings(boolean applyGlobalSettings,
161 boolean preserveNewGroupSettings);
163 void setSequenceColour(SequenceI seq, Color col);
165 Color getSequenceColour(SequenceI seq);
167 void updateSequenceIdColours();
169 SequenceGroup getSelectionGroup();
171 SequenceI[] getSequenceSelection();
173 void clearSequenceColours();
175 CigarArray getViewAsCigars(boolean selectedRegionOnly);
177 AlignmentView getAlignmentView(boolean selectedOnly);
179 AlignmentView getAlignmentView(boolean selectedOnly, boolean markGroups);
181 String[] getViewAsString(boolean selectedRegionOnly);
183 void setSelectionGroup(SequenceGroup sg);
185 char getGapCharacter();
187 void setColumnSelection(ColumnSelection cs);