JAL-2016 first draft of pre-set feature colour scheme
[jalview.git] / src / jalview / api / FeatureColourI.java
diff --git a/src/jalview/api/FeatureColourI.java b/src/jalview/api/FeatureColourI.java
new file mode 100644 (file)
index 0000000..d8363f4
--- /dev/null
@@ -0,0 +1,82 @@
+package jalview.api;
+
+import java.awt.Color;
+
+public interface FeatureColourI
+{
+
+  /**
+   * Answers true when either isColourByLabel, isAboveThreshold or
+   * isBelowThreshold answers true
+   * 
+   * @return
+   */
+  boolean isGraduatedColour();
+
+  /**
+   * Returns the feature colour (when isGraduatedColour answers false)
+   * 
+   * @return
+   */
+  Color getColour();
+
+  /**
+   * Returns the minimum colour (when isGraduatedColour answers true)
+   * 
+   * @return
+   */
+  Color getMinColour();
+
+  /**
+   * Returns the maximum colour (when isGraduatedColour answers true)
+   * 
+   * @return
+   */
+  Color getMaxColour();
+
+  /**
+   * Answers true if the feature is coloured by label (description); only
+   * applicable when isGraduatedColour answers true
+   * 
+   * @return
+   */
+  boolean isColourByLabel();
+
+  /**
+   * Answers true if the feature is coloured below a threshold value; only
+   * applicable when isGraduatedColour answers true
+   * 
+   * @return
+   */
+  boolean isBelowThreshold();
+
+  /**
+   * Answers true if the feature is coloured above a threshold value; only
+   * applicable when isGraduatedColour answers true
+   * 
+   * @return
+   */
+  boolean isAboveThreshold();
+
+  /**
+   * Answers true if the threshold is the min (or max) of the colour range; only
+   * applicable when isGraduatedColour answers true
+   * 
+   * @return
+   */
+  boolean isThresholdMinMax();
+
+  /**
+   * Returns the threshold value (if any), else zero
+   * 
+   * @return
+   */
+  float getThreshold();
+
+  /**
+   * Answers true if ?
+   * 
+   * @return
+   */
+  boolean isLowToHigh();
+}