import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
import jalview.io.FeaturesFile;
+import jalview.schemes.Colour;
import jalview.schemes.FeatureColour;
import jalview.schemes.UserColourScheme;
+import jalview.util.ColorUtils;
import jalview.util.MessageManager;
import jalview.viewmodel.AlignmentViewport;
public class FeatureRenderer extends
jalview.renderer.seqfeatures.FeatureRenderer
{
-
// 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;
FeatureColourPanel colourPanel;
+ /**
+ * Creates a new FeatureRenderer object.
+ *
+ * @param av
+ */
+ public FeatureRenderer(AlignmentViewport av)
+ {
+ super(av);
+ }
+
class FeatureColourPanel extends Panel
{
String label = "";
String vlabel = "";
if (newcol.isSimpleColour())
{
- bg = newcol.getColour();
+ bg = ColorUtils.getColor(newcol.getColour());
setBackground(bg);
}
else
}
else
{
- setBackground(bg = newcol.getMinColour());
- maxCol = newcol.getMaxColour();
+ setBackground(bg = ColorUtils.getColor(newcol.getMinColour()));
+ maxCol = ColorUtils.getColor(newcol.getMaxColour());
}
}
label = vlabel;
{
Color generatedColour = UserColourScheme
.createColourFromName(name.getText());
- col = new FeatureColour(generatedColour);
+ col = new FeatureColour(new Colour(generatedColour));
}
colourPanel.updateColor(col);
if (!colourPanel.isGcol)
{
// update colour - otherwise its already done.
- setColour(sf.type, new FeatureColour(colourPanel.getBackground()));
+ setColour(
+ sf.type,
+ new FeatureColour(new Colour(colourPanel.getBackground())));
}
try
{
{
setGroupVisibility(lastFeatureGroupAdded, true);
}
- setColour(lastFeatureAdded, new FeatureColour(newColour)); // was fcol
+ setColour(lastFeatureAdded,
+ new FeatureColour(new Colour(newColour))); // was fcol
setVisible(lastFeatureAdded);
findAllFeatures(false); // different to original applet behaviour ?
// findAllFeatures();