JAL-3148 further bug fix to state of 'colourBy'
[jalview.git] / src / jalview / api / FeatureRenderer.java
index ef0abbd..dc9b9b9 100644 (file)
@@ -22,7 +22,7 @@ package jalview.api;
 
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
-import jalview.util.matcher.KeyedMatcherSetI;
+import jalview.datamodel.features.FeatureMatcherSetI;
 
 import java.awt.Color;
 import java.awt.Graphics;
@@ -43,6 +43,11 @@ public interface FeatureRenderer
    * taking into account sequence feature locations, feature colour schemes,
    * render ordering, feature and feature group visibility, and transparency.
    * <p>
+   * Does not take into account global feature visibility (show features on or
+   * off). Test for this before calling this method if necessary. This allows,
+   * for example, feature colours to be computed for structures even if not 
+   * shown on the alignment.
+   * <p>
    * The graphics argument should be provided if transparency is applied
    * (getTransparency() < 1). With feature transparency, visible features are
    * written to the graphics context and the composite colour may be read off
@@ -223,14 +228,14 @@ public interface FeatureRenderer
    * @param featureType
    * @return
    */
-  KeyedMatcherSetI getFeatureFilter(String featureType);
+  FeatureMatcherSetI getFeatureFilter(String featureType);
 
   /**
-   * Answers a shallow copy of the feature filters map
+   * Answers the feature filters map
    * 
    * @return
    */
-  public Map<String, KeyedMatcherSetI> getFeatureFilters();
+  public Map<String, FeatureMatcherSetI> getFeatureFilters();
 
   /**
    * Sets the filters for the feature type, or removes them if a null or empty
@@ -239,14 +244,14 @@ public interface FeatureRenderer
    * @param featureType
    * @param filter
    */
-  void setFeatureFilter(String featureType, KeyedMatcherSetI filter);
+  void setFeatureFilter(String featureType, FeatureMatcherSetI filter);
 
   /**
    * Replaces all feature filters with the given map
    * 
    * @param filters
    */
-  void setFeatureFilters(Map<String, KeyedMatcherSetI> filters);
+  void setFeatureFilters(Map<String, FeatureMatcherSetI> filters);
 
   /**
    * Returns the colour for a particular feature instance. This includes