From 9bea55eea55110a19b17d0127903802013fa60ea Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 29 Apr 2005 10:41:47 +0000 Subject: [PATCH] preferences moved to desktop --- src/jalview/gui/AlignFrame.java | 6 - src/jalview/gui/Desktop.java | 10 +- src/jalview/jbgui/GAlignFrame.java | 2409 +++++++++++++++++------------------ src/jalview/jbgui/GDesktop.java | 19 + src/jalview/jbgui/GPreferences.java | 34 +- 5 files changed, 1241 insertions(+), 1237 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index a21aabe..cabb24f 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -533,12 +533,6 @@ public class AlignFrame extends GAlignFrame } - protected void preferences_actionPerformed(ActionEvent e) -{ - Preferences pref = new Preferences(viewport); -} - - public void findMenuItem_actionPerformed(ActionEvent e) { JInternalFrame frame = new JInternalFrame(); diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index ac992f6..fd8a8be 100755 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -218,10 +218,8 @@ this.setDropTarget(new java.awt.dnd.DropTarget(desktop, this)); AlignFrame af = new AlignFrame(new Alignment(sequences)); addInternalFrame(af, file, AlignFrame.NEW_WINDOW_WIDTH, AlignFrame.NEW_WINDOW_HEIGHT); af.statusBar.setText("Successfully loaded file " + file); - String string = Cache.getProperty("SHOW_FULLSCREEN"); try{ - if (string != null) - af.setMaximum(Boolean.valueOf(string).booleanValue()); + af.setMaximum(Preferences.showFullscreen); }catch(Exception ex){} } @@ -342,6 +340,12 @@ this.setDropTarget(new java.awt.dnd.DropTarget(desktop, this)); ex.printStackTrace(); } } + + protected void preferences_actionPerformed(ActionEvent e) + { + Preferences pref = new Preferences(); + } + } diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index b4fae05..22671fb 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -1,1211 +1,1198 @@ -/******************** - * 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 webService = new JMenu(); - protected JMenuItem selectAllSequenceMenuItem = new JMenuItem(); - protected JMenuItem deselectAllSequenceMenuItem = new JMenuItem(); - protected JMenuItem invertSequenceMenuItem = new JMenuItem(); - protected JMenuItem remove2LeftMenuItem = new JMenuItem(); - protected JMenuItem remove2RightMenuItem = new JMenuItem(); - protected JMenuItem removeGappedColumnMenuItem = new JMenuItem(); - protected JMenuItem removeAllGapsMenuItem = 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 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 annotationPanelMenuItem = 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(); - JMenuItem jpred = new JMenuItem(); - protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem(); - protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem(); - protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem(); - JMenuItem modifyPID = new JMenuItem(); - JMenuItem modifyConservation = new JMenuItem(); - protected JMenu sortByTreeMenu = new JMenu(); - JMenu jMenu2 = new JMenu(); - JMenu sort = new JMenu(); - JMenu calculate = new JMenu(); - JMenuItem preferences = new JMenuItem(); - JMenuItem msaAlignMenuItem = 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"); - 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"); - webService.setText("Web Service"); - selectAllSequenceMenuItem.setText("Select all"); - selectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke( - java.awt.event.KeyEvent.VK_A, java.awt.event.KeyEvent.CTRL_MASK, false)); - selectAllSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - selectAllSequenceMenuItem_actionPerformed(e); - } - }); - deselectAllSequenceMenuItem.setText("Deselect All"); - deselectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke. - getKeyStroke(java.awt.event. - KeyEvent.VK_ESCAPE, 0, false)); - deselectAllSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - deselectAllSequenceMenuItem_actionPerformed(e); - } - }); - invertSequenceMenuItem.setText("Invert Selection"); - invertSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - invertSequenceMenuItem_actionPerformed(e); - } - }); - remove2LeftMenuItem.setText("Remove Left"); - remove2LeftMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - remove2LeftMenuItem_actionPerformed(e); - } - }); - remove2RightMenuItem.setText("Remove Right"); - remove2RightMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - remove2RightMenuItem_actionPerformed(e); - } - }); - removeGappedColumnMenuItem.setText("Remove Empty 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); - } - }); - 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("Pairwise Identity"); - sortPairwiseMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - sortPairwiseMenuItem_actionPerformed(e); - } - }); - sortIDMenuItem.setText("ID"); - sortIDMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - sortIDMenuItem_actionPerformed(e); - } - }); - sortGroupMenuItem.setText("Group"); - sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - sortGroupMenuItem_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 Using % Identity..."); - averageDistanceTreeMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - averageDistanceTreeMenuItem_actionPerformed(e); - } - }); - neighbourTreeMenuItem.setText("Neighbour Joining Using % Identity..."); - 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 to Textbox"); - clustalColour.setSelected(false); - clustalColour.setText("Clustalx"); - clustalColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - clustalColour_actionPerformed(e); - } - }); - zappoColour.setText("Zappo"); - zappoColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - zappoColour_actionPerformed(e); - } - }); - taylorColour.setText("Taylor"); - taylorColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - taylorColour_actionPerformed(e); - } - }); - hydrophobicityColour.setText("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..."); - 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 using BLOSUM62..."); - avDistanceTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - avTreeBlosumMenuItem_actionPerformed(e); - } - }); - njTreeBlosumMenuItem.setText("Neighbour Joining using BLOSUM62..."); - njTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - njTreeBlosumMenuItem_actionPerformed(e); - } - }); - annotationPanelMenuItem.setActionCommand(""); - annotationPanelMenuItem.setText("Show Annotations"); - annotationPanelMenuItem.setState(true); - annotationPanelMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - annotationPanelMenuItem_actionPerformed(e); - } - }); - colourTextMenuItem.setText("Colour Text"); - colourTextMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - colourTextMenuItem_actionPerformed(e); - } - }); - htmlMenuItem.setText("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.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt. - event.KeyEvent.VK_Z, java.awt.event.KeyEvent.CTRL_MASK, false)); - 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"); - 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("Show Gaps"); - renderGapsMenuItem.setState(true); - renderGapsMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - renderGapsMenuItem_actionPerformed(e); - } - }); - findMenuItem.setText("Find..."); - findMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt. - event.KeyEvent.VK_F, java.awt.event.KeyEvent.CTRL_MASK, false)); - findMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - findMenuItem_actionPerformed(e); - } - }); - searchMenu.setText("Search"); - - abovePIDThreshold.setText("Above Identity 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"); - nucleotideColour.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - nucleotideColour_actionPerformed(e); - } - }); - deleteGroups.setSelected(false); - deleteGroups.setText("Undefine groups"); - deleteGroups.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - deleteGroups_actionPerformed(e); - } - }); - copy.setText("Copy"); - copy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event. - KeyEvent.VK_C, java.awt.event.KeyEvent.CTRL_MASK, false)); - copy.setMnemonic(KeyEvent.VK_C); - - copy.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - copy_actionPerformed(e); - } - }); - cut.setText("Cut"); - cut.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event. - KeyEvent.VK_X, java.awt.event.KeyEvent.CTRL_MASK, false)); - 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.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event. - KeyEvent.VK_V, java.awt.event.KeyEvent.CTRL_MASK, false)); - 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("PNG"); - font.setText("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("EPS"); - 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); - } - }); - jpred.setText("JPred..."); - jpred.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - jpred_actionPerformed(e); - } - }); - scaleAbove.setVisible(false); - scaleAbove.setText("Scale Above"); - scaleAbove.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - scaleAbove_actionPerformed(e); - } - }); - scaleLeft.setVisible(false); - scaleLeft.setSelected(true); - scaleLeft.setText("Scale Left"); - scaleLeft.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - scaleLeft_actionPerformed(e); - } - }); - scaleRight.setVisible(false); - scaleRight.setSelected(true); - scaleRight.setText("Scale Right"); - scaleRight.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - scaleRight_actionPerformed(e); - } - }); - modifyPID.setText("Modify Identity Threshold..."); - modifyPID.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - modifyPID_actionPerformed(e); - } - }); - modifyConservation.setText("Modify Conservation Threshold..."); - modifyConservation.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - modifyConservation_actionPerformed(e); - } - }); - sortByTreeMenu.setText("Tree Order"); - jMenu2.setText("Save as"); - sort.setText("Sort"); - calculate.setText("Calculate Tree"); - preferences.setText("Preferences..."); - preferences.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent e) - { - preferences_actionPerformed(e); - } - }); - msaAlignMenuItem.setText("Muscle Alignment..."); - msaAlignMenuItem.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent e) { - msaAlignMenuItem_actionPerformed(e); - } - }); - alignFrameMenuBar.add(fileMenu); - alignFrameMenuBar.add(editMenu); - alignFrameMenuBar.add(searchMenu); - alignFrameMenuBar.add(viewMenu); - alignFrameMenuBar.add(colourMenu); - alignFrameMenuBar.add(calculateMenu); - fileMenu.add(saveAlignmentMenu); - fileMenu.add(jMenu2); - fileMenu.add(outputTextboxMenu); - fileMenu.add(printMenuItem); - fileMenu.addSeparator(); - fileMenu.add(LoadtreeMenuItem); - fileMenu.addSeparator(); - fileMenu.add(closeMenuItem); - editMenu.add(undoMenuItem); - editMenu.add(redoMenuItem); - editMenu.add(cut); - editMenu.add(copy); - editMenu.add(jMenu1); - editMenu.add(delete); - editMenu.addSeparator(); - editMenu.add(selectAllSequenceMenuItem); - editMenu.add(deselectAllSequenceMenuItem); - editMenu.add(invertSequenceMenuItem); - editMenu.add(deleteGroups); - editMenu.addSeparator(); - editMenu.add(remove2LeftMenuItem); - editMenu.add(remove2RightMenuItem); - editMenu.add(removeGappedColumnMenuItem); - editMenu.add(removeAllGapsMenuItem); - editMenu.add(removeRedundancyMenuItem); - editMenu.addSeparator(); - editMenu.add(preferences); - - searchMenu.add(findMenuItem); - viewMenu.add(font); - viewMenu.add(fullSeqId); - viewMenu.addSeparator(); - viewMenu.add(wrapMenuItem); - viewMenu.add(scaleAbove); - viewMenu.add(scaleLeft); - viewMenu.add(scaleRight); - viewMenu.addSeparator(); - viewMenu.add(viewBoxesMenuItem); - viewMenu.add(viewTextMenuItem); - viewMenu.add(colourTextMenuItem); - viewMenu.add(renderGapsMenuItem); - viewMenu.add(annotationPanelMenuItem); - viewMenu.add(sequenceFeatures); - viewMenu.addSeparator(); - viewMenu.add(overviewMenuItem); - colourMenu.add(applyToAllGroups); - colourMenu.add(noColourmenuItem); - colourMenu.addSeparator(); - colourMenu.add(clustalColour); - colourMenu.add(BLOSUM62Colour); - colourMenu.add(PIDColour); - 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.addSeparator(); - colourMenu.add(conservationMenuItem); - colourMenu.add(modifyConservation); - colourMenu.add(abovePIDThreshold); - colourMenu.add(modifyPID); - calculateMenu.add(sort); - calculateMenu.add(calculate); - calculateMenu.addSeparator(); - calculateMenu.add(pairwiseAlignmentMenuItem); - calculateMenu.add(PCAMenuItem); - calculateMenu.addSeparator(); - calculateMenu.add(webService); - webService.add(clustalAlignMenuItem); - webService.add(jpred); - webService.add(msaAlignMenuItem); - this.getContentPane().add(statusBar, BorderLayout.SOUTH); - jMenu1.add(pasteNew); - jMenu1.add(pasteThis); - jMenu2.add(htmlMenuItem); - jMenu2.add(epsFile); - jMenu2.add(createPNG); - sort.add(sortIDMenuItem); - sort.add(sortGroupMenuItem); - sort.add(sortByTreeMenu); - sort.add(sortPairwiseMenuItem); - calculate.add(averageDistanceTreeMenuItem); - calculate.add(neighbourTreeMenuItem); - calculate.add(avDistanceTreeBlosumMenuItem); - calculate.add(njTreeBlosumMenuItem); - } - - 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 selectAllSequenceMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void invertSequenceMenuItem_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 wrapMenuItem_actionPerformed(ActionEvent e) - { - - } - - - protected void viewBoxesMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void viewTextMenuItem_actionPerformed(ActionEvent e) - { - - } - - - protected void colourTextMenuItem_actionPerformed(ActionEvent e) - { - - } - - protected void annotationPanelMenuItem_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 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) { - - } - - protected void jpred_actionPerformed(ActionEvent e) - { - - } - - protected void scaleAbove_actionPerformed(ActionEvent e) - { - - } - - protected void scaleLeft_actionPerformed(ActionEvent e) - { - - } - - protected void scaleRight_actionPerformed(ActionEvent e) - { - - } - - protected void modifyPID_actionPerformed(ActionEvent e) - { - - } - - protected void modifyConservation_actionPerformed(ActionEvent e) - { - - } - - protected void preferences_actionPerformed(ActionEvent e) - { - - } - - protected void msaAlignMenuItem_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 webService = new JMenu(); + protected JMenuItem selectAllSequenceMenuItem = new JMenuItem(); + protected JMenuItem deselectAllSequenceMenuItem = new JMenuItem(); + protected JMenuItem invertSequenceMenuItem = new JMenuItem(); + protected JMenuItem remove2LeftMenuItem = new JMenuItem(); + protected JMenuItem remove2RightMenuItem = new JMenuItem(); + protected JMenuItem removeGappedColumnMenuItem = new JMenuItem(); + protected JMenuItem removeAllGapsMenuItem = 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 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 annotationPanelMenuItem = 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(); + JMenuItem jpred = new JMenuItem(); + protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem(); + protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem(); + protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem(); + JMenuItem modifyPID = new JMenuItem(); + JMenuItem modifyConservation = new JMenuItem(); + protected JMenu sortByTreeMenu = new JMenu(); + JMenu jMenu2 = new JMenu(); + JMenu sort = new JMenu(); + JMenu calculate = new JMenu(); + JMenuItem msaAlignMenuItem = 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"); + 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"); + webService.setText("Web Service"); + selectAllSequenceMenuItem.setText("Select all"); + selectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke( + java.awt.event.KeyEvent.VK_A, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false)); + selectAllSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + selectAllSequenceMenuItem_actionPerformed(e); + } + }); + deselectAllSequenceMenuItem.setText("Deselect All"); + deselectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke. + getKeyStroke(java.awt.event. + KeyEvent.VK_ESCAPE, 0, false)); + deselectAllSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + deselectAllSequenceMenuItem_actionPerformed(e); + } + }); + invertSequenceMenuItem.setText("Invert Selection"); + invertSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + invertSequenceMenuItem_actionPerformed(e); + } + }); + remove2LeftMenuItem.setText("Remove Left"); + remove2LeftMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + remove2LeftMenuItem_actionPerformed(e); + } + }); + remove2RightMenuItem.setText("Remove Right"); + remove2RightMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + remove2RightMenuItem_actionPerformed(e); + } + }); + removeGappedColumnMenuItem.setText("Remove Empty 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); + } + }); + 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("Pairwise Identity"); + sortPairwiseMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + sortPairwiseMenuItem_actionPerformed(e); + } + }); + sortIDMenuItem.setText("ID"); + sortIDMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + sortIDMenuItem_actionPerformed(e); + } + }); + sortGroupMenuItem.setText("Group"); + sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + sortGroupMenuItem_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 Using % Identity..."); + averageDistanceTreeMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + averageDistanceTreeMenuItem_actionPerformed(e); + } + }); + neighbourTreeMenuItem.setText("Neighbour Joining Using % Identity..."); + 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 to Textbox"); + clustalColour.setSelected(false); + clustalColour.setText("Clustalx"); + clustalColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + clustalColour_actionPerformed(e); + } + }); + zappoColour.setText("Zappo"); + zappoColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + zappoColour_actionPerformed(e); + } + }); + taylorColour.setText("Taylor"); + taylorColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + taylorColour_actionPerformed(e); + } + }); + hydrophobicityColour.setText("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..."); + 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 using BLOSUM62..."); + avDistanceTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + avTreeBlosumMenuItem_actionPerformed(e); + } + }); + njTreeBlosumMenuItem.setText("Neighbour Joining using BLOSUM62..."); + njTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + njTreeBlosumMenuItem_actionPerformed(e); + } + }); + annotationPanelMenuItem.setActionCommand(""); + annotationPanelMenuItem.setText("Show Annotations"); + annotationPanelMenuItem.setState(true); + annotationPanelMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + annotationPanelMenuItem_actionPerformed(e); + } + }); + colourTextMenuItem.setText("Colour Text"); + colourTextMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + colourTextMenuItem_actionPerformed(e); + } + }); + htmlMenuItem.setText("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.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt. + event.KeyEvent.VK_Z, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false)); + 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"); + 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("Show Gaps"); + renderGapsMenuItem.setState(true); + renderGapsMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + renderGapsMenuItem_actionPerformed(e); + } + }); + findMenuItem.setText("Find..."); + findMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt. + event.KeyEvent.VK_F, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false)); + findMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + findMenuItem_actionPerformed(e); + } + }); + searchMenu.setText("Search"); + + abovePIDThreshold.setText("Above Identity 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"); + nucleotideColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + nucleotideColour_actionPerformed(e); + } + }); + deleteGroups.setSelected(false); + deleteGroups.setText("Undefine groups"); + deleteGroups.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + deleteGroups_actionPerformed(e); + } + }); + copy.setText("Copy"); + copy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event. + KeyEvent.VK_C, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false)); + copy.setMnemonic(KeyEvent.VK_C); + + copy.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + copy_actionPerformed(e); + } + }); + cut.setText("Cut"); + cut.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event. + KeyEvent.VK_X, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false)); + 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.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event. + KeyEvent.VK_V, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false)); + 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("PNG"); + font.setText("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("EPS"); + 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); + } + }); + jpred.setText("JPred..."); + jpred.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + jpred_actionPerformed(e); + } + }); + scaleAbove.setVisible(false); + scaleAbove.setText("Scale Above"); + scaleAbove.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + scaleAbove_actionPerformed(e); + } + }); + scaleLeft.setVisible(false); + scaleLeft.setSelected(true); + scaleLeft.setText("Scale Left"); + scaleLeft.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + scaleLeft_actionPerformed(e); + } + }); + scaleRight.setVisible(false); + scaleRight.setSelected(true); + scaleRight.setText("Scale Right"); + scaleRight.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + scaleRight_actionPerformed(e); + } + }); + modifyPID.setText("Modify Identity Threshold..."); + modifyPID.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + modifyPID_actionPerformed(e); + } + }); + modifyConservation.setText("Modify Conservation Threshold..."); + modifyConservation.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + modifyConservation_actionPerformed(e); + } + }); + sortByTreeMenu.setText("Tree Order"); + jMenu2.setText("Save as"); + sort.setText("Sort"); + calculate.setText("Calculate Tree"); + msaAlignMenuItem.setText("Muscle Alignment..."); + msaAlignMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + msaAlignMenuItem_actionPerformed(e); + } + }); + alignFrameMenuBar.add(fileMenu); + alignFrameMenuBar.add(editMenu); + alignFrameMenuBar.add(searchMenu); + alignFrameMenuBar.add(viewMenu); + alignFrameMenuBar.add(colourMenu); + alignFrameMenuBar.add(calculateMenu); + fileMenu.add(saveAlignmentMenu); + fileMenu.add(jMenu2); + fileMenu.add(outputTextboxMenu); + fileMenu.add(printMenuItem); + fileMenu.addSeparator(); + fileMenu.add(LoadtreeMenuItem); + fileMenu.addSeparator(); + fileMenu.add(closeMenuItem); + editMenu.add(undoMenuItem); + editMenu.add(redoMenuItem); + editMenu.add(cut); + editMenu.add(copy); + editMenu.add(jMenu1); + editMenu.add(delete); + editMenu.add(selectAllSequenceMenuItem); + editMenu.add(deselectAllSequenceMenuItem); + editMenu.add(invertSequenceMenuItem); + editMenu.add(deleteGroups); + editMenu.addSeparator(); + editMenu.add(remove2LeftMenuItem); + editMenu.add(remove2RightMenuItem); + editMenu.add(removeGappedColumnMenuItem); + editMenu.add(removeAllGapsMenuItem); + editMenu.add(removeRedundancyMenuItem); + searchMenu.add(findMenuItem); + viewMenu.add(font); + viewMenu.add(fullSeqId); + viewMenu.addSeparator(); + viewMenu.add(wrapMenuItem); + viewMenu.add(scaleAbove); + viewMenu.add(scaleLeft); + viewMenu.add(scaleRight); + viewMenu.addSeparator(); + viewMenu.add(viewBoxesMenuItem); + viewMenu.add(viewTextMenuItem); + viewMenu.add(colourTextMenuItem); + viewMenu.add(renderGapsMenuItem); + viewMenu.add(annotationPanelMenuItem); + viewMenu.add(sequenceFeatures); + viewMenu.addSeparator(); + viewMenu.add(overviewMenuItem); + colourMenu.add(applyToAllGroups); + colourMenu.add(noColourmenuItem); + colourMenu.addSeparator(); + colourMenu.add(clustalColour); + colourMenu.add(BLOSUM62Colour); + colourMenu.add(PIDColour); + 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.addSeparator(); + colourMenu.add(conservationMenuItem); + colourMenu.add(modifyConservation); + colourMenu.add(abovePIDThreshold); + colourMenu.add(modifyPID); + calculateMenu.add(sort); + calculateMenu.add(calculate); + calculateMenu.addSeparator(); + calculateMenu.add(pairwiseAlignmentMenuItem); + calculateMenu.add(PCAMenuItem); + calculateMenu.addSeparator(); + calculateMenu.add(webService); + webService.add(clustalAlignMenuItem); + webService.add(jpred); + webService.add(msaAlignMenuItem); + this.getContentPane().add(statusBar, BorderLayout.SOUTH); + jMenu1.add(pasteNew); + jMenu1.add(pasteThis); + jMenu2.add(htmlMenuItem); + jMenu2.add(epsFile); + jMenu2.add(createPNG); + sort.add(sortIDMenuItem); + sort.add(sortGroupMenuItem); + sort.add(sortByTreeMenu); + sort.add(sortPairwiseMenuItem); + calculate.add(averageDistanceTreeMenuItem); + calculate.add(neighbourTreeMenuItem); + calculate.add(avDistanceTreeBlosumMenuItem); + calculate.add(njTreeBlosumMenuItem); + } + + 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 selectAllSequenceMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void invertSequenceMenuItem_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 wrapMenuItem_actionPerformed(ActionEvent e) + { + + } + + + protected void viewBoxesMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void viewTextMenuItem_actionPerformed(ActionEvent e) + { + + } + + + protected void colourTextMenuItem_actionPerformed(ActionEvent e) + { + + } + + protected void annotationPanelMenuItem_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 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) { + + } + + protected void jpred_actionPerformed(ActionEvent e) + { + + } + + protected void scaleAbove_actionPerformed(ActionEvent e) + { + + } + + protected void scaleLeft_actionPerformed(ActionEvent e) + { + + } + + protected void scaleRight_actionPerformed(ActionEvent e) + { + + } + + protected void modifyPID_actionPerformed(ActionEvent e) + { + + } + + protected void modifyConservation_actionPerformed(ActionEvent e) + { + + } + + protected void preferences_actionPerformed(ActionEvent e) + { + + } + + protected void msaAlignMenuItem_actionPerformed(ActionEvent e) { + + } + +} diff --git a/src/jalview/jbgui/GDesktop.java b/src/jalview/jbgui/GDesktop.java index 040113f..c0b247b 100755 --- a/src/jalview/jbgui/GDesktop.java +++ b/src/jalview/jbgui/GDesktop.java @@ -26,6 +26,8 @@ public class GDesktop extends JFrame JMenuItem documentationMenuItem = new JMenuItem(); FlowLayout flowLayout1 = new FlowLayout(); protected static JMenu windowMenu = new JMenu(); + JMenu toolsMenu = new JMenu(); + JMenuItem preferences = new JMenuItem(); public GDesktop() { try @@ -98,7 +100,18 @@ public class GDesktop extends JFrame }); this.getContentPane().setLayout(flowLayout1); windowMenu.setText("Window"); + preferences.setText("Preferences..."); + preferences.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + + preferences_actionPerformed(e); + } + }); + toolsMenu.setText("Tools"); DesktopMenubar.add(FileMenu); + DesktopMenubar.add(toolsMenu); DesktopMenubar.add(HelpMenu); DesktopMenubar.add(windowMenu); FileMenu.addSeparator(); @@ -109,6 +122,8 @@ public class GDesktop extends JFrame FileMenu.add(quit); HelpMenu.add(aboutMenuItem); HelpMenu.add(documentationMenuItem); + toolsMenu.add(preferences); + } protected void inputLocalFileMenuItem_actionPerformed(ActionEvent e) @@ -134,4 +149,8 @@ public class GDesktop extends JFrame } + protected void preferences_actionPerformed(ActionEvent e) + { + + } } diff --git a/src/jalview/jbgui/GPreferences.java b/src/jalview/jbgui/GPreferences.java index 06dc81a..8f30fb3 100755 --- a/src/jalview/jbgui/GPreferences.java +++ b/src/jalview/jbgui/GPreferences.java @@ -102,27 +102,27 @@ public class GPreferences jLabel3.setHorizontalAlignment(SwingConstants.RIGHT); jLabel3.setText("Font"); jLabel3.setBounds(new Rectangle(83, 114, 34, 15)); - fontSize.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); - fontSize.setBounds(new Rectangle(304, 109, 49, 21)); - fontStyle.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); - fontStyle.setBounds(new Rectangle(353, 109, 80, 21)); - fontName.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); - fontName.setBounds(new Rectangle(121, 109, 183, 21)); - gapSymbol.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); - gapSymbol.setBounds(new Rectangle(121, 140, 67, 21)); + fontSizeCB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + fontSizeCB.setBounds(new Rectangle(304, 109, 49, 21)); + fontStyleCB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + fontStyleCB.setBounds(new Rectangle(353, 109, 80, 21)); + fontNameCB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + fontNameCB.setBounds(new Rectangle(121, 109, 183, 21)); + gapSymbolCB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + gapSymbolCB.setBounds(new Rectangle(121, 140, 67, 21)); jPanel2.add(annotations); jPanel2.add(fullScreen); jPanel2.add(conservation); jPanel2.add(quality); jPanel2.add(fullID); - jPanel2.add(gapSymbol); + jPanel2.add(gapSymbolCB); jPanel2.add(jLabel1); - jPanel2.add(fontName); + jPanel2.add(fontNameCB); jPanel2.add(jLabel2); jPanel2.add(jLabel3); jPanel2.add(colour); - jPanel2.add(fontSize); - jPanel2.add(fontStyle); + jPanel2.add(fontSizeCB); + jPanel2.add(fontStyleCB); jPanel2.add(identity); jPanel1.add(ok); jPanel1.add(cancel); @@ -133,7 +133,7 @@ public class GPreferences DefaultListCellRenderer dlcr = new DefaultListCellRenderer(); dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER); - gapSymbol.setRenderer(dlcr); + gapSymbolCB.setRenderer(dlcr); } @@ -155,10 +155,10 @@ public class GPreferences protected JComboBox colour = new JComboBox(); JLabel jLabel2 = new JLabel(); JLabel jLabel3 = new JLabel(); - protected JComboBox fontSize = new JComboBox(); - protected JComboBox fontStyle = new JComboBox(); - protected JComboBox fontName = new JComboBox(); - protected JComboBox gapSymbol = new JComboBox(); + protected JComboBox fontSizeCB = new JComboBox(); + protected JComboBox fontStyleCB = new JComboBox(); + protected JComboBox fontNameCB = new JComboBox(); + protected JComboBox gapSymbolCB = new JComboBox(); public void ok_actionPerformed(ActionEvent e) { -- 1.7.10.2