From: gmungoc Date: Mon, 19 Sep 2016 16:56:18 +0000 (+0100) Subject: Merge branch 'develop' into features/JAL-2094_colourInterface X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f2b03e9fecf41886ebf5f747fd4be02edf042bee;p=jalview.git Merge branch 'develop' into features/JAL-2094_colourInterface Conflicts: src/jalview/api/FeatureColourI.java src/jalview/api/FeatureRenderer.java src/jalview/appletgui/FeatureColourChooser.java src/jalview/appletgui/FeatureRenderer.java src/jalview/appletgui/FeatureSettings.java src/jalview/appletgui/SeqCanvas.java src/jalview/appletgui/SequenceRenderer.java src/jalview/appletgui/UserDefinedColours.java src/jalview/ext/ensembl/EnsemblGene.java src/jalview/gui/FeatureColourChooser.java src/jalview/gui/FeatureRenderer.java src/jalview/gui/FeatureSettings.java src/jalview/gui/Jalview2XML.java src/jalview/gui/SeqCanvas.java src/jalview/gui/TreeCanvas.java src/jalview/io/FeaturesFile.java src/jalview/io/PDBFeatureSettings.java src/jalview/renderer/seqfeatures/FeatureRenderer.java src/jalview/schemes/FeatureColour.java src/jalview/schemes/FeatureColourAdapter.java src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java src/jalview/viewmodel/seqfeatures/FeatureRendererSettings.java src/jalview/ws/jws1/SeqSearchWSThread.java src/jalview/ws/jws2/AADisorderClient.java test/jalview/io/FeaturesFileTest.java test/jalview/schemes/FeatureColourTest.java --- f2b03e9fecf41886ebf5f747fd4be02edf042bee diff --cc examples/exampleFeatures.txt index b7038f5,c0098a9..7c8d26c --- a/examples/exampleFeatures.txt +++ b/examples/exampleFeatures.txt @@@ -22,12 -22,11 +22,13 @@@ NEST-RL 3e16b ASX-TURN-IIL a67c98 BETA-TURN-IIR c79792 PHOSPHORYLATION (T) c88395 -BETA-TURN-IIL 8b5b50 -ST-MOTIF ac25a1 +BETA-TURN-IIL label +#8b5b50 +ST-MOTIF label|||0|0 +#ac25a1 STARTGROUP uniprot + Pfam family FER_CAPAA -1 0 0 Pfam Iron-sulfur (2Fe-2S) FER_CAPAA -1 39 39 METAL Iron-sulfur (2Fe-2S) FER_CAPAA -1 44 44 METAL Iron-sulfur (2Fe-2S) FER_CAPAA -1 47 47 METAL diff --cc src/MCview/PDBChain.java index e048cd6,cf794b6..67ff286 --- a/src/MCview/PDBChain.java +++ b/src/MCview/PDBChain.java @@@ -28,11 -27,10 +28,11 @@@ import jalview.datamodel.Mapping import jalview.datamodel.Sequence; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; +import jalview.schemes.Colour; import jalview.schemes.ColourSchemeI; import jalview.schemes.ResidueProperties; + import jalview.structure.StructureImportSettings; import jalview.structure.StructureMapping; - import jalview.structure.StructureViewSettings; import java.awt.Color; import java.util.List; diff --cc src/jalview/api/FeatureColourI.java index f68d7a7,1fcbfd0..922a038 --- a/src/jalview/api/FeatureColourI.java +++ b/src/jalview/api/FeatureColourI.java @@@ -32,11 -33,18 +31,18 @@@ public interface FeatureColour * * @return */ - Color getMaxColour(); + ColorI getMaxColour(); /** - * Answers true if the feature is coloured by label (description); only - * applicable when isGraduatedColour answers true + * Answers true if the feature has a single colour, i.e. if isColourByLabel() + * and isGraduatedColour() both answer false + * + * @return + */ + boolean isSimpleColour(); + + /** + * Answers true if the feature is coloured by label (description) * * @return */ @@@ -73,71 -91,71 +89,71 @@@ */ float getThreshold(); - float getMax(); - - /** - * Returns the minimum score of the graduated colour range - * - * @return - */ - float getMin(); + void setThreshold(float f); /** + * Answers true if either isAboveThreshold or isBelowThreshold answers true + * + * @return + */ + boolean hasThreshold(); + + /** - * Returns the computed colour for the given sequence feature + * Answers true if the colour varies between the actual minimum and maximum + * score values of the feature, or false if between absolute minimum and + * maximum values (or if not a graduated colour). * - * @param feature * @return */ - ColorI getColor(SequenceFeature feature); + boolean isAutoScaled(); + + void setAutoScaled(boolean b); /** - * Returns the maximum score of the graduated colour range + * Answers true if the feature has a simple colour, or is coloured by label, + * or has a graduated colour and the score of this feature instance is within + * the range to render (if any), i.e. does not lie below or above any + * threshold set. * + * @param feature * @return */ - float getMax(); + boolean isColored(SequenceFeature feature); /** - * Returns the minimum score of the graduated colour range + * Update the min-max range for a graduated colour scheme * - * @return + * @param min + * @param max */ - float getMin(); + void updateBounds(float min, float max); /** - * Answers true if either isAboveThreshold or isBelowThreshold answers true + * Returns the colour in Jalview features file format * * @return */ - boolean hasThreshold(); + String toJalviewFormat(String featureType); - void setThreshold(float f); - - boolean isAutoScaled(); - - void setAutoScaled(boolean b); - - boolean isSimpleColour(); - - void setAboveThreshold(boolean b); - - void setThresholdMinMax(boolean b); - - void setBelowThreshold(boolean b); + /** - * Returns the computed colour for the given sequence feature ++ * Returns the maximum score of the graduated colour range + * - * @param feature + * @return + */ - Color getColor(SequenceFeature feature); ++ float getMax(); - void setColourByLabel(boolean b); + /** - * Answers true if the feature has a simple colour, or is coloured by label, - * or has a graduated colour and the score of this feature instance is within - * the range to render (if any), i.e. does not lie below or above any - * threshold set. ++ * Returns the minimum score of the graduated colour range + * - * @param feature + * @return + */ - boolean isColored(SequenceFeature feature); - - /** - * Update the min-max range for a graduated colour scheme - * - * @param min - * @param max - */ - void updateBounds(float min, float max); ++ float getMin(); - void setGraduatedColour(boolean b); + /** - * Returns the colour in Jalview features file format ++ * Returns the computed colour for the given sequence feature + * ++ * @param feature + * @return + */ - String toJalviewFormat(String featureType); ++ ColorI getColor(SequenceFeature feature); } diff --cc src/jalview/appletgui/FeatureRenderer.java index b979674,82736d7..cd9495e --- a/src/jalview/appletgui/FeatureRenderer.java +++ b/src/jalview/appletgui/FeatureRenderer.java @@@ -60,18 -58,22 +60,10 @@@ import java.util.Hashtable public class FeatureRenderer extends jalview.renderer.seqfeatures.FeatureRenderer { - /** - * Creates a new FeatureRenderer object. - * - * @param av - * DOCUMENT ME! - */ - public FeatureRenderer(AlignmentViewport av) - { - super(); - this.av = av; - } - + // Holds web links for feature groups and feature types + // in the form label|link + Hashtable featureLinks = null; - /** - * Creates a new FeatureRenderer object. - * - * @param av - */ - public FeatureRenderer(AlignmentViewport av) - { - super(av); - - } - static String lastFeatureAdded; static String lastFeatureGroupAdded; @@@ -84,6 -86,6 +76,16 @@@ FeatureColourPanel colourPanel; ++ /** ++ * Creates a new FeatureRenderer object. ++ * ++ * @param av ++ */ ++ public FeatureRenderer(AlignmentViewport av) ++ { ++ super(av); ++ } ++ class FeatureColourPanel extends Panel { String label = ""; diff --cc src/jalview/appletgui/FeatureSettings.java index e765f31,9733c86..79812ae --- a/src/jalview/appletgui/FeatureSettings.java +++ b/src/jalview/appletgui/FeatureSettings.java @@@ -765,28 -763,31 +765,29 @@@ public class FeatureSettings extends Pa public void paint(Graphics g) { Dimension d = getSize(); - if (col.isColourByLabel()) + if (col != null) { - g.setColor(Color.white); - g.fillRect(d.width / 2, 0, d.width / 2, d.height); - /* - * g.setColor(Color.black); Font f=g.getFont().deriveFont(9); - * g.setFont(f); - * - * // g.setFont(g.getFont().deriveFont( // - * AffineTransform.getScaleInstance( // - * width/g.getFontMetrics().stringWidth("Label"), // - * height/g.getFontMetrics().getHeight()))); g.drawString("Label", - * width/2, 0); - */ - - } - else if (col.isGraduatedColour()) - { - Color maxCol = ColorUtils.getColor(col.getMaxColour()); - g.setColor(maxCol); - g.fillRect(d.width / 2, 0, d.width / 2, d.height); - + if (col.isColourByLabel()) + { + g.setColor(Color.white); + g.fillRect(d.width / 2, 0, d.width / 2, d.height); + /* + * g.setColor(Color.black); Font f=g.getFont().deriveFont(9); + * g.setFont(f); + * + * // g.setFont(g.getFont().deriveFont( // + * AffineTransform.getScaleInstance( // + * width/g.getFontMetrics().stringWidth("Label"), // + * height/g.getFontMetrics().getHeight()))); g.drawString("Label", + * width/2, 0); + */ - + } + else if (col.isGraduatedColour()) + { - Color maxCol = col.getMaxColour(); ++ Color maxCol = ColorUtils.getColor(col.getMaxColour()); + g.setColor(maxCol); + g.fillRect(d.width / 2, 0, d.width / 2, d.height); - + } } if (hasLink) diff --cc src/jalview/appletgui/SeqCanvas.java index 0e5c0e7,22849f1..b3f5ac8 --- a/src/jalview/appletgui/SeqCanvas.java +++ b/src/jalview/appletgui/SeqCanvas.java @@@ -24,7 -24,8 +24,9 @@@ import jalview.datamodel.AlignmentI import jalview.datamodel.SearchResults; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; + import jalview.renderer.ScaleRenderer; + import jalview.renderer.ScaleRenderer.ScaleMark; +import jalview.util.ColorUtils; import jalview.viewmodel.AlignmentViewport; import java.awt.Color; diff --cc src/jalview/gui/FeatureColourChooser.java index ac22aca,5594e1a..4c4c69a --- a/src/jalview/gui/FeatureColourChooser.java +++ b/src/jalview/gui/FeatureColourChooser.java @@@ -417,10 -411,9 +417,9 @@@ public class FeatureColourChooser exten } else { - acg = new FeatureColour(oldminColour = minColour.getBackground(), - oldmaxColour = maxColour.getBackground(), min, max); - + acg = new FeatureColour(new Colour( + oldminColour = minColour.getBackground()), new Colour( + oldmaxColour = maxColour.getBackground()), min, max); - } if (!hasThreshold) diff --cc src/jalview/gui/FeatureRenderer.java index 0284105,426ea32..3c4d733 --- a/src/jalview/gui/FeatureRenderer.java +++ b/src/jalview/gui/FeatureRenderer.java @@@ -423,8 -422,8 +424,12 @@@ public class FeatureRenderer extend * update the amend feature button dependent on the given style * * @param bigPanel + * @param colour * @param col ++<<<<<<< HEAD ++======= + * @param col ++>>>>>>> refs/heads/develop */ protected void updateColourButton(JPanel bigPanel, JLabel colour, FeatureColourI col) diff --cc src/jalview/gui/FeatureSettings.java index 187d3d0,874ce16..62aba6d --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@@ -1523,10 -1532,8 +1536,8 @@@ public class FeatureSettings extends JP { this.setText(""); this.setIcon(null); - newColor = cellColour.getColour(); + newColor = ColorUtils.getColor(cellColour.getColour()); setBackground(newColor); - // comp.setToolTipText("RGB value: " + newColor.getRed() + ", " - // + newColor.getGreen() + ", " + newColor.getBlue()); } if (isSelected) { diff --cc src/jalview/gui/Jalview2XML.java index ef5802e,7093a9a..e490c4e --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@@ -4123,9 -4341,15 +4342,15 @@@ public class Jalview2XM for (int i = 0; i < JSEQ.length; i++) { af.viewport.setSequenceColour(af.viewport.getAlignment() - .getSequenceAt(i), new java.awt.Color(JSEQ[i].getColour())); + .getSequenceAt(i), new Colour(JSEQ[i].getColour())); } + if (al.hasSeqrep()) + { + af.getViewport().setColourByReferenceSeq(true); + af.getViewport().setDisplayReferenceSeq(true); + } + af.viewport.setGatherViewsHere(view.getGatheredViews()); if (view.getSequenceSetId() != null) diff --cc src/jalview/gui/SeqCanvas.java index 8a120c5,760ece0..1355b9b --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@@ -24,7 -24,8 +24,9 @@@ import jalview.datamodel.AlignmentI import jalview.datamodel.SearchResults; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; + import jalview.renderer.ScaleRenderer; + import jalview.renderer.ScaleRenderer.ScaleMark; +import jalview.util.ColorUtils; import java.awt.BasicStroke; import java.awt.BorderLayout; diff --cc src/jalview/gui/SequenceRenderer.java index f215f9d,64fe053..3003c01 --- a/src/jalview/gui/SequenceRenderer.java +++ b/src/jalview/gui/SequenceRenderer.java @@@ -92,8 -83,9 +86,9 @@@ public class SequenceRenderer implement } @Override - public Color getResidueBoxColour(SequenceI seq, int i) + public ColorI getResidueBoxColour(SequenceI seq, int i) { + // rate limiting step when rendering overview for lots of groups allGroups = av.getAlignment().findAllGroups(seq); if (inCurrentSequenceGroup(i)) diff --cc src/jalview/gui/TreeCanvas.java index 149a587,6bfea9e..874513e --- a/src/jalview/gui/TreeCanvas.java +++ b/src/jalview/gui/TreeCanvas.java @@@ -996,18 -1035,14 +1038,15 @@@ public class TreeCanvas extends JPanel .getCodingComplement(); if (codingComplement != null) { - if (codingComplement != null) + SequenceGroup mappedGroup = MappingUtils.mapSequenceGroup(sg, av, + codingComplement); + if (mappedGroup.getSequences().size() > 0) { - SequenceGroup mappedGroup = MappingUtils.mapSequenceGroup(sg, - av, codingComplement); - if (mappedGroup.getSequences().size() > 0) + codingComplement.getAlignment().addGroup(mappedGroup); + for (SequenceI seq : mappedGroup.getSequences()) { - codingComplement.getAlignment().addGroup(mappedGroup); - for (SequenceI seq : mappedGroup.getSequences()) - { - codingComplement.setSequenceColour(seq, - new Colour(col.brighter())); - } - codingComplement.setSequenceColour(seq, col.brighter()); ++ codingComplement.setSequenceColour(seq, ++ new Colour(col.brighter())); } } } diff --cc src/jalview/io/FeaturesFile.java index 40f83d3,aa38540..46467c5 --- a/src/jalview/io/FeaturesFile.java +++ b/src/jalview/io/FeaturesFile.java @@@ -743,51 -525,15 +748,15 @@@ public class FeaturesFile extends Align // write feature colours only if we're given them and we are generating // viewed features // TODO: decide if feature links should also be written here ? - Iterator en = visible.keySet().iterator(); + Iterator en = featureColours.keySet().iterator(); - String featureType, color; while (en.hasNext()) { - featureType = en.next(); - FeatureColourI fc = featureColours.get(featureType); - if (fc.isSimpleColour()) - { - color = Format.getHexString(fc.getColour()); - } - else - { - color = (fc.isColourByLabel() ? "label|" : "") - + Format.getHexString(fc.getMinColour()) + "|" - + Format.getHexString(fc.getMaxColour()) - + (fc.isAutoScaled() ? "|" : "|abso|") + fc.getMin() + "|" - + fc.getMax() + "|"; - if (fc.isBelowThreshold()) - { - color += "below"; - } - else if (fc.isAboveThreshold()) - { - color += "above"; - } - // add the value - color += "|" + fc.getThreshold(); - } - // else - // { - // color += "none"; - // } - // else - // { - // // legacy support for integer objects containing colour triplet - // values - // color = Format.getHexString(new Color(Integer - // .parseInt(fc.toString()))); - // } - out.append(featureType); - out.append(TAB); - out.append(color); - out.append(newline); - String featureType = en.next().toString(); - FeatureColourI colour = visible.get(featureType); ++ String featureType = en.next(); ++ FeatureColourI colour = featureColours.get(featureType); + out.append(colour.toJalviewFormat(featureType)).append(newline); } } + // Work out which groups are both present and visible List groups = new ArrayList(); int groupIndex = 0; @@@ -839,12 -585,12 +808,12 @@@ features = sequences[i].getSequenceFeatures(); if (features != null) { - for (int j = 0; j < features.length; j++) + for (SequenceFeature sequenceFeature : features) { - isnonpos = features[j].begin == 0 && features[j].end == 0; + isnonpos = sequenceFeature.begin == 0 && sequenceFeature.end == 0; if ((!nonpos && isnonpos) - || (!isnonpos && visOnly && !visible + || (!isnonpos && visOnly && !featureColours - .containsKey(features[j].type))) + .containsKey(sequenceFeature.type))) { // skip if feature is nonpos and we ignore them or if we only // output visible and it isn't non-pos and it's not visible diff --cc src/jalview/io/PDBFeatureSettings.java index 0c2f030,ecce1a3..19dc9ee --- a/src/jalview/io/PDBFeatureSettings.java +++ b/src/jalview/io/PDBFeatureSettings.java @@@ -1,11 -1,11 +1,11 @@@ package jalview.io; +import jalview.api.ColorI; import jalview.api.FeatureColourI; +import jalview.schemes.Colour; - import jalview.schemes.FeatureColourAdapter; + import jalview.schemes.FeatureColour; import jalview.schemes.FeatureSettingsAdapter; -import java.awt.Color; - public class PDBFeatureSettings extends FeatureSettingsAdapter { diff --cc src/jalview/renderer/seqfeatures/FeatureRenderer.java index e6e3071,b007365..e5f0b57 --- a/src/jalview/renderer/seqfeatures/FeatureRenderer.java +++ b/src/jalview/renderer/seqfeatures/FeatureRenderer.java @@@ -20,10 -20,9 +20,11 @@@ */ package jalview.renderer.seqfeatures; + import jalview.api.AlignViewportI; +import jalview.api.ColorI; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; +import jalview.schemes.Colour; import jalview.viewmodel.seqfeatures.FeatureRendererModel; import java.awt.AlphaComposite; diff --cc src/jalview/schemes/FeatureColour.java index 37c85d4,bdc70c9..d0babf4 --- a/src/jalview/schemes/FeatureColour.java +++ b/src/jalview/schemes/FeatureColour.java @@@ -112,10 -111,10 +112,10 @@@ public class FeatureColour implements F } /* - * autoScaled == true: colours range over actual score range; autoScaled == - * false ('abso'): colours range over min/max range - * autoScaled == true: colours range over actual score range ++ * autoScaled == true: colours range over actual score range; + * autoScaled == false ('abso'): colours range over min/max range */ - boolean autoScaled = false; + boolean autoScaled = true; String tok = null, minval, maxval; if (mincol != null) { @@@ -365,22 -356,21 +365,8 @@@ return graduatedColour; } -- /** -- * Sets the 'graduated colour' flag. If true, also sets 'colour by label' to -- * false. -- */ - @Override - public void setGraduatedColour(boolean b) - { - graduatedColour = b; - if (b) - { - setColourByLabel(false); - } - } - - void setGraduatedColour(boolean b) - { - graduatedColour = b; - if (b) - { - setColourByLabel(false); - } - } - @Override - public Color getColour() + public ColorI getColour() { return colour; } @@@ -416,6 -406,6 +402,20 @@@ setGraduatedColour(false); } } ++ ++ /** ++ * Sets the 'graduated colour' flag. If true, also sets 'colour by label' to ++ * false. ++ */ ++ void setGraduatedColour(boolean b) ++ { ++ graduatedColour = b; ++ if (b) ++ { ++ setColourByLabel(false); ++ } ++ } ++ @Override public boolean isBelowThreshold() { diff --cc src/jalview/schemes/FeatureColourAdapter.java index cc03dd3,0000000..869a8ca mode 100644,000000..100644 --- a/src/jalview/schemes/FeatureColourAdapter.java +++ b/src/jalview/schemes/FeatureColourAdapter.java @@@ -1,155 -1,0 +1,150 @@@ +package jalview.schemes; + +import jalview.api.ColorI; +import jalview.api.FeatureColourI; +import jalview.datamodel.SequenceFeature; + +/** + * A convenience class with implementations of FeatureColourI methods. Override + * methods as required in subclasses. + */ +public class FeatureColourAdapter implements FeatureColourI +{ + @Override + public boolean isGraduatedColour() + { + return isColourByLabel() || isAboveThreshold() || isBelowThreshold(); + } + + @Override + public ColorI getColour() + { + return Colour.black; + } + + @Override + public ColorI getMinColour() + { + return Colour.white; + } + + @Override + public ColorI getMaxColour() + { + return Colour.black; + } + + @Override + public boolean isColourByLabel() + { + return false; + } + + @Override + public boolean isBelowThreshold() + { + return false; + } + + @Override + public boolean isAboveThreshold() + { + return false; + } + + @Override + public boolean isThresholdMinMax() + { + return false; + } + + @Override + public float getThreshold() + { + return 0f; + } + + @Override + public float getMax() + { + return 0; + } + + @Override + public float getMin() + { + return 0; + } + + @Override + public boolean hasThreshold() + { + return false; + } + + @Override + public ColorI getColor(SequenceFeature feature) + { + return null; + } + + @Override + public boolean isColored(SequenceFeature feature) + { + return false; + } + + @Override + public void updateBounds(float min, float max) + { + } + + @Override + public String toJalviewFormat(String featureType) + { + return null; + } + + @Override + public void setThreshold(float f) + { + } + + @Override + public boolean isAutoScaled() + { + return false; + } + + @Override + public void setAutoScaled(boolean b) + { + } + + @Override + public boolean isSimpleColour() + { + return false; + } + + @Override + public void setAboveThreshold(boolean b) + { + } + + @Override + public void setThresholdMinMax(boolean b) + { + } + + @Override + public void setBelowThreshold(boolean b) + { + } + + @Override + public void setColourByLabel(boolean b) + { + } + - @Override - public void setGraduatedColour(boolean b) - { - } - +} diff --cc src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java index 52cfb50,d813fe2..9733081 --- a/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java +++ b/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java @@@ -27,11 -27,8 +27,10 @@@ import jalview.datamodel.AlignmentI import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; import jalview.renderer.seqfeatures.FeatureRenderer; +import jalview.schemes.Colour; import jalview.schemes.FeatureColour; import jalview.schemes.UserColourScheme; +import jalview.util.ColorUtils; - import jalview.viewmodel.AlignmentViewport; import java.awt.Color; import java.beans.PropertyChangeListener; @@@ -66,14 -63,8 +65,14 @@@ public abstract class FeatureRendererMo protected PropertyChangeSupport changeSupport = new PropertyChangeSupport( this); - protected AlignmentViewport av; + protected AlignViewportI av; + /* + * map holds per feature type, {{min, max}, {min, max}} feature score + * values for positional and non-positional features respectively + */ + private Map minmax = new Hashtable(); + @Override public AlignViewportI getViewport() { diff --cc test/MCview/PDBChainTest.java index 6ee688f,0406128..0da7285 --- a/test/MCview/PDBChainTest.java +++ b/test/MCview/PDBChainTest.java @@@ -31,10 -30,9 +31,10 @@@ import jalview.datamodel.AlignmentAnnot import jalview.datamodel.Sequence; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; +import jalview.schemes.Colour; import jalview.schemes.ColourSchemeI; import jalview.schemes.TaylorColourScheme; - import jalview.structure.StructureViewSettings; + import jalview.structure.StructureImportSettings; import java.awt.Color; import java.util.Vector; diff --cc test/jalview/ext/ensembl/EnsemblGeneTest.java index 5cf296c,4e815d1..1779cb0 --- a/test/jalview/ext/ensembl/EnsemblGeneTest.java +++ b/test/jalview/ext/ensembl/EnsemblGeneTest.java @@@ -11,9 -11,9 +11,9 @@@ import jalview.datamodel.SequenceFeatur import jalview.datamodel.SequenceI; import jalview.io.gff.SequenceOntologyFactory; import jalview.io.gff.SequenceOntologyLite; ++import jalview.schemes.Colour; import jalview.util.MapList; --import java.awt.Color; import java.util.List; import org.testng.annotations.AfterClass; @@@ -250,9 -250,9 +250,9 @@@ public class EnsemblGeneTes assertTrue(fc.isFeatureDisplayed("sequence_variant")); assertTrue(fc.isFeatureDisplayed("feature_variant")); // subtype assertFalse(fc.isFeatureDisplayed("transcript")); -- assertEquals(Color.RED, fc.getFeatureColour("sequence_variant") ++ assertEquals(Colour.red, fc.getFeatureColour("sequence_variant") .getColour()); -- assertEquals(Color.RED, fc.getFeatureColour("feature_variant") ++ assertEquals(Colour.red, fc.getFeatureColour("feature_variant") .getColour()); assertTrue(fc.getFeatureColour("exon").isColourByLabel()); assertTrue(fc.getFeatureColour("coding_exon").isColourByLabel());