2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
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.analysis.Conservation;
26 import jalview.datamodel.AlignmentAnnotation;
27 import jalview.datamodel.AlignmentI;
28 import jalview.datamodel.AlignmentView;
29 import jalview.datamodel.CigarArray;
30 import jalview.datamodel.ColumnSelection;
31 import jalview.datamodel.SequenceCollectionI;
32 import jalview.datamodel.SequenceGroup;
33 import jalview.datamodel.SequenceI;
34 import jalview.schemes.ColourSchemeI;
40 public interface AlignViewportI
50 * calculate the height for visible annotation, revalidating bounds where
51 * necessary ABSTRACT GUI METHOD
53 * @return total height of annotation
55 public int calcPanelHeight();
57 boolean hasHiddenColumns();
59 boolean isValidCharWidth();
61 boolean isShowConsensusHistogram();
63 boolean isShowSequenceLogo();
65 boolean isNormaliseSequenceLogo();
67 ColourSchemeI getGlobalColourScheme();
69 AlignmentI getAlignment();
71 ColumnSelection getColumnSelection();
73 Hashtable[] getSequenceConsensusHash();
75 Hashtable[] getRnaStructureConsensusHash();
77 boolean getIgnoreGapsConsensus();
79 boolean getCentreColumnLabels();
81 boolean isCalculationInProgress(AlignmentAnnotation alignmentAnnotation);
83 AlignmentAnnotation getAlignmentQualityAnnot();
85 AlignmentAnnotation getAlignmentConservationAnnotation();
88 * get the container for alignment consensus annotation
92 AlignmentAnnotation getAlignmentConsensusAnnotation();
95 * Test to see if viewport is still open and active
97 * @return true indicates that all references to viewport should be dropped
102 * get the associated calculation thread manager for the view
106 AlignCalcManagerI getCalcManager();
109 * get the percentage gaps allowed in a conservation calculation
112 public int getConsPercGaps();
115 * set the consensus result object for the viewport
119 void setSequenceConsensusHash(Hashtable[] hconsensus);
123 * @return the alignment annotatino row for the structure consensus
126 AlignmentAnnotation getAlignmentStrucConsensusAnnotation();
129 * set the Rna structure consensus result object for the viewport
131 * @param hStrucConsensus
133 void setRnaStructureConsensusHash(Hashtable[] hStrucConsensus);
136 * set global colourscheme
140 void setGlobalColourScheme(ColourSchemeI rhc);
142 Map<SequenceI, SequenceCollectionI> getHiddenRepSequences();
144 void setHiddenRepSequences(
145 Map<SequenceI, SequenceCollectionI> hiddenRepSequences);
148 * hides or shows dynamic annotation rows based on groups and group and
149 * alignment associated auto-annotation state flags apply the current
150 * group/autoannotation settings to the alignment view. Usually you should
151 * call the AlignmentViewPanel.adjustAnnotationHeight() method afterwards to
152 * ensure the annotation panel bounds are set correctly.
154 * @param applyGlobalSettings
155 * - apply to all autoannotation rows or just the ones associated
156 * with the current visible region
157 * @param preserveNewGroupSettings
158 * - don't apply global settings to groups which don't already have
159 * group associated annotation
161 void updateGroupAnnotationSettings(boolean applyGlobalSettings,
162 boolean preserveNewGroupSettings);
164 void setSequenceColour(SequenceI seq, Color col);
166 Color getSequenceColour(SequenceI seq);
168 void updateSequenceIdColours();
170 SequenceGroup getSelectionGroup();
172 SequenceI[] getSequenceSelection();
174 void clearSequenceColours();
176 CigarArray getViewAsCigars(boolean selectedRegionOnly);
178 AlignmentView getAlignmentView(boolean selectedOnly);
180 AlignmentView getAlignmentView(boolean selectedOnly, boolean markGroups);
182 String[] getViewAsString(boolean selectedRegionOnly);
184 void setSelectionGroup(SequenceGroup sg);
186 char getGapCharacter();
188 void setColumnSelection(ColumnSelection cs);
190 void setConservation(Conservation cons);