Merge branch 'develop' into features/JAL-2360colourSchemeApplicability
[jalview.git] / src / jalview / schemes / ColourSchemeI.java
index f2e888e..64248c5 100755 (executable)
@@ -32,14 +32,6 @@ import java.util.Map;
 public interface ColourSchemeI
 {
   /**
-   * Returns the fixed colour for the colour scheme. For use when the colour
-   * does not vary.
-   * 
-   * @return
-   */
-  Color findColour();
-
-  /**
    * Returns the colour for the given character. For use when the colour depends
    * only on the symbol.
    * 
@@ -130,13 +122,15 @@ public interface ColourSchemeI
 
   /**
    * Creates and returns a new instance of the colourscheme configured to colour
-   * the given connection
+   * the given collection. Note that even simple colour schemes should return a
+   * new instance for each call to this method, as different instances may have
+   * differing shading by consensus or percentage identity applied.
    * 
    * @param sg
    * @param hiddenRepSequences
-   * @return copy of current scheme with any inherited settings transfered
+   * @return copy of current scheme with any inherited settings transferred
    */
-  ColourSchemeI applyTo(AnnotatedCollectionI sg,
+  ColourSchemeI getInstance(AnnotatedCollectionI sg,
           Map<SequenceI, SequenceCollectionI> hiddenRepSequences);
 
   /**
@@ -157,4 +151,15 @@ public interface ColourSchemeI
    * @return
    */
   String getSchemeName();
+
+  /**
+   * Answers true if the colour scheme depends only on the sequence symbol, and
+   * not on other information such as alignment consensus or annotation. (Note
+   * that simple colour schemes may have a fading by percentage identity or
+   * conservation overlaid.) Simple colour schemes can be propagated to
+   * structure viewers.
+   * 
+   * @return
+   */
+  boolean isSimple();
 }