From: amwaterhouse Date: Tue, 16 Nov 2004 15:25:14 +0000 (+0000) Subject: ConservationColour added X-Git-Tag: Release_2_0~924 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=be81a18dc614d4d778017060945a10a85d5b5c24;p=jalview.git ConservationColour added --- diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index 8588524..4410880 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -11,8 +11,6 @@ package jalview.jbgui; import javax.swing.*; import java.awt.event.*; import java.awt.*; -import javax.swing.event.*; - public class GAlignFrame extends JInternalFrame { @@ -67,19 +65,23 @@ public class GAlignFrame extends JInternalFrame protected JRadioButtonMenuItem strandColour = new JRadioButtonMenuItem(); protected JRadioButtonMenuItem turnColour = new JRadioButtonMenuItem(); protected JRadioButtonMenuItem buriedColour = new JRadioButtonMenuItem(); - protected JRadioButtonMenuItem conservationColour = new JRadioButtonMenuItem(); protected JRadioButtonMenuItem abovePIDColour = new JRadioButtonMenuItem(); protected JRadioButtonMenuItem userDefinedColour = new JRadioButtonMenuItem(); protected JRadioButtonMenuItem PIDColour = new JRadioButtonMenuItem(); protected JRadioButtonMenuItem BLOSUM62Colour = new JRadioButtonMenuItem(); JMenuItem njTreeBlosumMenuItem = new JMenuItem(); JMenuItem avDistanceTreeBlosumMenuItem = new JMenuItem(); - JMenuItem conservationColourIncMenuItem = new JMenuItem(); + protected JMenuItem conservationColourIncMenuItem = new JMenuItem(); protected JCheckBoxMenuItem consensusGraphMenuItem = new JCheckBoxMenuItem(); protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem(); JMenuItem htmlMenuItem = new JMenuItem(); JMenuItem schemeKeyMenuItem = new JMenuItem(); JMenuItem overviewMenuItem = new JMenuItem(); + protected JMenuItem undoMenuItem = new JMenuItem(); + protected JMenuItem redoMenuItem = new JMenuItem(); + protected JCheckBoxMenuItem conservationMenuItem = new JCheckBoxMenuItem(); + JMenuItem noColourmenuItem = new JMenuItem(); + protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem(); public GAlignFrame() { try @@ -127,7 +129,6 @@ public class GAlignFrame extends JInternalFrame colours.add(strandColour); colours.add(turnColour); colours.add(buriedColour); - colours.add(conservationColour); colours.add(abovePIDColour); colours.add(userDefinedColour); colours.add(PIDColour); @@ -163,7 +164,6 @@ public class GAlignFrame extends JInternalFrame colourMenu.setText("Colour"); calculateMenu.setText("Calculate"); alignMenu.setText("Web Service"); - groupsMenuItem.setEnabled(false); groupsMenuItem.setText("Groups"); groupsMenuItem.addActionListener(new java.awt.event.ActionListener() { @@ -172,7 +172,6 @@ public class GAlignFrame extends JInternalFrame groupsMenuItem_actionPerformed(e); } }); - groupEditingMenuItem.setEnabled(false); groupEditingMenuItem.setText("Group editing mode"); groupEditingMenuItem.addActionListener(new java.awt.event.ActionListener() { @@ -406,6 +405,7 @@ public class GAlignFrame extends JInternalFrame statusBar.setText("Status bar"); outputTextboxMenu.setMnemonic('T'); outputTextboxMenu.setText("Output alignment via textbox"); + clustalColour.setEnabled(false); clustalColour.setSelected(false); clustalColour.setText("Clustalx colours"); clustalColour.addActionListener(new java.awt.event.ActionListener() @@ -472,15 +472,6 @@ public class GAlignFrame extends JInternalFrame buriedColour_actionPerformed(e); } }); - conservationColour.setEnabled(false); - conservationColour.setText("By conservation"); - conservationColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - conservationColour_actionPerformed(e); - } - }); abovePIDColour.setEnabled(false); abovePIDColour.setText("Above PID threshold only"); abovePIDColour.addActionListener(new java.awt.event.ActionListener() @@ -582,6 +573,51 @@ public class GAlignFrame extends JInternalFrame overviewMenuItem_actionPerformed(e); } }); + undoMenuItem.setEnabled(false); + undoMenuItem.setMnemonic('Z'); + undoMenuItem.setText("Undo"); + undoMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + undoMenuItem_actionPerformed(e); + } + }); + redoMenuItem.setEnabled(false); + redoMenuItem.setMnemonic('0'); + redoMenuItem.setText("Redo"); + redoMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + redoMenuItem_actionPerformed(e); + } + }); + conservationMenuItem.setText("By conservation"); + conservationMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + conservationMenuItem_actionPerformed(e); + } + }); + noColourmenuItem.setText("None"); + noColourmenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + noColourmenuItem_actionPerformed(e); + } + }); + wrapMenuItem.setEnabled(false); + wrapMenuItem.setText("Wrap alignment"); + wrapMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + wrapMenuItem_actionPerformed(e); + } + }); alignFrameMenuBar.add(fileMenu); alignFrameMenuBar.add(editMenu); alignFrameMenuBar.add(fontMenu); @@ -595,6 +631,9 @@ public class GAlignFrame extends JInternalFrame fileMenu.add(htmlMenuItem); fileMenu.addSeparator(); fileMenu.add(closeMenuItem); + editMenu.add(undoMenuItem); + editMenu.add(redoMenuItem); + editMenu.addSeparator(); editMenu.add(groupsMenuItem); editMenu.add(groupEditingMenuItem); editMenu.addSeparator(); @@ -618,10 +657,12 @@ public class GAlignFrame extends JInternalFrame fontMenu.add(fontStyleMenuItem); fontMenu.addSeparator(); fontMenu.add(colourTextMenuItem); + viewMenu.add(wrapMenuItem); viewMenu.add(viewBoxesMenuItem); viewMenu.add(viewTextMenuItem); viewMenu.add(consensusGraphMenuItem); viewMenu.add(overviewMenuItem); + colourMenu.add(noColourmenuItem); colourMenu.add(clustalColour); colourMenu.add(zappoColour); colourMenu.add(taylorColour); @@ -632,7 +673,7 @@ public class GAlignFrame extends JInternalFrame colourMenu.add(buriedColour); colourMenu.add(userDefinedColour); colourMenu.addSeparator(); - colourMenu.add(conservationColour); + colourMenu.add(conservationMenuItem); colourMenu.add(conservationColourIncMenuItem); colourMenu.addSeparator(); colourMenu.add(abovePIDColour); @@ -685,6 +726,17 @@ public class GAlignFrame extends JInternalFrame } + protected void redoMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void undoMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void groupsMenuItem_actionPerformed(ActionEvent e) { @@ -771,6 +823,12 @@ public class GAlignFrame extends JInternalFrame } + protected void wrapMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void viewBoxesMenuItem_actionPerformed(ActionEvent e) { @@ -906,10 +964,6 @@ public class GAlignFrame extends JInternalFrame } - protected void conservationColour_actionPerformed(ActionEvent e) - { - - } protected void conservationColourIncMenuItem_actionPerformed(ActionEvent e) { @@ -943,4 +997,14 @@ public class GAlignFrame extends JInternalFrame } + protected void noColourmenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void conservationMenuItem_actionPerformed(ActionEvent e) + { + + } + }