import jalview.datamodel.Annotation;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.ProfilesI;
+import jalview.schemes.CollectionColourScheme;
+import jalview.schemes.CollectionColourSchemeI;
import jalview.schemes.ColourSchemeI;
+import jalview.schemes.NucleotideColourScheme;
import jalview.schemes.ResidueProperties;
+import jalview.schemes.ZappoColourScheme;
import jalview.util.Platform;
import java.awt.BasicStroke;
boolean av_renderHistogram = true, av_renderProfile = true,
av_normaliseProfile = false;
- ColourSchemeI profcolour = null;
+ CollectionColourSchemeI profcolour = null;
private ColumnSelection columnSelection;
av_renderHistogram = av.isShowConsensusHistogram();
av_renderProfile = av.isShowSequenceLogo();
av_normaliseProfile = av.isNormaliseSequenceLogo();
- profcolour = av.getGlobalColourScheme();
- if (profcolour == null)
+ profcolour = av.getViewportColourScheme();
+ if (profcolour == null || profcolour.getColourScheme() == null)
{
- // Set the default colour for sequence logo if the alignment has no
- // colourscheme set
- profcolour = av.getAlignment().isNucleotide() ? new jalview.schemes.NucleotideColourScheme()
- : new jalview.schemes.ZappoColourScheme();
+ /*
+ * Use default colour for sequence logo if
+ * the alignment has no colourscheme set
+ * (would like to use user preference but n/a for applet)
+ */
+ ColourSchemeI col = av.getAlignment().isNucleotide() ? new NucleotideColourScheme()
+ : new ZappoColourScheme();
+ profcolour = new CollectionColourScheme(col);
}
columnSelection = av.getColumnSelection();
hconsensus = av.getSequenceConsensusHash();
{
final String codonTranslation = ResidueProperties
.codonTranslate(new String(dc));
- colour = profcolour.findColour(codonTranslation.charAt(0));
+ colour = profcolour.findColour(codonTranslation.charAt(0),
+ column, null);
}
else
{
- colour = profcolour.findColour(dc[0]);
+ colour = profcolour.findColour(dc[0], column, null);
}
g.setColor(colour == Color.white ? Color.lightGray : colour);