2 * Jalview - A Sequence Alignment Editor and Viewer
\r
3 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
5 * This program is free software; you can redistribute it and/or
\r
6 * modify it under the terms of the GNU General Public License
\r
7 * as published by the Free Software Foundation; either version 2
\r
8 * of the License, or (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program; if not, write to the Free Software
\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
19 package jalview.jbgui;
\r
22 import java.awt.event.*;
\r
23 import javax.swing.*;
\r
24 import javax.swing.event.*;
\r
26 import jalview.gui.*;
\r
27 import jalview.schemes.*;
\r
29 public class GAlignFrame
\r
30 extends JInternalFrame
\r
32 protected JMenuBar alignFrameMenuBar = new JMenuBar();
\r
33 protected JMenu fileMenu = new JMenu();
\r
34 protected JMenuItem closeMenuItem = new JMenuItem();
\r
35 protected JMenu editMenu = new JMenu();
\r
36 protected JMenu viewMenu = new JMenu();
\r
37 protected JMenu colourMenu = new JMenu();
\r
38 protected JMenu calculateMenu = new JMenu();
\r
39 protected JMenu webService = new JMenu();
\r
40 protected JMenuItem selectAllSequenceMenuItem = new JMenuItem();
\r
41 protected JMenuItem deselectAllSequenceMenuItem = new JMenuItem();
\r
42 protected JMenuItem invertSequenceMenuItem = new JMenuItem();
\r
43 protected JMenuItem remove2LeftMenuItem = new JMenuItem();
\r
44 protected JMenuItem remove2RightMenuItem = new JMenuItem();
\r
45 protected JMenuItem removeGappedColumnMenuItem = new JMenuItem();
\r
46 protected JMenuItem removeAllGapsMenuItem = new JMenuItem();
\r
47 public JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
\r
48 public JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
\r
49 protected JMenuItem sortPairwiseMenuItem = new JMenuItem();
\r
50 protected JMenuItem sortIDMenuItem = new JMenuItem();
\r
51 protected JMenuItem sortGroupMenuItem = new JMenuItem();
\r
52 protected JMenuItem removeRedundancyMenuItem = new JMenuItem();
\r
53 protected JMenuItem pairwiseAlignmentMenuItem = new JMenuItem();
\r
54 protected JMenuItem PCAMenuItem = new JMenuItem();
\r
55 protected JMenuItem averageDistanceTreeMenuItem = new JMenuItem();
\r
56 protected JMenuItem neighbourTreeMenuItem = new JMenuItem();
\r
57 protected JMenuItem clustalAlignMenuItem = new JMenuItem();
\r
58 BorderLayout borderLayout1 = new BorderLayout();
\r
59 public JLabel statusBar = new JLabel();
\r
60 protected JMenuItem saveAlignmentMenu = new JMenuItem();
\r
61 protected JMenu outputTextboxMenu = new JMenu();
\r
62 protected JRadioButtonMenuItem clustalColour = new JRadioButtonMenuItem();
\r
63 protected JRadioButtonMenuItem zappoColour = new JRadioButtonMenuItem();
\r
64 protected JRadioButtonMenuItem taylorColour = new JRadioButtonMenuItem();
\r
65 protected JRadioButtonMenuItem hydrophobicityColour = new
\r
66 JRadioButtonMenuItem();
\r
67 protected JRadioButtonMenuItem helixColour = new JRadioButtonMenuItem();
\r
68 protected JRadioButtonMenuItem strandColour = new JRadioButtonMenuItem();
\r
69 protected JRadioButtonMenuItem turnColour = new JRadioButtonMenuItem();
\r
70 protected JRadioButtonMenuItem buriedColour = new JRadioButtonMenuItem();
\r
71 protected JRadioButtonMenuItem userDefinedColour = new JRadioButtonMenuItem();
\r
72 protected JRadioButtonMenuItem PIDColour = new JRadioButtonMenuItem();
\r
73 protected JRadioButtonMenuItem BLOSUM62Colour = new JRadioButtonMenuItem();
\r
74 JMenuItem njTreeBlosumMenuItem = new JMenuItem();
\r
75 JMenuItem avDistanceTreeBlosumMenuItem = new JMenuItem();
\r
76 public JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
\r
77 public JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
\r
78 JMenuItem htmlMenuItem = new JMenuItem();
\r
79 JMenuItem overviewMenuItem = new JMenuItem();
\r
80 protected JMenuItem undoMenuItem = new JMenuItem();
\r
81 protected JMenuItem redoMenuItem = new JMenuItem();
\r
82 public JCheckBoxMenuItem conservationMenuItem = new JCheckBoxMenuItem();
\r
83 JRadioButtonMenuItem noColourmenuItem = new JRadioButtonMenuItem();
\r
84 public JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
\r
85 JMenuItem printMenuItem = new JMenuItem();
\r
86 public JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
\r
87 JMenuItem findMenuItem = new JMenuItem();
\r
88 JMenu searchMenu = new JMenu();
\r
89 public JCheckBoxMenuItem abovePIDThreshold = new JCheckBoxMenuItem();
\r
90 public JCheckBoxMenuItem sequenceFeatures = new JCheckBoxMenuItem();
\r
91 protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem();
\r
92 JMenuItem deleteGroups = new JMenuItem();
\r
93 JMenuItem delete = new JMenuItem();
\r
94 JMenuItem copy = new JMenuItem();
\r
95 JMenuItem cut = new JMenuItem();
\r
96 JMenu jMenu1 = new JMenu();
\r
97 JMenuItem pasteNew = new JMenuItem();
\r
98 JMenuItem pasteThis = new JMenuItem();
\r
99 public JCheckBoxMenuItem applyToAllGroups = new JCheckBoxMenuItem();
\r
100 JMenuItem createPNG = new JMenuItem();
\r
101 protected JMenuItem font = new JMenuItem();
\r
102 public JCheckBoxMenuItem fullSeqId = new JCheckBoxMenuItem();
\r
103 JMenuItem epsFile = new JMenuItem();
\r
104 JMenuItem LoadtreeMenuItem = new JMenuItem();
\r
105 JMenuItem jnet = new JMenuItem();
\r
106 public JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
\r
107 public JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
\r
108 public JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
\r
109 JMenuItem modifyPID = new JMenuItem();
\r
110 JMenuItem modifyConservation = new JMenuItem();
\r
111 protected JMenu sortByTreeMenu = new JMenu();
\r
112 protected JMenu sort = new JMenu();
\r
113 JMenu calculate = new JMenu();
\r
114 JMenuItem msaAlignMenuItem = new JMenuItem();
\r
115 JMenu jMenu2 = new JMenu();
\r
116 JMenuItem padGapsMenuitem = new JMenuItem();
\r
117 JMenuItem ClustalRealign = new JMenuItem();
\r
119 public GAlignFrame()
\r
121 ButtonGroup colours = new ButtonGroup();
\r
122 colours.add(noColourmenuItem);
\r
123 colours.add(clustalColour);
\r
124 colours.add(zappoColour);
\r
125 colours.add(taylorColour);
\r
126 colours.add(hydrophobicityColour);
\r
127 colours.add(helixColour);
\r
128 colours.add(strandColour);
\r
129 colours.add(turnColour);
\r
130 colours.add(buriedColour);
\r
131 colours.add(userDefinedColour);
\r
132 colours.add(PIDColour);
\r
133 colours.add(BLOSUM62Colour);
\r
134 colours.add(nucleotideColour);
\r
136 noColourmenuItem.setSelected(true);
\r
138 String defaultColour = Preferences.defaultColour;
\r
140 if (defaultColour != null)
\r
142 int index = ColourSchemeProperty.getColourIndexFromName(defaultColour);
\r
146 case ColourSchemeProperty.CLUSTAL:
\r
147 clustalColour.setSelected(true);
\r
151 case ColourSchemeProperty.BLOSUM:
\r
152 BLOSUM62Colour.setSelected(true);
\r
156 case ColourSchemeProperty.PID:
\r
157 PIDColour.setSelected(true);
\r
161 case ColourSchemeProperty.ZAPPO:
\r
162 zappoColour.setSelected(true);
\r
166 case ColourSchemeProperty.HYDROPHOBIC:
\r
167 hydrophobicityColour.setSelected(true);
\r
171 case ColourSchemeProperty.HELIX:
\r
172 helixColour.setSelected(true);
\r
176 case ColourSchemeProperty.STRAND:
\r
177 strandColour.setSelected(true);
\r
181 case ColourSchemeProperty.TURN:
\r
182 turnColour.setSelected(true);
\r
186 case ColourSchemeProperty.BURIED:
\r
187 buriedColour.setSelected(true);
\r
191 case ColourSchemeProperty.NUCLEOTIDE:
\r
192 nucleotideColour.setSelected(true);
\r
196 case ColourSchemeProperty.USER_DEFINED:
\r
197 userDefinedColour.setSelected(true);
\r
206 setJMenuBar(alignFrameMenuBar);
\r
210 // dynamically fill save as menu with available formats
\r
211 for (int i = 0; i < jalview.io.FormatAdapter.formats.size(); i++)
\r
213 item = new JMenuItem( (String) jalview.io.FormatAdapter.formats.
\r
216 item.addActionListener(new java.awt.event.ActionListener()
\r
218 public void actionPerformed(ActionEvent e)
\r
220 outputText_actionPerformed(e);
\r
224 outputTextboxMenu.add(item);
\r
227 catch (Exception e)
\r
229 e.printStackTrace();
\r
234 private void jbInit()
\r
237 fileMenu.setMnemonic('F');
\r
238 fileMenu.setText("File");
\r
239 saveAlignmentMenu.setMnemonic('L');
\r
240 saveAlignmentMenu.setText("Save As");
\r
241 saveAlignmentMenu.addActionListener(new ActionListener()
\r
243 public void actionPerformed(ActionEvent e)
\r
245 saveAlignmentMenu_actionPerformed(e);
\r
248 closeMenuItem.setMnemonic('C');
\r
249 closeMenuItem.setText("Close");
\r
250 closeMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
252 public void actionPerformed(ActionEvent e)
\r
254 closeMenuItem_actionPerformed(e);
\r
257 editMenu.setText("Edit");
\r
258 viewMenu.setText("View");
\r
259 colourMenu.setText("Colour");
\r
260 calculateMenu.setText("Calculate");
\r
261 webService.setText("Web Service");
\r
262 selectAllSequenceMenuItem.setText("Select all");
\r
263 selectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
264 java.awt.event.KeyEvent.VK_A,
\r
265 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
266 selectAllSequenceMenuItem.addActionListener(new java.awt.event.
\r
269 public void actionPerformed(ActionEvent e)
\r
271 selectAllSequenceMenuItem_actionPerformed(e);
\r
274 deselectAllSequenceMenuItem.setText("Deselect All");
\r
275 deselectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke.
\r
277 java.awt.event.KeyEvent.VK_ESCAPE, 0, false));
\r
278 deselectAllSequenceMenuItem.addActionListener(new java.awt.event.
\r
281 public void actionPerformed(ActionEvent e)
\r
283 deselectAllSequenceMenuItem_actionPerformed(e);
\r
286 invertSequenceMenuItem.setText("Invert Selection");
\r
287 invertSequenceMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
289 public void actionPerformed(ActionEvent e)
\r
291 invertSequenceMenuItem_actionPerformed(e);
\r
294 remove2LeftMenuItem.setText("Remove Left");
\r
295 remove2LeftMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
297 public void actionPerformed(ActionEvent e)
\r
299 remove2LeftMenuItem_actionPerformed(e);
\r
302 remove2RightMenuItem.setText("Remove Right");
\r
303 remove2RightMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
305 public void actionPerformed(ActionEvent e)
\r
307 remove2RightMenuItem_actionPerformed(e);
\r
310 removeGappedColumnMenuItem.setText("Remove Empty Columns");
\r
311 removeGappedColumnMenuItem.addActionListener(new java.awt.event.
\r
314 public void actionPerformed(ActionEvent e)
\r
316 removeGappedColumnMenuItem_actionPerformed(e);
\r
319 removeAllGapsMenuItem.setText("Remove All Gaps");
\r
320 removeAllGapsMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
322 public void actionPerformed(ActionEvent e)
\r
324 removeAllGapsMenuItem_actionPerformed(e);
\r
327 viewBoxesMenuItem.setText("Boxes");
\r
328 viewBoxesMenuItem.setState(true);
\r
329 viewBoxesMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
331 public void actionPerformed(ActionEvent e)
\r
333 viewBoxesMenuItem_actionPerformed(e);
\r
336 viewTextMenuItem.setText("Text");
\r
337 viewTextMenuItem.setState(true);
\r
338 viewTextMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
340 public void actionPerformed(ActionEvent e)
\r
342 viewTextMenuItem_actionPerformed(e);
\r
345 sortPairwiseMenuItem.setText("by Pairwise Identity");
\r
346 sortPairwiseMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
348 public void actionPerformed(ActionEvent e)
\r
350 sortPairwiseMenuItem_actionPerformed(e);
\r
353 sortIDMenuItem.setText("by ID");
\r
354 sortIDMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
356 public void actionPerformed(ActionEvent e)
\r
358 sortIDMenuItem_actionPerformed(e);
\r
361 sortGroupMenuItem.setText("by Group");
\r
362 sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
364 public void actionPerformed(ActionEvent e)
\r
366 sortGroupMenuItem_actionPerformed(e);
\r
369 removeRedundancyMenuItem.setText("Remove Redundancy...");
\r
370 removeRedundancyMenuItem.addActionListener(new java.awt.event.
\r
373 public void actionPerformed(ActionEvent e)
\r
375 removeRedundancyMenuItem_actionPerformed(e);
\r
378 pairwiseAlignmentMenuItem.setText("Pairwise Alignments...");
\r
379 pairwiseAlignmentMenuItem.addActionListener(new java.awt.event.
\r
382 public void actionPerformed(ActionEvent e)
\r
384 pairwiseAlignmentMenuItem_actionPerformed(e);
\r
387 PCAMenuItem.setText("Principal Component Analysis");
\r
388 PCAMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
390 public void actionPerformed(ActionEvent e)
\r
392 PCAMenuItem_actionPerformed(e);
\r
395 averageDistanceTreeMenuItem.setText(
\r
396 "Average Distance Using % Identity");
\r
397 averageDistanceTreeMenuItem.addActionListener(new java.awt.event.
\r
400 public void actionPerformed(ActionEvent e)
\r
402 averageDistanceTreeMenuItem_actionPerformed(e);
\r
405 neighbourTreeMenuItem.setText("Neighbour Joining Using % Identity");
\r
406 neighbourTreeMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
408 public void actionPerformed(ActionEvent e)
\r
410 neighbourTreeMenuItem_actionPerformed(e);
\r
413 clustalAlignMenuItem.setText("Clustal Alignment");
\r
414 clustalAlignMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
416 public void actionPerformed(ActionEvent e)
\r
418 clustalAlignMenuItem_actionPerformed(e);
\r
421 this.getContentPane().setLayout(borderLayout1);
\r
422 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
\r
423 alignFrameMenuBar.addAncestorListener(new AncestorListener()
\r
425 public void ancestorAdded(AncestorEvent event)
\r
427 alignFrameMenuBar_ancestorAdded(event);
\r
430 public void ancestorRemoved(AncestorEvent event)
\r
434 public void ancestorMoved(AncestorEvent event)
\r
438 statusBar.setBackground(Color.white);
\r
439 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
\r
440 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
\r
441 statusBar.setText("Status bar");
\r
442 outputTextboxMenu.setMnemonic('T');
\r
443 outputTextboxMenu.setText("Output to Textbox");
\r
444 clustalColour.setText("Clustalx");
\r
446 clustalColour.addActionListener(new java.awt.event.ActionListener()
\r
448 public void actionPerformed(ActionEvent e)
\r
450 clustalColour_actionPerformed(e);
\r
453 zappoColour.setText("Zappo");
\r
454 zappoColour.addActionListener(new java.awt.event.ActionListener()
\r
456 public void actionPerformed(ActionEvent e)
\r
458 zappoColour_actionPerformed(e);
\r
461 taylorColour.setText("Taylor");
\r
462 taylorColour.addActionListener(new java.awt.event.ActionListener()
\r
464 public void actionPerformed(ActionEvent e)
\r
466 taylorColour_actionPerformed(e);
\r
469 hydrophobicityColour.setText("Hydrophobicity");
\r
470 hydrophobicityColour.addActionListener(new java.awt.event.ActionListener()
\r
472 public void actionPerformed(ActionEvent e)
\r
474 hydrophobicityColour_actionPerformed(e);
\r
477 helixColour.setText("Helix Propensity");
\r
478 helixColour.addActionListener(new java.awt.event.ActionListener()
\r
480 public void actionPerformed(ActionEvent e)
\r
482 helixColour_actionPerformed(e);
\r
485 strandColour.setText("Strand Propensity");
\r
486 strandColour.addActionListener(new java.awt.event.ActionListener()
\r
488 public void actionPerformed(ActionEvent e)
\r
490 strandColour_actionPerformed(e);
\r
493 turnColour.setText("Turn Propensity");
\r
494 turnColour.addActionListener(new java.awt.event.ActionListener()
\r
496 public void actionPerformed(ActionEvent e)
\r
498 turnColour_actionPerformed(e);
\r
501 buriedColour.setText("Buried Index");
\r
502 buriedColour.addActionListener(new java.awt.event.ActionListener()
\r
504 public void actionPerformed(ActionEvent e)
\r
506 buriedColour_actionPerformed(e);
\r
509 userDefinedColour.setText("User Defined...");
\r
510 userDefinedColour.addActionListener(new java.awt.event.ActionListener()
\r
512 public void actionPerformed(ActionEvent e)
\r
514 userDefinedColour_actionPerformed(e);
\r
517 PIDColour.setText("Percentage Identity");
\r
518 PIDColour.addActionListener(new java.awt.event.ActionListener()
\r
520 public void actionPerformed(ActionEvent e)
\r
522 PIDColour_actionPerformed(e);
\r
525 BLOSUM62Colour.setText("BLOSUM62 Score");
\r
526 BLOSUM62Colour.addActionListener(new java.awt.event.ActionListener()
\r
528 public void actionPerformed(ActionEvent e)
\r
530 BLOSUM62Colour_actionPerformed(e);
\r
533 avDistanceTreeBlosumMenuItem.setText(
\r
534 "Average Distance Using BLOSUM62");
\r
535 avDistanceTreeBlosumMenuItem.addActionListener(new java.awt.event.
\r
538 public void actionPerformed(ActionEvent e)
\r
540 avTreeBlosumMenuItem_actionPerformed(e);
\r
543 njTreeBlosumMenuItem.setText("Neighbour Joining using BLOSUM62");
\r
544 njTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
546 public void actionPerformed(ActionEvent e)
\r
548 njTreeBlosumMenuItem_actionPerformed(e);
\r
551 annotationPanelMenuItem.setActionCommand("");
\r
552 annotationPanelMenuItem.setText("Show Annotations");
\r
553 annotationPanelMenuItem.setState(jalview.gui.Preferences.showAnnotation);
\r
554 annotationPanelMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
556 public void actionPerformed(ActionEvent e)
\r
558 annotationPanelMenuItem_actionPerformed(e);
\r
561 colourTextMenuItem.setText("Colour Text");
\r
562 colourTextMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
564 public void actionPerformed(ActionEvent e)
\r
566 colourTextMenuItem_actionPerformed(e);
\r
569 htmlMenuItem.setText("HTML");
\r
570 htmlMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
572 public void actionPerformed(ActionEvent e)
\r
574 htmlMenuItem_actionPerformed(e);
\r
577 overviewMenuItem.setText("Overview Window");
\r
578 overviewMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
580 public void actionPerformed(ActionEvent e)
\r
582 overviewMenuItem_actionPerformed(e);
\r
585 undoMenuItem.setEnabled(false);
\r
586 undoMenuItem.setMnemonic('Z');
\r
587 undoMenuItem.setText("Undo");
\r
588 undoMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
589 java.awt.event.KeyEvent.VK_Z,
\r
590 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
591 undoMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
593 public void actionPerformed(ActionEvent e)
\r
595 undoMenuItem_actionPerformed(e);
\r
598 redoMenuItem.setEnabled(false);
\r
599 redoMenuItem.setMnemonic('0');
\r
600 redoMenuItem.setText("Redo");
\r
601 redoMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
603 public void actionPerformed(ActionEvent e)
\r
605 redoMenuItem_actionPerformed(e);
\r
608 conservationMenuItem.setText("By Conservation");
\r
609 conservationMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
611 public void actionPerformed(ActionEvent e)
\r
613 conservationMenuItem_actionPerformed(e);
\r
616 noColourmenuItem.setText("None");
\r
617 noColourmenuItem.addActionListener(new java.awt.event.ActionListener()
\r
619 public void actionPerformed(ActionEvent e)
\r
621 noColourmenuItem_actionPerformed(e);
\r
624 wrapMenuItem.setText("Wrap");
\r
625 wrapMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
627 public void actionPerformed(ActionEvent e)
\r
629 wrapMenuItem_actionPerformed(e);
\r
632 printMenuItem.setText("Print");
\r
633 printMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
635 public void actionPerformed(ActionEvent e)
\r
637 printMenuItem_actionPerformed(e);
\r
640 renderGapsMenuItem.setText("Show Gaps");
\r
641 renderGapsMenuItem.setState(true);
\r
642 renderGapsMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
644 public void actionPerformed(ActionEvent e)
\r
646 renderGapsMenuItem_actionPerformed(e);
\r
649 findMenuItem.setText("Find...");
\r
650 findMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
651 java.awt.event.KeyEvent.VK_F,
\r
652 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
653 findMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
655 public void actionPerformed(ActionEvent e)
\r
657 findMenuItem_actionPerformed(e);
\r
660 searchMenu.setText("Search");
\r
662 abovePIDThreshold.setText("Above Identity Threshold");
\r
663 abovePIDThreshold.addActionListener(new java.awt.event.ActionListener()
\r
665 public void actionPerformed(ActionEvent e)
\r
667 abovePIDThreshold_actionPerformed(e);
\r
670 sequenceFeatures.setText("Sequence Features");
\r
671 sequenceFeatures.addActionListener(new ActionListener()
\r
673 public void actionPerformed(ActionEvent actionEvent)
\r
675 sequenceFeatures_actionPerformed(actionEvent);
\r
678 nucleotideColour.setText("Nucleotide");
\r
679 nucleotideColour.addActionListener(new java.awt.event.ActionListener()
\r
681 public void actionPerformed(ActionEvent e)
\r
683 nucleotideColour_actionPerformed(e);
\r
686 deleteGroups.setText("Undefine groups");
\r
687 deleteGroups.addActionListener(new java.awt.event.ActionListener()
\r
689 public void actionPerformed(ActionEvent e)
\r
691 deleteGroups_actionPerformed(e);
\r
694 copy.setText("Copy");
\r
695 copy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
696 java.awt.event.KeyEvent.VK_C,
\r
697 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
698 copy.setMnemonic(KeyEvent.VK_C);
\r
700 copy.addActionListener(new java.awt.event.ActionListener()
\r
702 public void actionPerformed(ActionEvent e)
\r
704 copy_actionPerformed(e);
\r
707 cut.setText("Cut");
\r
708 cut.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
709 java.awt.event.KeyEvent.VK_X,
\r
710 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
711 cut.setMnemonic(KeyEvent.VK_X);
\r
712 cut.addActionListener(new java.awt.event.ActionListener()
\r
714 public void actionPerformed(ActionEvent e)
\r
716 cut_actionPerformed(e);
\r
719 delete.setText("Delete");
\r
720 delete.addActionListener(new java.awt.event.ActionListener()
\r
722 public void actionPerformed(ActionEvent e)
\r
724 delete_actionPerformed(e);
\r
727 jMenu1.setMnemonic('V');
\r
728 jMenu1.setText("Paste");
\r
729 pasteNew.setText("To New Alignment");
\r
730 pasteNew.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
731 java.awt.event.KeyEvent.VK_V,
\r
732 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
733 pasteNew.addActionListener(new java.awt.event.ActionListener()
\r
735 public void actionPerformed(ActionEvent e)
\r
737 pasteNew_actionPerformed(e);
\r
740 pasteThis.setText("Add To This Alignment");
\r
741 pasteThis.addActionListener(new java.awt.event.ActionListener()
\r
743 public void actionPerformed(ActionEvent e)
\r
745 pasteThis_actionPerformed(e);
\r
748 applyToAllGroups.setText("Apply Colour To All Groups");
\r
749 applyToAllGroups.setState(true);
\r
750 applyToAllGroups.addActionListener(new java.awt.event.ActionListener()
\r
752 public void actionPerformed(ActionEvent e)
\r
754 applyToAllGroups_actionPerformed(e);
\r
757 createPNG.addActionListener(new java.awt.event.ActionListener()
\r
759 public void actionPerformed(ActionEvent e)
\r
764 createPNG.setActionCommand("Save As PNG Image");
\r
765 createPNG.setText("PNG");
\r
766 font.setText("Font...");
\r
767 font.addActionListener(new java.awt.event.ActionListener()
\r
769 public void actionPerformed(ActionEvent e)
\r
771 font_actionPerformed(e);
\r
774 fullSeqId.setText("Show Full Sequence ID");
\r
775 fullSeqId.setState(true);
\r
776 fullSeqId.addActionListener(new java.awt.event.ActionListener()
\r
778 public void actionPerformed(ActionEvent e)
\r
780 fullSeqId_actionPerformed(e);
\r
783 epsFile.setText("EPS");
\r
784 epsFile.addActionListener(new java.awt.event.ActionListener()
\r
786 public void actionPerformed(ActionEvent e)
\r
791 LoadtreeMenuItem.setActionCommand("Load a tree for this sequence set");
\r
792 LoadtreeMenuItem.setText("Load Assocated Tree");
\r
793 LoadtreeMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
795 public void actionPerformed(ActionEvent e)
\r
797 LoadtreeMenuItem_actionPerformed(e);
\r
800 jnet.setText("JNet");
\r
801 jnet.addActionListener(new java.awt.event.ActionListener()
\r
803 public void actionPerformed(ActionEvent e)
\r
805 jpred_actionPerformed(e);
\r
808 scaleAbove.setVisible(false);
\r
809 scaleAbove.setText("Scale Above");
\r
810 scaleAbove.addActionListener(new java.awt.event.ActionListener()
\r
812 public void actionPerformed(ActionEvent e)
\r
814 scaleAbove_actionPerformed(e);
\r
817 scaleLeft.setVisible(false);
\r
818 scaleLeft.setSelected(true);
\r
819 scaleLeft.setText("Scale Left");
\r
820 scaleLeft.addActionListener(new java.awt.event.ActionListener()
\r
822 public void actionPerformed(ActionEvent e)
\r
824 scaleLeft_actionPerformed(e);
\r
827 scaleRight.setVisible(false);
\r
828 scaleRight.setSelected(true);
\r
829 scaleRight.setText("Scale Right");
\r
830 scaleRight.addActionListener(new java.awt.event.ActionListener()
\r
832 public void actionPerformed(ActionEvent e)
\r
834 scaleRight_actionPerformed(e);
\r
837 modifyPID.setText("Modify Identity Threshold...");
\r
838 modifyPID.addActionListener(new java.awt.event.ActionListener()
\r
840 public void actionPerformed(ActionEvent e)
\r
842 modifyPID_actionPerformed(e);
\r
845 modifyConservation.setText("Modify Conservation Threshold...");
\r
846 modifyConservation.addActionListener(new java.awt.event.ActionListener()
\r
848 public void actionPerformed(ActionEvent e)
\r
850 modifyConservation_actionPerformed(e);
\r
853 sortByTreeMenu.setText("By Tree Order");
\r
854 sort.setText("Sort");
\r
855 calculate.setText("Calculate Tree");
\r
856 msaAlignMenuItem.setText("Muscle Alignment");
\r
857 msaAlignMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
859 public void actionPerformed(ActionEvent e)
\r
861 msaAlignMenuItem_actionPerformed(e);
\r
864 jMenu2.setText("Export");
\r
865 padGapsMenuitem.setText("Pad Gaps");
\r
866 padGapsMenuitem.addActionListener(new ActionListener()
\r
868 public void actionPerformed(ActionEvent e)
\r
870 padGapsMenuitem_actionPerformed(e);
\r
873 ClustalRealign.setText("Clustal Realign");
\r
874 ClustalRealign.addActionListener(new ActionListener()
\r
876 public void actionPerformed(ActionEvent e)
\r
878 ClustalRealign_actionPerformed(e);
\r
881 alignFrameMenuBar.add(fileMenu);
\r
882 alignFrameMenuBar.add(editMenu);
\r
883 alignFrameMenuBar.add(searchMenu);
\r
884 alignFrameMenuBar.add(viewMenu);
\r
885 alignFrameMenuBar.add(colourMenu);
\r
886 alignFrameMenuBar.add(calculateMenu);
\r
887 fileMenu.add(saveAlignmentMenu);
\r
888 fileMenu.add(jMenu2);
\r
889 fileMenu.add(outputTextboxMenu);
\r
890 fileMenu.add(printMenuItem);
\r
891 fileMenu.addSeparator();
\r
892 fileMenu.add(LoadtreeMenuItem);
\r
893 fileMenu.addSeparator();
\r
894 fileMenu.add(closeMenuItem);
\r
895 editMenu.add(undoMenuItem);
\r
896 editMenu.add(redoMenuItem);
\r
898 editMenu.add(copy);
\r
899 editMenu.add(jMenu1);
\r
900 editMenu.add(delete);
\r
901 editMenu.addSeparator();
\r
902 editMenu.add(selectAllSequenceMenuItem);
\r
903 editMenu.add(deselectAllSequenceMenuItem);
\r
904 editMenu.add(invertSequenceMenuItem);
\r
905 editMenu.add(deleteGroups);
\r
906 editMenu.addSeparator();
\r
907 editMenu.add(remove2LeftMenuItem);
\r
908 editMenu.add(remove2RightMenuItem);
\r
909 editMenu.add(removeGappedColumnMenuItem);
\r
910 editMenu.add(removeAllGapsMenuItem);
\r
911 editMenu.add(removeRedundancyMenuItem);
\r
912 editMenu.addSeparator();
\r
913 editMenu.add(padGapsMenuitem);
\r
914 searchMenu.add(findMenuItem);
\r
915 viewMenu.add(font);
\r
916 viewMenu.addSeparator();
\r
917 viewMenu.add(wrapMenuItem);
\r
918 viewMenu.add(fullSeqId);
\r
919 viewMenu.add(scaleAbove);
\r
920 viewMenu.add(scaleLeft);
\r
921 viewMenu.add(scaleRight);
\r
922 viewMenu.add(viewBoxesMenuItem);
\r
923 viewMenu.add(viewTextMenuItem);
\r
924 viewMenu.add(colourTextMenuItem);
\r
925 viewMenu.add(renderGapsMenuItem);
\r
926 viewMenu.add(annotationPanelMenuItem);
\r
927 viewMenu.add(sequenceFeatures);
\r
928 viewMenu.addSeparator();
\r
929 viewMenu.add(overviewMenuItem);
\r
930 colourMenu.add(applyToAllGroups);
\r
931 colourMenu.addSeparator();
\r
932 colourMenu.add(noColourmenuItem);
\r
933 colourMenu.add(clustalColour);
\r
934 colourMenu.add(BLOSUM62Colour);
\r
935 colourMenu.add(PIDColour);
\r
936 colourMenu.add(zappoColour);
\r
937 colourMenu.add(taylorColour);
\r
938 colourMenu.add(hydrophobicityColour);
\r
939 colourMenu.add(helixColour);
\r
940 colourMenu.add(strandColour);
\r
941 colourMenu.add(turnColour);
\r
942 colourMenu.add(buriedColour);
\r
943 colourMenu.add(nucleotideColour);
\r
944 colourMenu.add(userDefinedColour);
\r
945 colourMenu.addSeparator();
\r
946 colourMenu.add(conservationMenuItem);
\r
947 colourMenu.add(modifyConservation);
\r
948 colourMenu.add(abovePIDThreshold);
\r
949 colourMenu.add(modifyPID);
\r
950 calculateMenu.add(sort);
\r
951 calculateMenu.add(calculate);
\r
952 calculateMenu.addSeparator();
\r
953 calculateMenu.add(pairwiseAlignmentMenuItem);
\r
954 calculateMenu.add(PCAMenuItem);
\r
955 calculateMenu.addSeparator();
\r
956 calculateMenu.add(webService);
\r
957 webService.add(clustalAlignMenuItem);
\r
958 webService.add(msaAlignMenuItem);
\r
959 webService.add(jnet);
\r
960 webService.add(ClustalRealign);
\r
961 this.getContentPane().add(statusBar, BorderLayout.SOUTH);
\r
962 jMenu1.add(pasteNew);
\r
963 jMenu1.add(pasteThis);
\r
964 sort.add(sortIDMenuItem);
\r
965 sort.add(sortGroupMenuItem);
\r
966 sort.add(sortPairwiseMenuItem);
\r
967 calculate.add(averageDistanceTreeMenuItem);
\r
968 calculate.add(neighbourTreeMenuItem);
\r
969 calculate.add(avDistanceTreeBlosumMenuItem);
\r
970 calculate.add(njTreeBlosumMenuItem);
\r
971 jMenu2.add(htmlMenuItem);
\r
972 jMenu2.add(epsFile);
\r
973 jMenu2.add(createPNG);
\r
976 protected void outputText_actionPerformed(ActionEvent e)
\r
980 protected void htmlMenuItem_actionPerformed(ActionEvent e)
\r
984 protected void closeMenuItem_actionPerformed(ActionEvent e)
\r
988 protected void redoMenuItem_actionPerformed(ActionEvent e)
\r
992 protected void undoMenuItem_actionPerformed(ActionEvent e)
\r
996 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
\r
1000 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
\r
1004 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
\r
1008 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
\r
1012 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
\r
1016 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
\r
1020 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
\r
1024 protected void wrapMenuItem_actionPerformed(ActionEvent e)
\r
1028 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
\r
1032 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
\r
1036 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
\r
1040 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
\r
1044 protected void overviewMenuItem_actionPerformed(ActionEvent e)
\r
1048 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
\r
1052 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
\r
1056 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
\r
1060 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
\r
1064 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
\r
1068 protected void PCAMenuItem_actionPerformed(ActionEvent e)
\r
1072 protected void averageDistanceTreeMenuItem_actionPerformed(ActionEvent e)
\r
1076 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
\r
1080 protected void njTreeBlosumMenuItem_actionPerformed(ActionEvent e)
\r
1084 protected void avTreeBlosumMenuItem_actionPerformed(ActionEvent e)
\r
1088 protected void clustalAlignMenuItem_actionPerformed(ActionEvent e)
\r
1092 protected void clustalColour_actionPerformed(ActionEvent e)
\r
1096 protected void zappoColour_actionPerformed(ActionEvent e)
\r
1100 protected void taylorColour_actionPerformed(ActionEvent e)
\r
1104 protected void hydrophobicityColour_actionPerformed(ActionEvent e)
\r
1108 protected void helixColour_actionPerformed(ActionEvent e)
\r
1112 protected void strandColour_actionPerformed(ActionEvent e)
\r
1116 protected void turnColour_actionPerformed(ActionEvent e)
\r
1120 protected void buriedColour_actionPerformed(ActionEvent e)
\r
1124 protected void userDefinedColour_actionPerformed(ActionEvent e)
\r
1128 protected void PIDColour_actionPerformed(ActionEvent e)
\r
1132 protected void BLOSUM62Colour_actionPerformed(ActionEvent e)
\r
1136 protected void noColourmenuItem_actionPerformed(ActionEvent e)
\r
1140 protected void conservationMenuItem_actionPerformed(ActionEvent e)
\r
1144 protected void printMenuItem_actionPerformed(ActionEvent e)
\r
1148 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
\r
1152 protected void findMenuItem_actionPerformed(ActionEvent e)
\r
1156 protected void abovePIDThreshold_actionPerformed(ActionEvent e)
\r
1160 public void sequenceFeatures_actionPerformed(ActionEvent actionEvent)
\r
1164 protected void nucleotideColour_actionPerformed(ActionEvent e)
\r
1168 protected void deleteGroups_actionPerformed(ActionEvent e)
\r
1172 protected void copy_actionPerformed(ActionEvent e)
\r
1176 protected void cut_actionPerformed(ActionEvent e)
\r
1180 protected void delete_actionPerformed(ActionEvent e)
\r
1184 protected void pasteNew_actionPerformed(ActionEvent e)
\r
1188 protected void pasteThis_actionPerformed(ActionEvent e)
\r
1192 protected void applyToAllGroups_actionPerformed(ActionEvent e)
\r
1196 public void createPNG(java.io.File f)
\r
1200 protected void font_actionPerformed(ActionEvent e)
\r
1204 protected void fullSeqId_actionPerformed(ActionEvent e)
\r
1208 public void createEPS(java.io.File f)
\r
1212 protected void LoadtreeMenuItem_actionPerformed(ActionEvent e)
\r
1216 protected void jpred_actionPerformed(ActionEvent e)
\r
1220 protected void scaleAbove_actionPerformed(ActionEvent e)
\r
1224 protected void scaleLeft_actionPerformed(ActionEvent e)
\r
1228 protected void scaleRight_actionPerformed(ActionEvent e)
\r
1232 protected void modifyPID_actionPerformed(ActionEvent e)
\r
1236 protected void modifyConservation_actionPerformed(ActionEvent e)
\r
1240 protected void preferences_actionPerformed(ActionEvent e)
\r
1244 protected void msaAlignMenuItem_actionPerformed(ActionEvent e)
\r
1248 protected void alignFrameMenuBar_ancestorAdded(AncestorEvent event)
\r
1252 protected void saveAlignmentMenu_actionPerformed(ActionEvent e)
\r
1256 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
\r
1260 protected void ClustalRealign_actionPerformed(ActionEvent e)
\r