JAL-2016 first draft of pre-set feature colour scheme
[jalview.git] / src / jalview / api / FeatureSettingsI.java
1 package jalview.api;
2
3 /**
4  * An interface that describes the settings configurable in the Feature Settings
5  * dialog.
6  * 
7  * @author gmcarstairs
8  *
9  */
10 public interface FeatureSettingsI
11 {
12   // note Java 8 will allow default implementations of these methods in the
13   // interface, simplifying instantiating classes
14
15   /**
16    * Answers true if the specified feature type is displayed
17    * 
18    * @param type
19    * @return
20    */
21   boolean isFeatureDisplayed(String type);
22
23   /**
24    * Answers true if the specified feature group is displayed
25    * 
26    * @param group
27    * @return
28    */
29   boolean isGroupDisplayed(String group);
30
31   /**
32    * Returns the colour (or graduated colour) for the feature type, or null if
33    * not known
34    * 
35    * @param type
36    * @return
37    */
38   FeatureColourI getFeatureColour(String type);
39
40   /**
41    * Returns the transparency value, from 0 (fully transparent) to 1 (fully
42    * opaque)
43    * 
44    * @return
45    */
46   float getTransparency();
47
48   /**
49    * Returns -1 if feature1 'precedes' (is displayed on top of) feature 2, +1 if
50    * feature2 is on top of feature1, or 0 if we don't care
51    * 
52    * @param feature1
53    * @param feature2
54    * @return
55    */
56   int compareTo(String feature1, String feature2);
57
58   /**
59    * Answers true if features should be initially sorted so that features with a
60    * shorter average length are displayed on top of those with a longer average
61    * length
62    * 
63    * @return
64    */
65   boolean optimiseOrder();
66 }