JAL-2099 belated unit test
[jalview.git] / src / jalview / schemes / CollectionColourSchemeI.java
1 package jalview.schemes;
2
3 import jalview.analysis.Conservation;
4 import jalview.datamodel.AnnotatedCollectionI;
5 import jalview.datamodel.ProfilesI;
6 import jalview.datamodel.SequenceCollectionI;
7 import jalview.datamodel.SequenceI;
8
9 import java.awt.Color;
10 import java.util.Map;
11
12 public interface CollectionColourSchemeI
13 {
14
15   public abstract void setConsensus(ProfilesI cons);
16
17   public abstract boolean conservationApplied();
18
19   public abstract void setConservationApplied(boolean conservationApplied);
20
21   public abstract void setConservation(Conservation cons);
22
23   public abstract void alignmentChanged(AnnotatedCollectionI alignment,
24           Map<SequenceI, SequenceCollectionI> hiddenReps);
25
26   /**
27    * Sets the percentage consensus threshold value, and whether gaps are ignored
28    * in percentage identity calculation
29    * 
30    * @param consensusThreshold
31    * @param ignoreGaps
32    */
33   public abstract void setThreshold(int consensusThreshold,
34           boolean ignoreGaps);
35
36   public abstract void setConservationInc(int i);
37
38   public abstract int getConservationInc();
39
40   /**
41    * Get the percentage threshold for this colour scheme
42    * 
43    * @return Returns the percentage threshold
44    */
45   public abstract int getThreshold();
46
47   /**
48    * Returns the possibly context dependent colour for the given symbol at the
49    * aligned position in the given sequence. For example, the colour may depend
50    * on the symbol's relationship to the consensus residue for the column.
51    * 
52    * @param symbol
53    * @param position
54    * @param seq
55    * @return
56    */
57   public abstract Color findColour(char symbol, int position, SequenceI seq);
58
59   public abstract ColourSchemeI getColourScheme();
60
61   public abstract void setColourScheme(ColourSchemeI cs);
62
63 }