JAL-1452 distinct colour preferences for nucleotide and protein
[jalview.git] / src / jalview / jbgui / GPreferences.java
index 610f32e..071745c 100755 (executable)
@@ -21,7 +21,7 @@
 package jalview.jbgui;
 
 import jalview.gui.JvSwingUtils;
-import jalview.gui.StructureViewer.Viewer;
+import jalview.gui.StructureViewer.ViewerType;
 import jalview.util.MessageManager;
 
 import java.awt.BorderLayout;
@@ -156,7 +156,9 @@ public class GPreferences extends JPanel
 
   protected JPanel maxColour = new JPanel();
 
-  protected JComboBox<String> colour = new JComboBox<String>();
+  protected JComboBox<String> protColour = new JComboBox<String>();
+
+  protected JComboBox<String> nucColour = new JComboBox<String>();
 
   /*
    * Connections tab components
@@ -692,16 +694,30 @@ public class GPreferences extends JPanel
         maxColour_actionPerformed(maxColour);
       }
     });
-    colour.setFont(verdana11);
-    colour.setBounds(new Rectangle(172, 225, 155, 21));
-    JLabel colourLabel = new JLabel();
-    colourLabel.setFont(verdana11);
-    colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
-    colourLabel.setText(MessageManager.getString("label.alignment_colour")
+
+    protColour.setFont(verdana11);
+    protColour.setBounds(new Rectangle(172, 225, 155, 21));
+    JLabel protColourLabel = new JLabel();
+    protColourLabel.setFont(verdana11);
+    protColourLabel.setHorizontalAlignment(SwingConstants.LEFT);
+    protColourLabel.setText(MessageManager
+            .getString("label.prot_alignment_colour") + " ");
+    JvSwingUtils.addtoLayout(coloursTab, MessageManager
+            .getString("label.default_colour_scheme_for_alignment"),
+            protColourLabel, protColour);
+
+    nucColour.setFont(verdana11);
+    nucColour.setBounds(new Rectangle(172, 240, 155, 21));
+    JLabel nucColourLabel = new JLabel();
+    nucColourLabel.setFont(verdana11);
+    nucColourLabel.setHorizontalAlignment(SwingConstants.LEFT);
+    nucColourLabel.setText(MessageManager
+            .getString("label.nuc_alignment_colour")
             + " ");
     JvSwingUtils.addtoLayout(coloursTab, MessageManager
             .getString("label.default_colour_scheme_for_alignment"),
-            colourLabel, colour);
+            nucColourLabel, nucColour);
+
     JPanel annotationShding = new JPanel();
     annotationShding.setBorder(new TitledBorder(MessageManager
             .getString("label.annotation_shading_default")));
@@ -780,8 +796,8 @@ public class GPreferences extends JPanel
 
     structViewer.setFont(verdana11);
     structViewer.setBounds(new Rectangle(160, ypos, 120, height));
-    structViewer.addItem(Viewer.JMOL.name());
-    structViewer.addItem(Viewer.CHIMERA.name());
+    structViewer.addItem(ViewerType.JMOL.name());
+    structViewer.addItem(ViewerType.CHIMERA.name());
     structViewer.addActionListener(new ActionListener()
     {
       @Override