X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fapi%2FFeatureColourI.java;h=98a37c4e93698cc7a846aae059506256ae98869d;hb=266d94fa55ce42491be2552bfcf2e2b0a7901c04;hp=3eebf6ce8e6b260bcf2f334f3d40a36a6466b92d;hpb=14307f5cfcbc90c419c892434613a500ca550ecc;p=jalview.git diff --git a/src/jalview/api/FeatureColourI.java b/src/jalview/api/FeatureColourI.java index 3eebf6c..98a37c4 100644 --- a/src/jalview/api/FeatureColourI.java +++ b/src/jalview/api/FeatureColourI.java @@ -72,7 +72,8 @@ public interface FeatureColourI boolean isSimpleColour(); /** - * Answers true if the feature is coloured by label (description) + * Answers true if the feature is coloured by label (description) or by text + * value of an attribute * * @return */ @@ -101,18 +102,6 @@ public interface FeatureColourI void setAboveThreshold(boolean b); /** - * Answers true if the threshold is the minimum value (when - * isAboveThreshold()) or maximum value (when isBelowThreshold()) of the - * colour range; only applicable when isGraduatedColour and either - * isAboveThreshold() or isBelowThreshold() answers true - * - * @return - */ - boolean isThresholdMinMax(); - - void setThresholdMinMax(boolean b); - - /** * Returns the threshold value (if any), else zero * * @return @@ -189,17 +178,38 @@ public interface FeatureColourI boolean isColourByAttribute(); /** - * Answers the name of the attribute used for colouring if any, or null + * Answers the name of the attribute (and optional sub-attribute...) used for + * colouring if any, or null + * + * @return + */ + String[] getAttributeName(); + + /** + * Sets the name of the attribute (and optional sub-attribute...) used for + * colouring if any, or null to remove this property + * + * @return + */ + void setAttributeName(String... name); + + /** + * Answers true if colour has a threshold set, and the feature score (or other + * attribute selected for colouring) is outwith the threshold. + *
+ * Answers false if not a graduated colour, or no threshold is set, or value + * is not outwith the threshold, or value is null or non-numeric. * + * @param sf * @return */ - String getAttributeName(); + boolean isOutwithThreshold(SequenceFeature sf); /** - * Sets the name of the attribute used for colouring if any, or null to remove - * this property + * Answers a human-readable text description of the colour, suitable for display + * as a tooltip, possibly internationalised for the user's locale. * * @return */ - void setAttributeName(String name); + String getDescription(); }