import jalview.gui.Help.HelpId;
import jalview.io.JalviewFileChooser;
import jalview.schemabinding.version2.JalviewUserColours;
+import jalview.schemes.Colour;
import jalview.schemes.FeatureColour;
+import jalview.util.ColorUtils;
import jalview.util.Format;
import jalview.util.MessageManager;
import jalview.util.Platform;
"Select new Colour", true, // modal
colorChooser, this, // OK button handler
null); // no CANCEL button handler
- colorChooser.setColor(featureColour.getMaxColour());
+ colorChooser.setColor(ColorUtils.getColor(featureColour
+ .getMaxColour()));
dialog.setVisible(true);
}
}
Cache.log.warn("Couldn't parse out graduated feature color.",
e);
}
- FeatureColourI gcol = new FeatureColour(mincol, maxcol,
+ FeatureColourI gcol = new FeatureColour(new Colour(mincol),
+ new Colour(maxcol),
newcol.getMin(), newcol.getMax());
if (newcol.hasAutoScale())
{
Color color = new Color(
Integer.parseInt(jucs.getColour(i).getRGB(), 16));
fr.setColour(name = jucs.getColour(i).getName(),
- new FeatureColour(color));
+ new FeatureColour(new Colour(color)));
}
fr.setOrder(name, (i == 0) ? 0 : i / jucs.getColourCount());
}
{
this.setText("");
this.setIcon(null);
- newColor = cellColour.getColour();
+ newColor = ColorUtils.getColor(cellColour.getColour());
setBackground(newColor);
}
if (isSelected)
}
else
{
- Color newColor = gcol.getMaxColour();
+ Color newColor = ColorUtils.getColor(gcol.getMaxColour());
comp.setBackground(newColor);
// System.err.println("Width is " + w / 2);
Icon ficon = new FeatureIcon(gcol, comp.getBackground(), w, h, thr);
g.setColor(backg);
g.fillRect(0, 0, width, height);
// need an icon here.
- g.setColor(gcol.getMaxColour());
+ g.setColor(ColorUtils.getColor(gcol.getMaxColour()));
g.setFont(new Font("Verdana", Font.PLAIN, 9));
}
else
{
- Color minCol = gcol.getMinColour();
+ Color minCol = ColorUtils.getColor(gcol.getMinColour());
g.setColor(minCol);
g.fillRect(0, 0, s1, height);
if (midspace)
g.setColor(Color.white);
g.fillRect(s1, 0, e1 - s1, height);
}
- g.setColor(gcol.getMaxColour());
+ g.setColor(ColorUtils.getColor(gcol.getMaxColour()));
g.fillRect(0, e1, width - e1, height);
}
}
if (currentColor.isSimpleColour())
{
// bring up simple color chooser
- button.setBackground(currentColor.getColour());
- colorChooser.setColor(currentColor.getColour());
+ button.setBackground(ColorUtils.getColor(currentColor.getColour()));
+ colorChooser
+ .setColor(ColorUtils.getColor(currentColor.getColour()));
dialog.setVisible(true);
}
else
{ // User pressed dialog's "OK" button.
if (currentColor.isSimpleColour())
{
- currentColor = new FeatureColour(colorChooser.getColor());
+ currentColor = new FeatureColour(
+ new Colour(colorChooser.getColor()));
}
else
{
{
button.setText("");
button.setIcon(null);
- button.setBackground(currentColor.getColour());
+ button.setBackground(ColorUtils.getColor(currentColor.getColour()));
}
return button;
}