1 package jalview.schemes;
3 import jalview.api.FeatureColourI;
4 import jalview.api.FeatureSettingsI;
9 * Pre-set configurations for feature settings
14 public enum FeatureColourScheme implements FeatureSettingsI
17 * Show sequence variants in red, on top of exons coloured by label
23 public boolean isFeatureDisplayed(String type)
25 // TODO accept SO sub-types of these features
26 // if (SequenceOntologyFactory.getInstance().isA(SequenceOntologyI.EXON...
27 return (EXON.equals(type) || SEQUENCE_VARIANT.equals(type));
31 public boolean isGroupDisplayed(String group)
37 public FeatureColourI getFeatureColour(String type)
39 if (EXON.equals(type))
41 return new FeatureColourAdapter()
44 public boolean isColourByLabel()
50 if (SEQUENCE_VARIANT.equals(type))
52 return new FeatureColourAdapter()
56 public Color getColour()
66 public float getTransparency()
72 * order to render sequence_variant after exon after the rest
75 public int compare(String feature1, String feature2)
77 if (SEQUENCE_VARIANT.equals(feature1))
81 if (SEQUENCE_VARIANT.equals(feature2))
85 if (EXON.equals(feature1))
89 if (EXON.equals(feature2))
97 public boolean optimiseOrder()
104 // SequenceOntologyI.SEQUENCE_VARIANT
105 private static final String SEQUENCE_VARIANT = "sequence_variant";
107 // SequenceOntologyI.EXON
108 private static final String EXON = "exon";