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