JAL-2438 corrected handling of default colour
[jalview.git] / src / jalview / api / FeatureRenderer.java
index dbc9880..3565488 100644 (file)
@@ -24,6 +24,7 @@ import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
 
 import java.awt.Color;
+import java.awt.Graphics;
 import java.util.List;
 import java.util.Map;
 
@@ -40,15 +41,14 @@ public interface FeatureRenderer
    * compute the perceived colour for a given column position in sequenceI,
    * taking transparency and feature visibility into account.
    * 
-   * @param col
-   *          - background colour (due to alignment/group shading schemes, etc).
    * @param sequenceI
    *          - sequence providing features
    * @param r
    *          - column position
+   * @param g
    * @return
    */
-  Color findFeatureColour(Color col, SequenceI sequenceI, int r);
+  Color findFeatureColour(SequenceI sequenceI, int r, Graphics g);
 
   /**
    * trigger the feature discovery process for a newly created feature renderer.
@@ -132,7 +132,8 @@ public interface FeatureRenderer
   void setGroupVisibility(String group, boolean visible);
 
   /**
-   * locate features at a particular position on the given sequence
+   * Returns features at the specified position on the given sequence.
+   * Non-positional features are not included.
    * 
    * @param sequence
    * @param res
@@ -169,4 +170,19 @@ public interface FeatureRenderer
    */
   void setVisible(String featureType);
 
+  /**
+   * Sets the transparency value, between 0 (full transparency) and 1 (no
+   * transparency)
+   * 
+   * @param value
+   */
+  void setTransparency(float value);
+
+  /**
+   * Returns the transparency value, between 0 (full transparency) and 1 (no
+   * transparency)
+   * 
+   * @return
+   */
+  float getTransparency();
 }