JAL-2599 HMMs can now be dropped onto the desktop
[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 void setInformation(ProfilesI info);
19
20   public abstract boolean conservationApplied();
21
22   public abstract void setConservationApplied(boolean conservationApplied);
23
24   public abstract void setConservation(Conservation cons);
25
26   public abstract void alignmentChanged(AnnotatedCollectionI alignment,
27           Map<SequenceI, SequenceCollectionI> hiddenReps);
28
29   /**
30    * Sets the percentage consensus threshold value, and whether gaps are ignored
31    * in percentage identity calculation
32    * 
33    * @param consensusThreshold
34    * @param ignoreGaps
35    */
36   public abstract void setThreshold(int consensusThreshold,
37           boolean ignoreGaps);
38
39   public abstract void setConservationInc(int i);
40
41   public abstract int getConservationInc();
42
43   /**
44    * Get the percentage threshold for this colour scheme
45    * 
46    * @return Returns the percentage threshold
47    */
48   public abstract int getThreshold();
49
50   /**
51    * Returns the possibly context dependent colour for the given symbol at the
52    * aligned position in the given sequence. For example, the colour may depend
53    * on the symbol's relationship to the consensus residue for the column.
54    * 
55    * @param symbol
56    * @param position
57    * @param seq
58    * @return
59    */
60   public abstract Color findColour(char symbol, int position, SequenceI seq);
61
62   public abstract ColourSchemeI getColourScheme();
63
64   public abstract void setColourScheme(ColourSchemeI cs);
65
66 }