From 4b2be7cd8c14e67cc347609199e25c7f09fda988 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 9 Feb 2017 08:41:02 +0000 Subject: [PATCH] JAL-2405 enable nucleotide/peptide colour schemes in applet menus --- src/jalview/appletgui/APopupMenu.java | 19 ++++++++++++++++++- src/jalview/appletgui/AlignFrame.java | 10 ++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) 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()) { -- 1.7.10.2