JAL-2405 enable nucleotide/peptide colour schemes in applet menus
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 9 Feb 2017 08:41:02 +0000 (08:41 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 9 Feb 2017 08:41:02 +0000 (08:41 +0000)
src/jalview/appletgui/APopupMenu.java
src/jalview/appletgui/AlignFrame.java

index dd1e089..055fcf3 100644 (file)
@@ -243,7 +243,24 @@ public class APopupMenu extends java.awt.PopupMenu implements
     SequenceGroup sg = ap.av.getSelectionGroup();
     if (sg != null && sg.getSize() > 0)
     {
-      conservationColour.setEnabled(!sg.isNucleotide());
+      if (sg.isNucleotide())
+      {
+        conservationColour.setEnabled(false);
+        clustalColour.setEnabled(false);
+        BLOSUM62Colour.setEnabled(false);
+        zappoColour.setEnabled(false);
+        taylorColour.setEnabled(false);
+        hydrophobicityColour.setEnabled(false);
+        helixColour.setEnabled(false);
+        strandColour.setEnabled(false);
+        turnColour.setEnabled(false);
+        buriedColour.setEnabled(false);
+      }
+      else
+      {
+        purinePyrimidineColour.setEnabled(false);
+        nucleotideColour.setEnabled(false);
+      }
       editGroupName.setLabel(MessageManager.formatMessage(
               "label.name_param", new Object[] { sg.getName() }));
       showText.setState(sg.getDisplayText());
index 5cabda3..6a0b390 100644 (file)
@@ -284,6 +284,16 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     }
     if (viewport.getAlignment().isNucleotide())
     {
+      conservationMenuItem.setEnabled(false);
+      clustalColour.setEnabled(false);
+      BLOSUM62Colour.setEnabled(false);
+      zappoColour.setEnabled(false);
+      taylorColour.setEnabled(false);
+      hydrophobicityColour.setEnabled(false);
+      helixColour.setEnabled(false);
+      strandColour.setEnabled(false);
+      turnColour.setEnabled(false);
+      buriedColour.setEnabled(false);
       viewport.updateStrucConsensus(alignPanel);
       if (viewport.getAlignment().hasRNAStructure())
       {