From 0061941739d032ad91aed23bda07e2ad543c2ccb Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 18 Aug 2010 10:09:04 +0000 Subject: [PATCH] colour menu items are in same radiobutton group --- src/jalview/jbgui/GStructureViewer.java | 38 ++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/src/jalview/jbgui/GStructureViewer.java b/src/jalview/jbgui/GStructureViewer.java index 1b50ca8..f7fa6db 100644 --- a/src/jalview/jbgui/GStructureViewer.java +++ b/src/jalview/jbgui/GStructureViewer.java @@ -191,6 +191,7 @@ public class GStructureViewer extends JInternalFrame savemenu.add(png); savemenu.add(eps); viewMenu.add(chainMenu); + colourMenu.add(seqColour); colourMenu.add(chainColour); colourMenu.add(chargeColour); @@ -203,6 +204,19 @@ public class GStructureViewer extends JInternalFrame colourMenu.add(buriedColour); colourMenu.add(userColour); colourMenu.add(backGround); + + colourButtons.add(seqColour); + colourButtons.add(chainColour); + colourButtons.add(chargeColour); + colourButtons.add(zappoColour); + colourButtons.add(taylorColour); + colourButtons.add(hydroColour); + colourButtons.add(helixColour); + colourButtons.add(strandColour); + colourButtons.add(turnColour); + colourButtons.add(buriedColour); + colourButtons.add(userColour); + helpMenu.add(jmolHelp); } @@ -230,27 +244,29 @@ public class GStructureViewer extends JInternalFrame JMenuItem backGround = new JMenuItem(); - protected JCheckBoxMenuItem seqColour = new JCheckBoxMenuItem(); + protected JRadioButtonMenuItem seqColour = new JRadioButtonMenuItem(); + + protected JRadioButtonMenuItem chainColour = new JRadioButtonMenuItem(); - JMenuItem chainColour = new JMenuItem(); + protected JRadioButtonMenuItem chargeColour = new JRadioButtonMenuItem(); - JMenuItem chargeColour = new JMenuItem(); + protected JRadioButtonMenuItem zappoColour = new JRadioButtonMenuItem(); - JMenuItem zappoColour = new JMenuItem(); + protected JRadioButtonMenuItem taylorColour = new JRadioButtonMenuItem(); - JMenuItem taylorColour = new JMenuItem(); + protected JRadioButtonMenuItem hydroColour = new JRadioButtonMenuItem(); - JMenuItem hydroColour = new JMenuItem(); + protected JRadioButtonMenuItem strandColour = new JRadioButtonMenuItem(); - JMenuItem strandColour = new JMenuItem(); + protected JRadioButtonMenuItem helixColour = new JRadioButtonMenuItem(); - JMenuItem helixColour = new JMenuItem(); + protected JRadioButtonMenuItem turnColour = new JRadioButtonMenuItem(); - JMenuItem turnColour = new JMenuItem(); + protected JRadioButtonMenuItem buriedColour = new JRadioButtonMenuItem(); - JMenuItem buriedColour = new JMenuItem(); + protected JRadioButtonMenuItem userColour = new JRadioButtonMenuItem(); - JMenuItem userColour = new JMenuItem(); + protected ButtonGroup colourButtons = new ButtonGroup(); JMenu helpMenu = new JMenu(); -- 1.7.10.2