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.awt.Color;
21 import java.util.Hashtable;
24 import jalview.datamodel.AlignmentAnnotation;
25 import jalview.datamodel.AlignmentI;
26 import jalview.datamodel.AlignmentView;
27 import jalview.datamodel.CigarArray;
28 import jalview.datamodel.ColumnSelection;
29 import jalview.datamodel.SequenceCollectionI;
30 import jalview.datamodel.SequenceGroup;
31 import jalview.datamodel.SequenceI;
32 import jalview.schemes.ColourSchemeI;
38 public interface AlignViewportI
48 * calculate the height for visible annotation, revalidating bounds where
49 * necessary ABSTRACT GUI METHOD
51 * @return total height of annotation
53 public int calcPanelHeight();
55 boolean hasHiddenColumns();
57 boolean isValidCharWidth();
59 boolean isShowConsensusHistogram();
61 boolean isShowSequenceLogo();
63 boolean isNormaliseSequenceLogo();
65 ColourSchemeI getGlobalColourScheme();
67 AlignmentI getAlignment();
69 ColumnSelection getColumnSelection();
71 Hashtable[] getSequenceConsensusHash();
73 Hashtable[] getRnaStructureConsensusHash();
75 boolean getIgnoreGapsConsensus();
77 boolean getCentreColumnLabels();
79 boolean isCalculationInProgress(AlignmentAnnotation alignmentAnnotation);
81 AlignmentAnnotation getAlignmentQualityAnnot();
83 AlignmentAnnotation getAlignmentConservationAnnotation();
86 * get the container for alignment consensus annotation
90 AlignmentAnnotation getAlignmentConsensusAnnotation();
93 * Test to see if viewport is still open and active
95 * @return true indicates that all references to viewport should be dropped
100 * get the associated calculation thread manager for the view
104 AlignCalcManagerI getCalcManager();
107 * get the percentage gaps allowed in a conservation calculation
110 public int getConsPercGaps();
113 * set the consensus result object for the viewport
117 void setSequenceConsensusHash(Hashtable[] hconsensus);
121 * @return the alignment annotatino row for the structure consensus
124 AlignmentAnnotation getAlignmentStrucConsensusAnnotation();
127 * set the Rna structure consensus result object for the viewport
129 * @param hStrucConsensus
131 void setRnaStructureConsensusHash(Hashtable[] hStrucConsensus);
134 * set global colourscheme
138 void setGlobalColourScheme(ColourSchemeI rhc);
140 Map<SequenceI, SequenceCollectionI> getHiddenRepSequences();
142 void setHiddenRepSequences(
143 Map<SequenceI, SequenceCollectionI> hiddenRepSequences);
146 * hides or shows dynamic annotation rows based on groups and group and
147 * alignment associated auto-annotation state flags apply the current
148 * group/autoannotation settings to the alignment view. Usually you should
149 * call the AlignmentViewPanel.adjustAnnotationHeight() method afterwards to
150 * ensure the annotation panel bounds are set correctly.
152 * @param applyGlobalSettings
153 * - apply to all autoannotation rows or just the ones associated
154 * with the current visible region
155 * @param preserveNewGroupSettings
156 * - don't apply global settings to groups which don't already have
157 * group associated annotation
159 void updateGroupAnnotationSettings(boolean applyGlobalSettings,
160 boolean preserveNewGroupSettings);
162 void setSequenceColour(SequenceI seq, Color col);
164 Color getSequenceColour(SequenceI seq);
166 void updateSequenceIdColours();
168 SequenceGroup getSelectionGroup();
170 SequenceI[] getSequenceSelection();
172 void clearSequenceColours();
174 CigarArray getViewAsCigars(boolean selectedRegionOnly);
176 AlignmentView getAlignmentView(boolean selectedOnly);
178 AlignmentView getAlignmentView(boolean selectedOnly, boolean markGroups);
180 String[] getViewAsString(boolean selectedRegionOnly);
182 void setSelectionGroup(SequenceGroup sg);
184 char getGapCharacter();