From ff2e8d0b23e91c4d7f19dd1922e48e5a718ee0f1 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 18 Mar 2005 17:08:17 +0000 Subject: [PATCH] merged Loadtree and EPSfile and changed crlf. --- src/jalview/jbgui/GAlignFrame.java | 2243 ++++++++++++++++++------------------ 1 file changed, 1128 insertions(+), 1115 deletions(-) diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index 44cb8b7..a256133 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -1,1115 +1,1128 @@ -/******************** - * 2004 Jalview Reengineered - * Barton Group - * Dundee University - * - * AM Waterhouse - *******************/ - -package jalview.jbgui; - -import javax.swing.*; -import java.awt.event.*; -import java.awt.*; - -public class GAlignFrame extends JInternalFrame -{ - protected JMenuBar alignFrameMenuBar = new JMenuBar(); - protected JMenu fileMenu = new JMenu(); - protected JMenuItem closeMenuItem = new JMenuItem(); - protected JMenu editMenu = new JMenu(); - protected JMenu viewMenu = new JMenu(); - protected JMenu colourMenu = new JMenu(); - protected JMenu calculateMenu = new JMenu(); - protected JMenu alignMenu = new JMenu(); - protected JMenuItem groupsMenuItem = new JMenuItem(); - protected JMenuItem selectAllSequenceMenuItem = new JMenuItem(); - protected JMenuItem deselectAllSequenceMenuItem = new JMenuItem(); - protected JMenuItem invertSequenceMenuItem = new JMenuItem(); - protected JMenuItem deselectAllColumnsMenuItem = new JMenuItem(); - protected JMenuItem remove2LeftMenuItem = new JMenuItem(); - protected JMenuItem remove2RightMenuItem = new JMenuItem(); - protected JMenuItem removeGappedColumnMenuItem = new JMenuItem(); - protected JMenuItem removeAllGapsMenuItem = new JMenuItem(); - protected JMenuItem setGapCharMenuItem = new JMenuItem(); - protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem(); - protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem(); - protected JMenuItem sortPairwiseMenuItem = new JMenuItem(); - protected JMenuItem sortIDMenuItem = new JMenuItem(); - protected JMenuItem sortGroupMenuItem = new JMenuItem(); - protected JMenuItem sortTreeOrderMenuItem = new JMenuItem(); - protected JMenuItem removeRedundancyMenuItem = new JMenuItem(); - protected JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(); - protected JMenuItem PCAMenuItem = new JMenuItem(); - protected JMenuItem averageDistanceTreeMenuItem = new JMenuItem(); - protected JMenuItem neighbourTreeMenuItem = new JMenuItem(); - protected JMenuItem clustalAlignMenuItem = new JMenuItem(); - BorderLayout borderLayout1 = new BorderLayout(); - public JLabel statusBar = new JLabel(); - protected JMenu saveAlignmentMenu = new JMenu(); - protected JMenu outputTextboxMenu = new JMenu(); - protected JRadioButtonMenuItem clustalColour = new JRadioButtonMenuItem(); - protected JRadioButtonMenuItem zappoColour = new JRadioButtonMenuItem(); - protected JRadioButtonMenuItem taylorColour = new JRadioButtonMenuItem(); - protected JRadioButtonMenuItem hydrophobicityColour = new JRadioButtonMenuItem(); - protected JRadioButtonMenuItem helixColour = new JRadioButtonMenuItem(); - protected JRadioButtonMenuItem strandColour = new JRadioButtonMenuItem(); - protected JRadioButtonMenuItem turnColour = new JRadioButtonMenuItem(); - protected JRadioButtonMenuItem buriedColour = 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(); - protected JCheckBoxMenuItem consensusGraphMenuItem = new JCheckBoxMenuItem(); - protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem(); - JMenuItem htmlMenuItem = new JMenuItem(); - JMenuItem overviewMenuItem = new JMenuItem(); - protected JMenuItem undoMenuItem = new JMenuItem(); - protected JMenuItem redoMenuItem = new JMenuItem(); - protected JCheckBoxMenuItem conservationMenuItem = new JCheckBoxMenuItem(); - JRadioButtonMenuItem noColourmenuItem = new JRadioButtonMenuItem(); - protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem(); - JMenuItem printMenuItem = new JMenuItem(); - protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem(); - JMenuItem findMenuItem = new JMenuItem(); - JMenu searchMenu = new JMenu(); - protected JCheckBoxMenuItem abovePIDThreshold = new JCheckBoxMenuItem(); - protected JCheckBoxMenuItem sequenceFeatures = new JCheckBoxMenuItem(); - protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem(); - JMenuItem deleteGroups = new JMenuItem(); - JMenuItem delete = new JMenuItem(); - JMenuItem copy = new JMenuItem(); - JMenuItem cut = new JMenuItem(); - JMenu jMenu1 = new JMenu(); - JMenuItem pasteNew = new JMenuItem(); - JMenuItem pasteThis = new JMenuItem(); - protected JCheckBoxMenuItem applyToAllGroups = new JCheckBoxMenuItem(); - JMenuItem createPNG = new JMenuItem(); - protected JMenuItem font = new JMenuItem(); - protected JCheckBoxMenuItem fullSeqId = new JCheckBoxMenuItem(); - JMenuItem epsFile = new JMenuItem(); - public GAlignFrame() - { - - - try - { - jbInit(); - setJMenuBar(alignFrameMenuBar); - - JMenuItem item; - // dynamically fill save as menu with available formats - for (int i = 0; i < jalview.io.FormatProperties.getFormats().size(); i++) { - item = new JMenuItem((String) jalview.io.FormatProperties.getFormats().elementAt(i)); - saveAlignmentMenu.add( item ); - item.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - saveAs_actionPerformed(e); - } - }); - - item = new JMenuItem((String) jalview.io.FormatProperties.getFormats().elementAt(i)); - item.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - outputText_actionPerformed(e); - } - }); - - outputTextboxMenu.add( item ); - } - - } - catch(Exception e) - { - e.printStackTrace(); - } - - ButtonGroup colours = new ButtonGroup(); - colours.add(noColourmenuItem); - colours.add(clustalColour); - colours.add(zappoColour); - colours.add(taylorColour); - colours.add(hydrophobicityColour); - colours.add(helixColour); - colours.add(strandColour); - colours.add(turnColour); - colours.add(buriedColour); - colours.add(userDefinedColour); - colours.add(PIDColour); - colours.add(BLOSUM62Colour); - colours.add(nucleotideColour); - } - private void jbInit() throws Exception - { - fileMenu.setMnemonic('F'); - fileMenu.setText("File"); - saveAlignmentMenu.setMnemonic('L'); - saveAlignmentMenu.setText("Save alignment to local file"); - closeMenuItem.setMnemonic('C'); - closeMenuItem.setText("Close"); - closeMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - closeMenuItem_actionPerformed(e); - } - }); - editMenu.setText("Edit"); - viewMenu.setText("View"); - colourMenu.setText("Colour"); - calculateMenu.setText("Calculate"); - alignMenu.setText("Web Service"); - groupsMenuItem.setVisible(false); - groupsMenuItem.setText("Groups"); - groupsMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - groupsMenuItem_actionPerformed(e); - } - }); - selectAllSequenceMenuItem.setText("Select all"); - selectAllSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - selectAllSequenceMenuItem_actionPerformed(e); - } - }); - deselectAllSequenceMenuItem.setText("Clear selection"); - deselectAllSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - deselectAllSequenceMenuItem_actionPerformed(e); - } - }); - invertSequenceMenuItem.setText("Invert sequence selection"); - invertSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - invertSequenceMenuItem_actionPerformed(e); - } - }); - deselectAllColumnsMenuItem.setText("Deselect all columns"); - deselectAllColumnsMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - deselectAllColumnsMenuItem_actionPerformed(e); - } - }); - remove2LeftMenuItem.setText("Remove sequence <- left of selected column"); - remove2LeftMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - remove2LeftMenuItem_actionPerformed(e); - } - }); - remove2RightMenuItem.setText("Remove sequence -> right of selected column"); - remove2RightMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - remove2RightMenuItem_actionPerformed(e); - } - }); - removeGappedColumnMenuItem.setText("Remove gapped columns"); - removeGappedColumnMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - removeGappedColumnMenuItem_actionPerformed(e); - } - }); - removeAllGapsMenuItem.setText("Remove all gaps"); - removeAllGapsMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - removeAllGapsMenuItem_actionPerformed(e); - } - }); - setGapCharMenuItem.setText("Set gap character to \".\""); - setGapCharMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - setGapCharMenuItem_actionPerformed(e); - } - }); - viewBoxesMenuItem.setText("Boxes"); - viewBoxesMenuItem.setState(true); - viewBoxesMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - viewBoxesMenuItem_actionPerformed(e); - } - }); - viewTextMenuItem.setText("Text"); - viewTextMenuItem.setState(true); - viewTextMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - viewTextMenuItem_actionPerformed(e); - } - }); - sortPairwiseMenuItem.setText("Sort by pairwise identity"); - sortPairwiseMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - sortPairwiseMenuItem_actionPerformed(e); - } - }); - sortIDMenuItem.setText("Sort by ID"); - sortIDMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - sortIDMenuItem_actionPerformed(e); - } - }); - sortGroupMenuItem.setText("Sort by group"); - sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - sortGroupMenuItem_actionPerformed(e); - } - }); - sortTreeOrderMenuItem.setText("Sort by tree order"); - sortTreeOrderMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - sortTreeOrderMenuItem_actionPerformed(e); - } - }); - removeRedundancyMenuItem.setText("Remove redundancy"); - removeRedundancyMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - removeRedundancyMenuItem_actionPerformed(e); - } - }); - pairwiseAlignmentMenuItem.setText("Pairwise alignments"); - pairwiseAlignmentMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - pairwiseAlignmentMenuItem_actionPerformed(e); - } - }); - PCAMenuItem.setText("Principal component analysis"); - PCAMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - PCAMenuItem_actionPerformed(e); - } - }); - averageDistanceTreeMenuItem.setText("Average distance tree using PID"); - averageDistanceTreeMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - averageDistanceTreeMenuItem_actionPerformed(e); - } - }); - neighbourTreeMenuItem.setText("Neighbour joining tree using PID"); - neighbourTreeMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - neighbourTreeMenuItem_actionPerformed(e); - } - }); - clustalAlignMenuItem.setText("Clustal alignment"); - clustalAlignMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - clustalAlignMenuItem_actionPerformed(e); - } - }); - this.getContentPane().setLayout(borderLayout1); - alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11)); - statusBar.setBackground(Color.white); - statusBar.setFont(new java.awt.Font("Verdana", 0, 11)); - statusBar.setBorder(BorderFactory.createLineBorder(Color.black)); - statusBar.setText("Status bar"); - outputTextboxMenu.setMnemonic('T'); - outputTextboxMenu.setText("Output alignment via textbox"); - clustalColour.setSelected(false); - clustalColour.setText("Clustalx colours"); - clustalColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - clustalColour_actionPerformed(e); - } - }); - zappoColour.setText("Zappo colour scheme"); - zappoColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - zappoColour_actionPerformed(e); - } - }); - taylorColour.setText("Taylor colour scheme"); - taylorColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - taylorColour_actionPerformed(e); - } - }); - hydrophobicityColour.setText("By hydrophobicity"); - hydrophobicityColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - hydrophobicityColour_actionPerformed(e); - } - }); - helixColour.setText("Helix propensity"); - helixColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - helixColour_actionPerformed(e); - } - }); - strandColour.setText("Strand propensity"); - strandColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - strandColour_actionPerformed(e); - } - }); - turnColour.setText("Turn propensity"); - turnColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - turnColour_actionPerformed(e); - } - }); - buriedColour.setText("Buried index"); - buriedColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - buriedColour_actionPerformed(e); - } - }); - userDefinedColour.setText("User defined colours"); - userDefinedColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - userDefinedColour_actionPerformed(e); - } - }); - PIDColour.setText("Percentage Identity"); - PIDColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - PIDColour_actionPerformed(e); - } - }); - BLOSUM62Colour.setText("BLOSUM62 score"); - BLOSUM62Colour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - BLOSUM62Colour_actionPerformed(e); - } - }); - avDistanceTreeBlosumMenuItem.setText("Average distance tree using BLOSUM62"); - avDistanceTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - avTreeBlosumMenuItem_actionPerformed(e); - } - }); - njTreeBlosumMenuItem.setText("Neighbour joining tree using BLOSUM62"); - njTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - njTreeBlosumMenuItem_actionPerformed(e); - } - }); - consensusGraphMenuItem.setActionCommand(""); - consensusGraphMenuItem.setText("Consensus graph"); - consensusGraphMenuItem.setState(true); - consensusGraphMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - consensusGraphMenuItem_actionPerformed(e); - } - }); - colourTextMenuItem.setText("Colour text"); - colourTextMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - colourTextMenuItem_actionPerformed(e); - } - }); - htmlMenuItem.setText("Output as HTML"); - htmlMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - htmlMenuItem_actionPerformed(e); - } - }); - overviewMenuItem.setText("Overview window"); - overviewMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - 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.setSelected(true); - noColourmenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - noColourmenuItem_actionPerformed(e); - } - }); - wrapMenuItem.setText("Wrap alignment"); - wrapMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - wrapMenuItem_actionPerformed(e); - } - }); - printMenuItem.setText("Print"); - printMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - printMenuItem_actionPerformed(e); - } - }); - renderGapsMenuItem.setText("Render gaps"); - renderGapsMenuItem.setState(true); - renderGapsMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - renderGapsMenuItem_actionPerformed(e); - } - }); - findMenuItem.setText("Find"); - findMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - findMenuItem_actionPerformed(e); - } - }); - searchMenu.setText("Search"); - - abovePIDThreshold.setText("Above PID threshold"); - abovePIDThreshold.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent e) { - abovePIDThreshold_actionPerformed(e); - } - }); - sequenceFeatures.setText("Sequence Features"); - sequenceFeatures.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent actionEvent) - { - sequenceFeatures_actionPerformed(actionEvent); - } - }); - nucleotideColour.setText("Nucleotide colours"); - nucleotideColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - nucleotideColour_actionPerformed(e); - } - }); - deleteGroups.setSelected(false); - deleteGroups.setText("Delete all groups"); - deleteGroups.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - deleteGroups_actionPerformed(e); - } - }); - copy.setText("Copy"); - copy.setMnemonic(KeyEvent.VK_C); - - copy.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - copy_actionPerformed(e); - } - }); - cut.setText("Cut"); - cut.setMnemonic(KeyEvent.VK_X); - cut.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - cut_actionPerformed(e); - } - }); - delete.setText("Delete"); - delete.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - delete_actionPerformed(e); - } - }); - jMenu1.setMnemonic('V'); - jMenu1.setText("Paste"); - pasteNew.setText("to new alignment"); - pasteNew.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - pasteNew_actionPerformed(e); - } - }); - pasteThis.setText("add to this alignment"); - pasteThis.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - pasteThis_actionPerformed(e); - } - }); - applyToAllGroups.setText("Apply colour to all groups"); - applyToAllGroups.setState(true); - applyToAllGroups.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - applyToAllGroups_actionPerformed(e); - } - }); - createPNG.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - createPNG_actionPerformed(e); - } - }); - createPNG.setActionCommand("Save as PNG Image"); - createPNG.setText("Save as PNG Image"); - font.setText("Change Font"); - font.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - font_actionPerformed(e); - } - }); - fullSeqId.setText("Show full sequence id"); - fullSeqId.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - fullSeqId_actionPerformed(e); - } - }); - epsFile.setText("Save as EPS file"); - epsFile.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - epsFile_actionPerformed(e); - } - }); - alignFrameMenuBar.add(fileMenu); - alignFrameMenuBar.add(editMenu); - alignFrameMenuBar.add(searchMenu); - alignFrameMenuBar.add(viewMenu); - alignFrameMenuBar.add(colourMenu); - alignFrameMenuBar.add(calculateMenu); - alignFrameMenuBar.add(alignMenu); - fileMenu.add(saveAlignmentMenu); - fileMenu.add(outputTextboxMenu); - fileMenu.add(htmlMenuItem); - fileMenu.add(epsFile); - fileMenu.add(createPNG); - fileMenu.add(printMenuItem); - fileMenu.addSeparator(); - fileMenu.add(closeMenuItem); - editMenu.add(copy); - editMenu.add(jMenu1); - editMenu.add(cut); - editMenu.add(delete); - editMenu.addSeparator(); - editMenu.add(undoMenuItem); - editMenu.add(redoMenuItem); - editMenu.addSeparator(); - editMenu.add(deselectAllSequenceMenuItem); - editMenu.add(selectAllSequenceMenuItem); - editMenu.add(invertSequenceMenuItem); - editMenu.add(deleteGroups); - editMenu.add(groupsMenuItem); - editMenu.addSeparator(); - editMenu.add(deselectAllColumnsMenuItem); - editMenu.add(remove2LeftMenuItem); - editMenu.add(remove2RightMenuItem); - editMenu.addSeparator(); - editMenu.add(removeGappedColumnMenuItem); - editMenu.add(removeAllGapsMenuItem); - editMenu.add(setGapCharMenuItem); - searchMenu.add(findMenuItem); - viewMenu.add(font); - viewMenu.add(fullSeqId); - viewMenu.add(wrapMenuItem); - viewMenu.add(viewBoxesMenuItem); - viewMenu.add(viewTextMenuItem); - viewMenu.add(colourTextMenuItem); - viewMenu.add(renderGapsMenuItem); - viewMenu.add(consensusGraphMenuItem); - viewMenu.add(overviewMenuItem); - viewMenu.add(sequenceFeatures); - colourMenu.add(applyToAllGroups); - colourMenu.add(noColourmenuItem); - colourMenu.add(clustalColour); - colourMenu.add(zappoColour); - colourMenu.add(taylorColour); - colourMenu.add(hydrophobicityColour); - colourMenu.add(helixColour); - colourMenu.add(strandColour); - colourMenu.add(turnColour); - colourMenu.add(buriedColour); - colourMenu.add(nucleotideColour); - colourMenu.add(userDefinedColour); - colourMenu.add(PIDColour); - colourMenu.add(BLOSUM62Colour); - colourMenu.addSeparator(); - colourMenu.add(abovePIDThreshold); - colourMenu.add(conservationMenuItem); - calculateMenu.add(sortPairwiseMenuItem); - calculateMenu.add(sortIDMenuItem); - calculateMenu.add(sortGroupMenuItem); - calculateMenu.add(sortTreeOrderMenuItem); - calculateMenu.add(removeRedundancyMenuItem); - calculateMenu.addSeparator(); - calculateMenu.add(pairwiseAlignmentMenuItem); - calculateMenu.add(PCAMenuItem); - calculateMenu.addSeparator(); - calculateMenu.add(averageDistanceTreeMenuItem); - calculateMenu.add(neighbourTreeMenuItem); - calculateMenu.add(avDistanceTreeBlosumMenuItem); - calculateMenu.add(njTreeBlosumMenuItem); - alignMenu.add(clustalAlignMenuItem); - this.getContentPane().add(statusBar, BorderLayout.SOUTH); - jMenu1.add(pasteNew); - jMenu1.add(pasteThis); - } - - protected void saveAs_actionPerformed(ActionEvent e) - { - - } - - protected void outputText_actionPerformed(ActionEvent e) - { - - } - - protected void htmlMenuItem_actionPerformed(ActionEvent e) - { - - } - - - - - - protected void closeMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void redoMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void undoMenuItem_actionPerformed(ActionEvent e) - { - - } - - - protected void groupsMenuItem_actionPerformed(ActionEvent e) - { - - } - - - protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void invertSequenceMenuItem_actionPerformed(ActionEvent e) - { - - } - - - protected void deselectAllColumnsMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void remove2LeftMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void remove2RightMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void setGapCharMenuItem_actionPerformed(ActionEvent e) - { - - } - - - - - - protected void wrapMenuItem_actionPerformed(ActionEvent e) - { - - } - - - protected void viewBoxesMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void viewTextMenuItem_actionPerformed(ActionEvent e) - { - - } - - - protected void colourTextMenuItem_actionPerformed(ActionEvent e) - { - - } - - - - protected void consensusGraphMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void overviewMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void sortIDMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void sortGroupMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void sortTreeOrderMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void PCAMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void averageDistanceTreeMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e) - { - - } - - - protected void njTreeBlosumMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void avTreeBlosumMenuItem_actionPerformed(ActionEvent e) - { - - } - - - - protected void clustalAlignMenuItem_actionPerformed(ActionEvent e) - { - - } - - - - - protected void clustalColour_actionPerformed(ActionEvent e) - { - - } - - protected void zappoColour_actionPerformed(ActionEvent e) - { - - } - - protected void taylorColour_actionPerformed(ActionEvent e) - { - - } - - - protected void hydrophobicityColour_actionPerformed(ActionEvent e) - { - - } - - protected void helixColour_actionPerformed(ActionEvent e) - { - - } - - protected void strandColour_actionPerformed(ActionEvent e) - { - - } - - protected void turnColour_actionPerformed(ActionEvent e) - { - - } - - protected void buriedColour_actionPerformed(ActionEvent e) - { - - } - - - - protected void userDefinedColour_actionPerformed(ActionEvent e) - { - - } - - protected void PIDColour_actionPerformed(ActionEvent e) - { - - } - - protected void BLOSUM62Colour_actionPerformed(ActionEvent e) - { - - } - - - protected void noColourmenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void conservationMenuItem_actionPerformed(ActionEvent e) - { - - } - - - protected void printMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void renderGapsMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void findMenuItem_actionPerformed(ActionEvent e) - { - - } - - - protected void abovePIDThreshold_actionPerformed(ActionEvent e) { - - } - - public void sequenceFeatures_actionPerformed(ActionEvent actionEvent) - { - - } - - protected void nucleotideColour_actionPerformed(ActionEvent e) - { - - } - - protected void deleteGroups_actionPerformed(ActionEvent e) - { - - } - - protected void copy_actionPerformed(ActionEvent e) - { - - } - - - protected void cut_actionPerformed(ActionEvent e) - { - - } - - protected void delete_actionPerformed(ActionEvent e) - { - - } - - protected void pasteNew_actionPerformed(ActionEvent e) - { - - } - - protected void pasteThis_actionPerformed(ActionEvent e) - { - - } - - protected void applyToAllGroups_actionPerformed(ActionEvent e) - { - - } - - protected void createPNG_actionPerformed(ActionEvent e) - { - - } - - protected void font_actionPerformed(ActionEvent e) - { - - } - - protected void fullSeqId_actionPerformed(ActionEvent e) - { - - } - - protected void epsFile_actionPerformed(ActionEvent e) - { - - } - - - -} +/******************** + * 2004 Jalview Reengineered + * Barton Group + * Dundee University + * + * AM Waterhouse + *******************/ + +package jalview.jbgui; + +import javax.swing.*; +import java.awt.event.*; +import java.awt.*; + +public class GAlignFrame extends JInternalFrame +{ + protected JMenuBar alignFrameMenuBar = new JMenuBar(); + protected JMenu fileMenu = new JMenu(); + protected JMenuItem closeMenuItem = new JMenuItem(); + protected JMenu editMenu = new JMenu(); + protected JMenu viewMenu = new JMenu(); + protected JMenu colourMenu = new JMenu(); + protected JMenu calculateMenu = new JMenu(); + protected JMenu alignMenu = new JMenu(); + protected JMenuItem groupsMenuItem = new JMenuItem(); + protected JMenuItem selectAllSequenceMenuItem = new JMenuItem(); + protected JMenuItem deselectAllSequenceMenuItem = new JMenuItem(); + protected JMenuItem invertSequenceMenuItem = new JMenuItem(); + protected JMenuItem deselectAllColumnsMenuItem = new JMenuItem(); + protected JMenuItem remove2LeftMenuItem = new JMenuItem(); + protected JMenuItem remove2RightMenuItem = new JMenuItem(); + protected JMenuItem removeGappedColumnMenuItem = new JMenuItem(); + protected JMenuItem removeAllGapsMenuItem = new JMenuItem(); + protected JMenuItem setGapCharMenuItem = new JMenuItem(); + protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem(); + protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem(); + protected JMenuItem sortPairwiseMenuItem = new JMenuItem(); + protected JMenuItem sortIDMenuItem = new JMenuItem(); + protected JMenuItem sortGroupMenuItem = new JMenuItem(); + protected JMenuItem sortTreeOrderMenuItem = new JMenuItem(); + protected JMenuItem removeRedundancyMenuItem = new JMenuItem(); + protected JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(); + protected JMenuItem PCAMenuItem = new JMenuItem(); + protected JMenuItem averageDistanceTreeMenuItem = new JMenuItem(); + protected JMenuItem neighbourTreeMenuItem = new JMenuItem(); + protected JMenuItem clustalAlignMenuItem = new JMenuItem(); + BorderLayout borderLayout1 = new BorderLayout(); + public JLabel statusBar = new JLabel(); + protected JMenu saveAlignmentMenu = new JMenu(); + protected JMenu outputTextboxMenu = new JMenu(); + protected JRadioButtonMenuItem clustalColour = new JRadioButtonMenuItem(); + protected JRadioButtonMenuItem zappoColour = new JRadioButtonMenuItem(); + protected JRadioButtonMenuItem taylorColour = new JRadioButtonMenuItem(); + protected JRadioButtonMenuItem hydrophobicityColour = new JRadioButtonMenuItem(); + protected JRadioButtonMenuItem helixColour = new JRadioButtonMenuItem(); + protected JRadioButtonMenuItem strandColour = new JRadioButtonMenuItem(); + protected JRadioButtonMenuItem turnColour = new JRadioButtonMenuItem(); + protected JRadioButtonMenuItem buriedColour = 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(); + protected JCheckBoxMenuItem consensusGraphMenuItem = new JCheckBoxMenuItem(); + protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem(); + JMenuItem htmlMenuItem = new JMenuItem(); + JMenuItem overviewMenuItem = new JMenuItem(); + protected JMenuItem undoMenuItem = new JMenuItem(); + protected JMenuItem redoMenuItem = new JMenuItem(); + protected JCheckBoxMenuItem conservationMenuItem = new JCheckBoxMenuItem(); + JRadioButtonMenuItem noColourmenuItem = new JRadioButtonMenuItem(); + protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem(); + JMenuItem printMenuItem = new JMenuItem(); + protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem(); + JMenuItem findMenuItem = new JMenuItem(); + JMenu searchMenu = new JMenu(); + protected JCheckBoxMenuItem abovePIDThreshold = new JCheckBoxMenuItem(); + protected JCheckBoxMenuItem sequenceFeatures = new JCheckBoxMenuItem(); + protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem(); + JMenuItem deleteGroups = new JMenuItem(); + JMenuItem delete = new JMenuItem(); + JMenuItem copy = new JMenuItem(); + JMenuItem cut = new JMenuItem(); + JMenu jMenu1 = new JMenu(); + JMenuItem pasteNew = new JMenuItem(); + JMenuItem pasteThis = new JMenuItem(); + protected JCheckBoxMenuItem applyToAllGroups = new JCheckBoxMenuItem(); + JMenuItem createPNG = new JMenuItem(); + protected JMenuItem font = new JMenuItem(); + protected JCheckBoxMenuItem fullSeqId = new JCheckBoxMenuItem(); + JMenuItem epsFile = new JMenuItem(); + JMenuItem LoadtreeMenuItem = new JMenuItem(); + public GAlignFrame() + { + + + try + { + jbInit(); + setJMenuBar(alignFrameMenuBar); + + JMenuItem item; + // dynamically fill save as menu with available formats + for (int i = 0; i < jalview.io.FormatProperties.getFormats().size(); i++) { + item = new JMenuItem((String) jalview.io.FormatProperties.getFormats().elementAt(i)); + saveAlignmentMenu.add( item ); + item.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + saveAs_actionPerformed(e); + } + }); + + item = new JMenuItem((String) jalview.io.FormatProperties.getFormats().elementAt(i)); + item.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + outputText_actionPerformed(e); + } + }); + + outputTextboxMenu.add( item ); + } + + } + catch(Exception e) + { + e.printStackTrace(); + } + + ButtonGroup colours = new ButtonGroup(); + colours.add(noColourmenuItem); + colours.add(clustalColour); + colours.add(zappoColour); + colours.add(taylorColour); + colours.add(hydrophobicityColour); + colours.add(helixColour); + colours.add(strandColour); + colours.add(turnColour); + colours.add(buriedColour); + colours.add(userDefinedColour); + colours.add(PIDColour); + colours.add(BLOSUM62Colour); + colours.add(nucleotideColour); + } + private void jbInit() throws Exception + { + fileMenu.setMnemonic('F'); + fileMenu.setText("File"); + saveAlignmentMenu.setMnemonic('L'); + saveAlignmentMenu.setText("Save alignment to local file"); + closeMenuItem.setMnemonic('C'); + closeMenuItem.setText("Close"); + closeMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + closeMenuItem_actionPerformed(e); + } + }); + editMenu.setText("Edit"); + viewMenu.setText("View"); + colourMenu.setText("Colour"); + calculateMenu.setText("Calculate"); + alignMenu.setText("Web Service"); + groupsMenuItem.setVisible(false); + groupsMenuItem.setText("Groups"); + groupsMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + groupsMenuItem_actionPerformed(e); + } + }); + selectAllSequenceMenuItem.setText("Select all"); + selectAllSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + selectAllSequenceMenuItem_actionPerformed(e); + } + }); + deselectAllSequenceMenuItem.setText("Clear selection"); + deselectAllSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + deselectAllSequenceMenuItem_actionPerformed(e); + } + }); + invertSequenceMenuItem.setText("Invert sequence selection"); + invertSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + invertSequenceMenuItem_actionPerformed(e); + } + }); + deselectAllColumnsMenuItem.setText("Deselect all columns"); + deselectAllColumnsMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + deselectAllColumnsMenuItem_actionPerformed(e); + } + }); + remove2LeftMenuItem.setText("Remove sequence <- left of selected column"); + remove2LeftMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + remove2LeftMenuItem_actionPerformed(e); + } + }); + remove2RightMenuItem.setText("Remove sequence -> right of selected column"); + remove2RightMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + remove2RightMenuItem_actionPerformed(e); + } + }); + removeGappedColumnMenuItem.setText("Remove gapped columns"); + removeGappedColumnMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + removeGappedColumnMenuItem_actionPerformed(e); + } + }); + removeAllGapsMenuItem.setText("Remove all gaps"); + removeAllGapsMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + removeAllGapsMenuItem_actionPerformed(e); + } + }); + setGapCharMenuItem.setText("Set gap character to \".\""); + setGapCharMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + setGapCharMenuItem_actionPerformed(e); + } + }); + viewBoxesMenuItem.setText("Boxes"); + viewBoxesMenuItem.setState(true); + viewBoxesMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + viewBoxesMenuItem_actionPerformed(e); + } + }); + viewTextMenuItem.setText("Text"); + viewTextMenuItem.setState(true); + viewTextMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + viewTextMenuItem_actionPerformed(e); + } + }); + sortPairwiseMenuItem.setText("Sort by pairwise identity"); + sortPairwiseMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + sortPairwiseMenuItem_actionPerformed(e); + } + }); + sortIDMenuItem.setText("Sort by ID"); + sortIDMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + sortIDMenuItem_actionPerformed(e); + } + }); + sortGroupMenuItem.setText("Sort by group"); + sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + sortGroupMenuItem_actionPerformed(e); + } + }); + sortTreeOrderMenuItem.setText("Sort by tree order"); + sortTreeOrderMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + sortTreeOrderMenuItem_actionPerformed(e); + } + }); + removeRedundancyMenuItem.setText("Remove redundancy"); + removeRedundancyMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + removeRedundancyMenuItem_actionPerformed(e); + } + }); + pairwiseAlignmentMenuItem.setText("Pairwise alignments"); + pairwiseAlignmentMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + pairwiseAlignmentMenuItem_actionPerformed(e); + } + }); + PCAMenuItem.setText("Principal component analysis"); + PCAMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + PCAMenuItem_actionPerformed(e); + } + }); + averageDistanceTreeMenuItem.setText("Average distance tree using PID"); + averageDistanceTreeMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + averageDistanceTreeMenuItem_actionPerformed(e); + } + }); + neighbourTreeMenuItem.setText("Neighbour joining tree using PID"); + neighbourTreeMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + neighbourTreeMenuItem_actionPerformed(e); + } + }); + clustalAlignMenuItem.setText("Clustal alignment"); + clustalAlignMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + clustalAlignMenuItem_actionPerformed(e); + } + }); + this.getContentPane().setLayout(borderLayout1); + alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11)); + statusBar.setBackground(Color.white); + statusBar.setFont(new java.awt.Font("Verdana", 0, 11)); + statusBar.setBorder(BorderFactory.createLineBorder(Color.black)); + statusBar.setText("Status bar"); + outputTextboxMenu.setMnemonic('T'); + outputTextboxMenu.setText("Output alignment via textbox"); + clustalColour.setSelected(false); + clustalColour.setText("Clustalx colours"); + clustalColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + clustalColour_actionPerformed(e); + } + }); + zappoColour.setText("Zappo colour scheme"); + zappoColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + zappoColour_actionPerformed(e); + } + }); + taylorColour.setText("Taylor colour scheme"); + taylorColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + taylorColour_actionPerformed(e); + } + }); + hydrophobicityColour.setText("By hydrophobicity"); + hydrophobicityColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + hydrophobicityColour_actionPerformed(e); + } + }); + helixColour.setText("Helix propensity"); + helixColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + helixColour_actionPerformed(e); + } + }); + strandColour.setText("Strand propensity"); + strandColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + strandColour_actionPerformed(e); + } + }); + turnColour.setText("Turn propensity"); + turnColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + turnColour_actionPerformed(e); + } + }); + buriedColour.setText("Buried index"); + buriedColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + buriedColour_actionPerformed(e); + } + }); + userDefinedColour.setText("User defined colours"); + userDefinedColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + userDefinedColour_actionPerformed(e); + } + }); + PIDColour.setText("Percentage Identity"); + PIDColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + PIDColour_actionPerformed(e); + } + }); + BLOSUM62Colour.setText("BLOSUM62 score"); + BLOSUM62Colour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + BLOSUM62Colour_actionPerformed(e); + } + }); + avDistanceTreeBlosumMenuItem.setText("Average distance tree using BLOSUM62"); + avDistanceTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + avTreeBlosumMenuItem_actionPerformed(e); + } + }); + njTreeBlosumMenuItem.setText("Neighbour joining tree using BLOSUM62"); + njTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + njTreeBlosumMenuItem_actionPerformed(e); + } + }); + consensusGraphMenuItem.setActionCommand(""); + consensusGraphMenuItem.setText("Consensus graph"); + consensusGraphMenuItem.setState(true); + consensusGraphMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + consensusGraphMenuItem_actionPerformed(e); + } + }); + colourTextMenuItem.setText("Colour text"); + colourTextMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + colourTextMenuItem_actionPerformed(e); + } + }); + htmlMenuItem.setText("Output as HTML"); + htmlMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + htmlMenuItem_actionPerformed(e); + } + }); + overviewMenuItem.setText("Overview window"); + overviewMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + 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.setSelected(true); + noColourmenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + noColourmenuItem_actionPerformed(e); + } + }); + wrapMenuItem.setText("Wrap alignment"); + wrapMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + wrapMenuItem_actionPerformed(e); + } + }); + printMenuItem.setText("Print"); + printMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + printMenuItem_actionPerformed(e); + } + }); + renderGapsMenuItem.setText("Render gaps"); + renderGapsMenuItem.setState(true); + renderGapsMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + renderGapsMenuItem_actionPerformed(e); + } + }); + findMenuItem.setText("Find"); + findMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + findMenuItem_actionPerformed(e); + } + }); + searchMenu.setText("Search"); + + abovePIDThreshold.setText("Above PID threshold"); + abovePIDThreshold.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + abovePIDThreshold_actionPerformed(e); + } + }); + sequenceFeatures.setText("Sequence Features"); + sequenceFeatures.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent actionEvent) + { + sequenceFeatures_actionPerformed(actionEvent); + } + }); + nucleotideColour.setText("Nucleotide colours"); + nucleotideColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + nucleotideColour_actionPerformed(e); + } + }); + deleteGroups.setSelected(false); + deleteGroups.setText("Delete all groups"); + deleteGroups.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + deleteGroups_actionPerformed(e); + } + }); + copy.setText("Copy"); + copy.setMnemonic(KeyEvent.VK_C); + + copy.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + copy_actionPerformed(e); + } + }); + cut.setText("Cut"); + cut.setMnemonic(KeyEvent.VK_X); + cut.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + cut_actionPerformed(e); + } + }); + delete.setText("Delete"); + delete.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + delete_actionPerformed(e); + } + }); + jMenu1.setMnemonic('V'); + jMenu1.setText("Paste"); + pasteNew.setText("to new alignment"); + pasteNew.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + pasteNew_actionPerformed(e); + } + }); + pasteThis.setText("add to this alignment"); + pasteThis.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + pasteThis_actionPerformed(e); + } + }); + applyToAllGroups.setText("Apply colour to all groups"); + applyToAllGroups.setState(true); + applyToAllGroups.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + applyToAllGroups_actionPerformed(e); + } + }); + createPNG.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + createPNG_actionPerformed(e); + } + }); + createPNG.setActionCommand("Save as PNG Image"); + createPNG.setText("Save as PNG Image"); + font.setText("Change Font"); + font.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + font_actionPerformed(e); + } + }); + fullSeqId.setText("Show full sequence id"); + fullSeqId.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + fullSeqId_actionPerformed(e); + } + }); + epsFile.setText("Save as EPS file"); + epsFile.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + epsFile_actionPerformed(e); + } + }); + LoadtreeMenuItem.setActionCommand("Load a tree for this sequence set"); + LoadtreeMenuItem.setText("Load assocated tree"); + LoadtreeMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) + { + LoadtreeMenuItem_actionPerformed(e); + } + }); + alignFrameMenuBar.add(fileMenu); + alignFrameMenuBar.add(editMenu); + alignFrameMenuBar.add(searchMenu); + alignFrameMenuBar.add(viewMenu); + alignFrameMenuBar.add(colourMenu); + alignFrameMenuBar.add(calculateMenu); + alignFrameMenuBar.add(alignMenu); + fileMenu.add(saveAlignmentMenu); + fileMenu.add(outputTextboxMenu); + fileMenu.add(htmlMenuItem); + fileMenu.add(epsFile); + fileMenu.add(createPNG); + fileMenu.add(printMenuItem); + fileMenu.addSeparator(); + fileMenu.add(LoadtreeMenuItem); + fileMenu.addSeparator(); + fileMenu.add(closeMenuItem); + editMenu.add(copy); + editMenu.add(jMenu1); + editMenu.add(cut); + editMenu.add(delete); + editMenu.addSeparator(); + editMenu.add(undoMenuItem); + editMenu.add(redoMenuItem); + editMenu.addSeparator(); + editMenu.add(deselectAllSequenceMenuItem); + editMenu.add(selectAllSequenceMenuItem); + editMenu.add(invertSequenceMenuItem); + editMenu.add(deleteGroups); + editMenu.add(groupsMenuItem); + editMenu.addSeparator(); + editMenu.add(deselectAllColumnsMenuItem); + editMenu.add(remove2LeftMenuItem); + editMenu.add(remove2RightMenuItem); + editMenu.addSeparator(); + editMenu.add(removeGappedColumnMenuItem); + editMenu.add(removeAllGapsMenuItem); + editMenu.add(setGapCharMenuItem); + searchMenu.add(findMenuItem); + viewMenu.add(font); + viewMenu.add(fullSeqId); + viewMenu.add(wrapMenuItem); + viewMenu.add(viewBoxesMenuItem); + viewMenu.add(viewTextMenuItem); + viewMenu.add(colourTextMenuItem); + viewMenu.add(renderGapsMenuItem); + viewMenu.add(consensusGraphMenuItem); + viewMenu.add(overviewMenuItem); + viewMenu.add(sequenceFeatures); + colourMenu.add(applyToAllGroups); + colourMenu.add(noColourmenuItem); + colourMenu.add(clustalColour); + colourMenu.add(zappoColour); + colourMenu.add(taylorColour); + colourMenu.add(hydrophobicityColour); + colourMenu.add(helixColour); + colourMenu.add(strandColour); + colourMenu.add(turnColour); + colourMenu.add(buriedColour); + colourMenu.add(nucleotideColour); + colourMenu.add(userDefinedColour); + colourMenu.add(PIDColour); + colourMenu.add(BLOSUM62Colour); + colourMenu.addSeparator(); + colourMenu.add(abovePIDThreshold); + colourMenu.add(conservationMenuItem); + calculateMenu.add(sortPairwiseMenuItem); + calculateMenu.add(sortIDMenuItem); + calculateMenu.add(sortGroupMenuItem); + calculateMenu.add(sortTreeOrderMenuItem); + calculateMenu.add(removeRedundancyMenuItem); + calculateMenu.addSeparator(); + calculateMenu.add(pairwiseAlignmentMenuItem); + calculateMenu.add(PCAMenuItem); + calculateMenu.addSeparator(); + calculateMenu.add(averageDistanceTreeMenuItem); + calculateMenu.add(neighbourTreeMenuItem); + calculateMenu.add(avDistanceTreeBlosumMenuItem); + calculateMenu.add(njTreeBlosumMenuItem); + alignMenu.add(clustalAlignMenuItem); + this.getContentPane().add(statusBar, BorderLayout.SOUTH); + jMenu1.add(pasteNew); + jMenu1.add(pasteThis); + } + + protected void saveAs_actionPerformed(ActionEvent e) + { + + } + + protected void outputText_actionPerformed(ActionEvent e) + { + + } + + protected void htmlMenuItem_actionPerformed(ActionEvent e) + { + + } + + + + + + protected void closeMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void redoMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void undoMenuItem_actionPerformed(ActionEvent e) + { + + } + + + protected void groupsMenuItem_actionPerformed(ActionEvent e) + { + + } + + + protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void invertSequenceMenuItem_actionPerformed(ActionEvent e) + { + + } + + + protected void deselectAllColumnsMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void remove2LeftMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void remove2RightMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void setGapCharMenuItem_actionPerformed(ActionEvent e) + { + + } + + + + + + protected void wrapMenuItem_actionPerformed(ActionEvent e) + { + + } + + + protected void viewBoxesMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void viewTextMenuItem_actionPerformed(ActionEvent e) + { + + } + + + protected void colourTextMenuItem_actionPerformed(ActionEvent e) + { + + } + + + + protected void consensusGraphMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void overviewMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void sortIDMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void sortGroupMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void sortTreeOrderMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void PCAMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void averageDistanceTreeMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e) + { + + } + + + protected void njTreeBlosumMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void avTreeBlosumMenuItem_actionPerformed(ActionEvent e) + { + + } + + + + protected void clustalAlignMenuItem_actionPerformed(ActionEvent e) + { + + } + + + + + protected void clustalColour_actionPerformed(ActionEvent e) + { + + } + + protected void zappoColour_actionPerformed(ActionEvent e) + { + + } + + protected void taylorColour_actionPerformed(ActionEvent e) + { + + } + + + protected void hydrophobicityColour_actionPerformed(ActionEvent e) + { + + } + + protected void helixColour_actionPerformed(ActionEvent e) + { + + } + + protected void strandColour_actionPerformed(ActionEvent e) + { + + } + + protected void turnColour_actionPerformed(ActionEvent e) + { + + } + + protected void buriedColour_actionPerformed(ActionEvent e) + { + + } + + + + protected void userDefinedColour_actionPerformed(ActionEvent e) + { + + } + + protected void PIDColour_actionPerformed(ActionEvent e) + { + + } + + protected void BLOSUM62Colour_actionPerformed(ActionEvent e) + { + + } + + + protected void noColourmenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void conservationMenuItem_actionPerformed(ActionEvent e) + { + + } + + + protected void printMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void renderGapsMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void findMenuItem_actionPerformed(ActionEvent e) + { + + } + + + protected void abovePIDThreshold_actionPerformed(ActionEvent e) { + + } + + public void sequenceFeatures_actionPerformed(ActionEvent actionEvent) + { + + } + + protected void nucleotideColour_actionPerformed(ActionEvent e) + { + + } + + protected void deleteGroups_actionPerformed(ActionEvent e) + { + + } + + protected void copy_actionPerformed(ActionEvent e) + { + + } + + + protected void cut_actionPerformed(ActionEvent e) + { + + } + + protected void delete_actionPerformed(ActionEvent e) + { + + } + + protected void pasteNew_actionPerformed(ActionEvent e) + { + + } + + protected void pasteThis_actionPerformed(ActionEvent e) + { + + } + + protected void applyToAllGroups_actionPerformed(ActionEvent e) + { + + } + + protected void createPNG_actionPerformed(ActionEvent e) + { + + } + + protected void font_actionPerformed(ActionEvent e) + { + + } + + protected void fullSeqId_actionPerformed(ActionEvent e) + { + + } + + protected void epsFile_actionPerformed(ActionEvent e) + { + + } + + protected void LoadtreeMenuItem_actionPerformed(ActionEvent e) { + + } + +} -- 1.7.10.2