JAL-1114 - refactor methods handling Vectors and Hashtables to Lists and Maps, and...
[jalview.git] / src / jalview / api / AlignViewportI.java
1 /**
2  * 
3  */
4 package jalview.api;
5
6 import java.util.Hashtable;
7 import java.util.Map;
8
9 import jalview.datamodel.AlignmentAnnotation;
10 import jalview.datamodel.AlignmentI;
11 import jalview.datamodel.AnnotatedCollectionI;
12 import jalview.datamodel.ColumnSelection;
13 import jalview.datamodel.SequenceCollectionI;
14 import jalview.datamodel.SequenceI;
15 import jalview.schemes.ColourSchemeI;
16 import jalview.schemes.RNAHelicesColour;
17
18 /**
19  * @author jimp
20  *
21  */
22 public interface AlignViewportI
23 {
24
25   int getCharWidth();
26
27   int getEndRes();
28
29   int getCharHeight();
30
31   boolean hasHiddenColumns();
32
33   boolean isValidCharWidth();
34
35   boolean isShowConsensusHistogram();
36
37   boolean isShowSequenceLogo();
38
39   boolean isNormaliseSequenceLogo();
40
41   ColourSchemeI getGlobalColourScheme();
42
43   AlignmentI getAlignment();
44
45   ColumnSelection getColumnSelection();
46
47   Hashtable[] getSequenceConsensusHash();
48
49   Hashtable[] getRnaStructureConsensusHash();
50
51   boolean getIgnoreGapsConsensus();
52
53   boolean getCentreColumnLabels();
54
55   boolean isCalculationInProgress(AlignmentAnnotation alignmentAnnotation);
56
57   AlignmentAnnotation getAlignmentQualityAnnot();
58
59   AlignmentAnnotation getAlignmentConservationAnnotation();
60   /**
61    * get the container for alignment consensus annotation
62    * @return
63    */
64   AlignmentAnnotation getAlignmentConsensusAnnotation();
65
66   /**
67    * Test to see if viewport is still open and active
68    * @return true indicates that all references to viewport should be dropped 
69    */
70   boolean isClosed();
71   /**
72    * get the associated calculation thread manager for the view
73    * @return
74    */
75   AlignCalcManagerI getCalcManager();
76   
77   /**
78    * get the percentage gaps allowed in a conservation calculation
79    * 
80    */
81   public int getConsPercGaps();
82
83   /**
84    * set the consensus result object for the viewport
85    * @param hconsensus
86    */
87   void setSequenceConsensusHash(Hashtable[] hconsensus);
88
89   /**
90    * 
91    * @return the alignment annotatino row for the structure consensus calculation
92    */
93   AlignmentAnnotation getAlignmentStrucConsensusAnnotation();
94
95   /**
96    * set the Rna structure consensus result object for the viewport
97    * @param hStrucConsensus 
98    */
99   void setRnaStructureConsensusHash(Hashtable[] hStrucConsensus);
100
101   /**
102    * set global colourscheme
103    * @param rhc
104    */
105   void setGlobalColourScheme(ColourSchemeI rhc);
106
107   Map<SequenceI, SequenceCollectionI> getHiddenRepSequences();
108
109   void setHiddenRepSequences(
110           Map<SequenceI, SequenceCollectionI> hiddenRepSequences);
111
112 }