/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
import jalview.api.FeatureColourI;
import jalview.datamodel.SequenceGroup;
+import jalview.schemes.CollectionColourScheme;
import jalview.schemes.ColourSchemeI;
import jalview.schemes.FeatureColour;
import jalview.schemes.ResidueProperties;
if (seqGroup != null)
{
- oldColourScheme = seqGroup.cs;
+ oldColourScheme = seqGroup.getColourScheme();
}
else
{
{
final Button button = new Button();
Color col = Color.white;
- if (oldColourScheme != null)
+ if (oldColourScheme != null && oldColourScheme.isSimple())
{
- try
- {
- col = oldColourScheme.findColour(aa.charAt(0), -1, null);
- } catch (Exception ex)
- {
- }
+ col = oldColourScheme.findColour(aa.charAt(0));
}
button.setBackground(col);
oldColours.addElement(col);
}
UserColourScheme ucs = new UserColourScheme(newColours);
- if (ap != null)
- {
- ucs.setThreshold(0, ap.av.isIgnoreGapsConsensus());
- }
+ // if (ap != null)
+ // {
+ // ucs.setThreshold(0, ap.av.isIgnoreGapsConsensus());
+ // }
if (ap != null)
{
if (seqGroup != null)
{
- seqGroup.cs = ucs;
+ seqGroup.cs = new CollectionColourScheme(ucs);
+ seqGroup.getGroupColourScheme().setThreshold(0,
+ ap.av.isIgnoreGapsConsensus());
}
else
{
ap.av.setGlobalColourScheme(ucs);
+ ap.av.getViewportColourScheme().setThreshold(0,
+ ap.av.isIgnoreGapsConsensus());
}
ap.seqPanel.seqCanvas.img = null;
ap.paintAlignment(true);
{
if (seqGroup != null)
{
- seqGroup.cs = ucs;
+ seqGroup.cs = new CollectionColourScheme(ucs);
}
else
{