From: gmungoc Date: Thu, 9 Feb 2017 08:41:02 +0000 (+0000) Subject: JAL-2405 enable nucleotide/peptide colour schemes in applet menus X-Git-Tag: Release_2_10_3b1~354 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4b2be7cd8c14e67cc347609199e25c7f09fda988;p=jalview.git JAL-2405 enable nucleotide/peptide colour schemes in applet menus --- diff --git a/src/jalview/appletgui/APopupMenu.java b/src/jalview/appletgui/APopupMenu.java index dd1e089..055fcf3 100644 --- a/src/jalview/appletgui/APopupMenu.java +++ b/src/jalview/appletgui/APopupMenu.java @@ -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()); diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 5cabda3..6a0b390 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -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()) {