import jalview.api.FeatureColourI;
import jalview.datamodel.GraphLine;
import jalview.schemes.AnnotationColourGradient;
+import jalview.schemes.Colour;
import jalview.schemes.FeatureColour;
+import jalview.util.ColorUtils;
import jalview.util.MessageManager;
import java.awt.Checkbox;
Color bl = Color.black;
if (oldcs.isSimpleColour())
{
- bl = oldcs.getColour();
+ bl = ColorUtils.getColor(oldcs.getColour());
}
// original colour becomes the maximum colour
- cs = new FeatureColour(Color.white, bl, mm[0], mm[1]);
+ cs = new FeatureColour(new Colour(Color.white), new Colour(bl),
+ mm[0], mm[1]);
}
- minColour.setBackground(cs.getMinColour());
- maxColour.setBackground(cs.getMaxColour());
- minColour.setForeground(cs.getMinColour());
- maxColour.setForeground(cs.getMaxColour());
+ minColour.setBackground(ColorUtils.getColor(cs.getMinColour()));
+ maxColour.setBackground(ColorUtils.getColor(cs.getMaxColour()));
+ minColour.setForeground(ColorUtils.getColor(cs.getMinColour()));
+ maxColour.setForeground(ColorUtils.getColor(cs.getMaxColour()));
colourFromLabel.setState(cs.isColourByLabel());
adjusting = true;
jPanel4.setBackground(Color.white);
threshold.addItemListener(this);
threshold.addItem(MessageManager
- .getString("label.threshold_feature_no_thereshold"));
+ .getString("label.threshold_feature_no_threshold"));
threshold.addItem(MessageManager
- .getString("label.threshold_feature_above_thereshold"));
+ .getString("label.threshold_feature_above_threshold"));
threshold.addItem(MessageManager
- .getString("label.threshold_feature_below_thereshold"));
+ .getString("label.threshold_feature_below_threshold"));
thresholdValue.addActionListener(this);
slider.setBackground(Color.white);
slider.setEnabled(false);
// ap.paintAlignment(false);
}
- public void minColour_actionPerformed(Color newCol)
+ public void minColour_actionPerformed(Color c)
{
- if (newCol == null)
+ if (c == null)
{
UserDefinedColours udc = new UserDefinedColours(this,
minColour.getBackground(), owner,
}
else
{
- minColour.setBackground(newCol);
- minColour.setForeground(newCol);
+ minColour.setBackground(c);
+ minColour.setForeground(c);
minColour.repaint();
changeColour();
}
slider.setEnabled(true);
thresholdValue.setEnabled(true);
- FeatureColour acg = new FeatureColour(minColour.getBackground(),
- maxColour.getBackground(), min, max);
+ FeatureColour acg = new FeatureColour(new Colour(
+ minColour.getBackground()), new Colour(
+ maxColour.getBackground()), min, max);
acg.setColourByLabel(colourFromLabel.getState());
maxColour.setEnabled(!colourFromLabel.getState());