Merge branch 'develop' into features/JAL-2094_colourInterface
[jalview.git] / src / jalview / appletgui / FeatureSettings.java
index 9733c86..79812ae 100755 (executable)
@@ -24,6 +24,7 @@ import jalview.api.FeatureColourI;
 import jalview.api.FeatureSettingsControllerI;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.SequenceFeature;
+import jalview.util.ColorUtils;
 import jalview.util.MessageManager;
 
 import java.awt.BorderLayout;
@@ -192,7 +193,7 @@ public class FeatureSettings extends Panel implements ItemListener,
     final FeatureColourI typeCol = fr.getFeatureStyle(type);
     PopupMenu men = new PopupMenu(MessageManager.formatMessage(
             "label.settings_for_type", new String[] { type }));
-    java.awt.MenuItem scr = new MenuItem(
+    MenuItem scr = new MenuItem(
             MessageManager.getString("label.sort_by_score"));
     men.add(scr);
     final FeatureSettings me = this;
@@ -677,7 +678,8 @@ public class FeatureSettings extends Panel implements ItemListener,
       FeatureColourI fcol = fr.getFeatureStyle(check.type);
       if (fcol.isSimpleColour())
       {
-        new UserDefinedColours(this, check.type, fcol.getColour());
+        new UserDefinedColours(this, check.type, ColorUtils.getColor(fcol
+                .getColour()));
       }
       else
       {
@@ -716,7 +718,7 @@ public class FeatureSettings extends Panel implements ItemListener,
       col = newcol;
       if (col.isSimpleColour())
       {
-        setBackground(col.getColour());
+        setBackground(ColorUtils.getColor(col.getColour()));
       }
       else
       {
@@ -736,7 +738,7 @@ public class FeatureSettings extends Panel implements ItemListener,
         }
         else
         {
-          setBackground(col.getMinColour());
+          setBackground(ColorUtils.getColor(col.getMinColour()));
         }
         this.setLabel(vlabel);
       }
@@ -779,14 +781,12 @@ public class FeatureSettings extends Panel implements ItemListener,
            * height/g.getFontMetrics().getHeight()))); g.drawString("Label",
            * width/2, 0);
            */
-
         }
         else if (col.isGraduatedColour())
         {
-          Color maxCol = col.getMaxColour();
+          Color maxCol = ColorUtils.getColor(col.getMaxColour());
           g.setColor(maxCol);
           g.fillRect(d.width / 2, 0, d.width / 2, d.height);
-
         }
       }