JAL-2438 FeatureColourFinder refactored from FeatureRenderer, fr not
[jalview.git] / src / jalview / api / FeatureRenderer.java
index 21319fd..b1813a6 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;
 
@@ -46,9 +47,10 @@ public interface FeatureRenderer
    *          - sequence providing features
    * @param r
    *          - column position
+   * @param g
    * @return
    */
-  Color findFeatureColour(Color col, SequenceI sequenceI, int r);
+  Color findFeatureColour(Color col, SequenceI sequenceI, int r, Graphics g);
 
   /**
    * trigger the feature discovery process for a newly created feature renderer.
@@ -132,7 +134,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
@@ -141,25 +144,19 @@ public interface FeatureRenderer
   List<SequenceFeature> findFeaturesAtRes(SequenceI sequence, int res);
 
   /**
+   * get current displayed types, in ordering of rendering (on top last)
    * 
-   * @return true if the rendering platform supports transparency
+   * @return a (possibly empty) list of feature types
    */
-  boolean isTransparencyAvailable();
 
-  /**
-   * get current displayed types
-   * 
-   * @return
-   */
-
-  String[] getDisplayedFeatureTypes();
+  List<String> getDisplayedFeatureTypes();
 
   /**
    * get current displayed groups
    * 
-   * @return
+   * @return a (possibly empty) list of feature groups
    */
-  String[] getDisplayedFeatureGroups();
+  List<String> getDisplayedFeatureGroups();
 
   /**
    * display all features of these types
@@ -175,4 +172,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();
 }