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 FeatureColour()
44 public boolean isColourByLabel()
50 if (SEQUENCE_VARIANT.equals(type))
52 return new FeatureColour(Color.RED);
58 public float getTransparency()
64 * Order sequence_variant above exon above the rest
67 public int compareTo(String feature1, String feature2)
69 if (SEQUENCE_VARIANT.equals(feature1))
73 if (SEQUENCE_VARIANT.equals(feature2))
77 if (EXON.equals(feature1))
81 if (EXON.equals(feature2))
89 public boolean optimiseOrder()
96 // SequenceOntologyI.SEQUENCE_VARIANT
97 private static final String SEQUENCE_VARIANT = "sequence_variant";
99 // SequenceOntologyI.EXON
100 private static final String EXON = "exon";