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
25 import jalview.schemes.*;
\r
27 public class GAlignFrame
\r
28 extends JInternalFrame
\r
30 protected JMenuBar alignFrameMenuBar = new JMenuBar();
\r
31 protected JMenu fileMenu = new JMenu();
\r
32 protected JMenuItem closeMenuItem = new JMenuItem();
\r
33 protected JMenu editMenu = new JMenu();
\r
34 protected JMenu viewMenu = new JMenu();
\r
35 protected JMenu colourMenu = new JMenu();
\r
36 protected JMenu calculateMenu = new JMenu();
\r
37 protected JMenu webService = new JMenu();
\r
38 protected JMenuItem webServiceNoServices;
\r
39 protected JMenuItem selectAllSequenceMenuItem = new JMenuItem();
\r
40 protected JMenuItem deselectAllSequenceMenuItem = new JMenuItem();
\r
41 protected JMenuItem invertSequenceMenuItem = new JMenuItem();
\r
42 protected JMenuItem remove2LeftMenuItem = new JMenuItem();
\r
43 protected JMenuItem remove2RightMenuItem = new JMenuItem();
\r
44 protected JMenuItem removeGappedColumnMenuItem = new JMenuItem();
\r
45 protected JMenuItem removeAllGapsMenuItem = new JMenuItem();
\r
46 public JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
\r
47 public JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
\r
48 protected JMenuItem sortPairwiseMenuItem = new JMenuItem();
\r
49 protected JMenuItem sortIDMenuItem = new JMenuItem();
\r
50 protected JMenuItem sortGroupMenuItem = new JMenuItem();
\r
51 protected JMenuItem removeRedundancyMenuItem = new JMenuItem();
\r
52 protected JMenuItem pairwiseAlignmentMenuItem = new JMenuItem();
\r
53 protected JMenuItem PCAMenuItem = new JMenuItem();
\r
54 protected JMenuItem averageDistanceTreeMenuItem = new JMenuItem();
\r
55 protected JMenuItem neighbourTreeMenuItem = new JMenuItem();
\r
56 protected JMenuItem clustalAlignMenuItem = new JMenuItem();
\r
57 BorderLayout borderLayout1 = new BorderLayout();
\r
58 public JLabel statusBar = new JLabel();
\r
59 protected JMenuItem saveAlignmentMenu = new JMenuItem();
\r
60 protected JMenu outputTextboxMenu = new JMenu();
\r
61 protected JRadioButtonMenuItem clustalColour = new JRadioButtonMenuItem();
\r
62 protected JRadioButtonMenuItem zappoColour = new JRadioButtonMenuItem();
\r
63 protected JRadioButtonMenuItem taylorColour = new JRadioButtonMenuItem();
\r
64 protected JRadioButtonMenuItem hydrophobicityColour = new
\r
65 JRadioButtonMenuItem();
\r
66 protected JRadioButtonMenuItem helixColour = new JRadioButtonMenuItem();
\r
67 protected JRadioButtonMenuItem strandColour = new JRadioButtonMenuItem();
\r
68 protected JRadioButtonMenuItem turnColour = new JRadioButtonMenuItem();
\r
69 protected JRadioButtonMenuItem buriedColour = new JRadioButtonMenuItem();
\r
70 protected JRadioButtonMenuItem userDefinedColour = new JRadioButtonMenuItem();
\r
71 protected JRadioButtonMenuItem PIDColour = new JRadioButtonMenuItem();
\r
72 protected JRadioButtonMenuItem BLOSUM62Colour = new JRadioButtonMenuItem();
\r
73 JMenuItem njTreeBlosumMenuItem = new JMenuItem();
\r
74 JMenuItem avDistanceTreeBlosumMenuItem = new JMenuItem();
\r
75 public JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
\r
76 public JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
\r
77 JMenuItem htmlMenuItem = new JMenuItem();
\r
78 JMenuItem overviewMenuItem = new JMenuItem();
\r
79 protected JMenuItem undoMenuItem = new JMenuItem();
\r
80 protected JMenuItem redoMenuItem = new JMenuItem();
\r
81 public JCheckBoxMenuItem conservationMenuItem = new JCheckBoxMenuItem();
\r
82 JRadioButtonMenuItem noColourmenuItem = new JRadioButtonMenuItem();
\r
83 public JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
\r
84 JMenuItem printMenuItem = new JMenuItem();
\r
85 public JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
\r
86 JMenuItem findMenuItem = new JMenuItem();
\r
87 JMenu searchMenu = new JMenu();
\r
88 public JCheckBoxMenuItem abovePIDThreshold = new JCheckBoxMenuItem();
\r
89 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
\r
90 protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem();
\r
91 JMenuItem deleteGroups = new JMenuItem();
\r
92 JMenuItem delete = new JMenuItem();
\r
93 JMenuItem copy = new JMenuItem();
\r
94 JMenuItem cut = new JMenuItem();
\r
95 JMenu jMenu1 = new JMenu();
\r
96 JMenuItem pasteNew = new JMenuItem();
\r
97 JMenuItem pasteThis = new JMenuItem();
\r
98 public JCheckBoxMenuItem applyToAllGroups = new JCheckBoxMenuItem();
\r
99 JMenuItem createPNG = new JMenuItem();
\r
100 protected JMenuItem font = new JMenuItem();
\r
101 public JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
\r
102 JMenuItem epsFile = new JMenuItem();
\r
103 JMenuItem LoadtreeMenuItem = new JMenuItem();
\r
104 public JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
\r
105 public JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
\r
106 public JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
\r
107 protected JMenuItem modifyPID = new JMenuItem();
\r
108 protected JMenuItem modifyConservation = new JMenuItem();
\r
109 protected JMenu sortByTreeMenu = new JMenu();
\r
110 protected JMenu sort = new JMenu();
\r
111 JMenu calculate = new JMenu();
\r
112 JMenu jMenu2 = new JMenu();
\r
113 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
\r
114 protected ButtonGroup colours = new ButtonGroup();
\r
115 JMenuItem vamsasStore = new JMenuItem();
\r
116 protected JCheckBoxMenuItem showTranslation = new JCheckBoxMenuItem();
\r
117 //protected JTabbedPane tabbedPane = new JTabbedPane();
\r
118 public JMenuItem featureSettings = new JMenuItem();
\r
119 JMenuItem fetchSequence = new JMenuItem();
\r
120 protected JCheckBoxMenuItem smoothFont = new JCheckBoxMenuItem();
\r
121 JMenuItem annotationColour = new JMenuItem();
\r
122 JMenuItem fetchSeqFeatures = new JMenuItem();
\r
126 JMenuItem associatedData = new JMenuItem();
\r
127 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
\r
128 public GAlignFrame()
\r
135 setJMenuBar(alignFrameMenuBar);
\r
137 // dynamically fill save as menu with available formats
\r
138 for (int i = 0; i < jalview.io.FormatAdapter.formats.size(); i++)
\r
140 JMenuItem item = new JMenuItem( (String) jalview.io.FormatAdapter.formats.
\r
143 item.addActionListener(new java.awt.event.ActionListener()
\r
145 public void actionPerformed(ActionEvent e)
\r
147 outputText_actionPerformed(e);
\r
151 outputTextboxMenu.add(item);
\r
154 catch (Exception e)
\r
159 if(jalview.gui.UserDefinedColours.getUserColourSchemes()!=null)
\r
161 java.util.Enumeration userColours = jalview.gui.UserDefinedColours.
\r
162 getUserColourSchemes().keys();
\r
164 while (userColours.hasMoreElements())
\r
166 final JRadioButtonMenuItem radioItem = new JRadioButtonMenuItem(userColours.
\r
167 nextElement().toString());
\r
168 radioItem.setName("USER_DEFINED");
\r
169 radioItem.addMouseListener(new MouseAdapter()
\r
171 public void mousePressed(MouseEvent evt)
\r
173 if(evt.isControlDown() || SwingUtilities.isRightMouseButton(evt))
\r
175 radioItem.removeActionListener(radioItem.getActionListeners()[0]);
\r
177 int option = JOptionPane.showInternalConfirmDialog(jalview.gui.Desktop.desktop,
\r
178 "Remove from default list?",
\r
179 "Remove user defined colour",
\r
180 JOptionPane.YES_NO_OPTION);
\r
181 if(option == JOptionPane.YES_OPTION)
\r
183 jalview.gui.UserDefinedColours.removeColourFromDefaults(radioItem.getText());
\r
184 colourMenu.remove(radioItem);
\r
187 radioItem.addActionListener(new ActionListener()
\r
189 public void actionPerformed(ActionEvent evt)
\r
191 userDefinedColour_actionPerformed(evt);
\r
197 radioItem.addActionListener(new ActionListener()
\r
199 public void actionPerformed(ActionEvent evt)
\r
201 userDefinedColour_actionPerformed(evt);
\r
204 colourMenu.insert(radioItem, 15);
\r
205 colours.add(radioItem);
\r
208 colours.add(noColourmenuItem);
\r
209 colours.add(clustalColour);
\r
210 colours.add(zappoColour);
\r
211 colours.add(taylorColour);
\r
212 colours.add(hydrophobicityColour);
\r
213 colours.add(helixColour);
\r
214 colours.add(strandColour);
\r
215 colours.add(turnColour);
\r
216 colours.add(buriedColour);
\r
217 colours.add(userDefinedColour);
\r
218 colours.add(PIDColour);
\r
219 colours.add(BLOSUM62Colour);
\r
220 colours.add(nucleotideColour);
\r
222 setColourSelected(jalview.bin.Cache.getDefault("DEFAULT_COLOUR", "None"));
\r
227 public void setColourSelected(String defaultColour)
\r
230 if (defaultColour != null)
\r
232 int index = ColourSchemeProperty.getColourIndexFromName(defaultColour);
\r
236 case ColourSchemeProperty.NONE:
\r
237 noColourmenuItem.setSelected(true);
\r
239 case ColourSchemeProperty.CLUSTAL:
\r
240 clustalColour.setSelected(true);
\r
244 case ColourSchemeProperty.BLOSUM:
\r
245 BLOSUM62Colour.setSelected(true);
\r
249 case ColourSchemeProperty.PID:
\r
250 PIDColour.setSelected(true);
\r
254 case ColourSchemeProperty.ZAPPO:
\r
255 zappoColour.setSelected(true);
\r
259 case ColourSchemeProperty.TAYLOR:
\r
260 taylorColour.setSelected(true);
\r
263 case ColourSchemeProperty.HYDROPHOBIC:
\r
264 hydrophobicityColour.setSelected(true);
\r
268 case ColourSchemeProperty.HELIX:
\r
269 helixColour.setSelected(true);
\r
273 case ColourSchemeProperty.STRAND:
\r
274 strandColour.setSelected(true);
\r
278 case ColourSchemeProperty.TURN:
\r
279 turnColour.setSelected(true);
\r
283 case ColourSchemeProperty.BURIED:
\r
284 buriedColour.setSelected(true);
\r
288 case ColourSchemeProperty.NUCLEOTIDE:
\r
289 nucleotideColour.setSelected(true);
\r
293 case ColourSchemeProperty.USER_DEFINED:
\r
294 userDefinedColour.setSelected(true);
\r
302 private void jbInit()
\r
305 fileMenu.setMnemonic('F');
\r
306 fileMenu.setText("File");
\r
307 saveAlignmentMenu.setMnemonic('L');
\r
308 saveAlignmentMenu.setText("Save As");
\r
309 saveAlignmentMenu.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.
\r
310 awt.event.KeyEvent.VK_S, java.awt.event.KeyEvent.CTRL_MASK, false));
\r
311 saveAlignmentMenu.addActionListener(new ActionListener()
\r
313 public void actionPerformed(ActionEvent e)
\r
315 saveAlignmentMenu_actionPerformed(e);
\r
318 closeMenuItem.setMnemonic('C');
\r
319 closeMenuItem.setText("Close");
\r
320 closeMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
322 public void actionPerformed(ActionEvent e)
\r
324 closeMenuItem_actionPerformed(e);
\r
327 editMenu.setText("Edit");
\r
328 viewMenu.setText("View");
\r
329 colourMenu.setText("Colour");
\r
330 calculateMenu.setText("Calculate");
\r
331 webService.setText("Web Service");
\r
332 selectAllSequenceMenuItem.setText("Select all");
\r
333 selectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
334 java.awt.event.KeyEvent.VK_A,
\r
335 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
336 selectAllSequenceMenuItem.addActionListener(new java.awt.event.
\r
339 public void actionPerformed(ActionEvent e)
\r
341 selectAllSequenceMenuItem_actionPerformed(e);
\r
344 deselectAllSequenceMenuItem.setText("Deselect All");
\r
345 deselectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke.
\r
347 java.awt.event.KeyEvent.VK_ESCAPE, 0, false));
\r
348 deselectAllSequenceMenuItem.addActionListener(new java.awt.event.
\r
351 public void actionPerformed(ActionEvent e)
\r
353 deselectAllSequenceMenuItem_actionPerformed(e);
\r
356 invertSequenceMenuItem.setText("Invert Selection");
\r
357 invertSequenceMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
359 public void actionPerformed(ActionEvent e)
\r
361 invertSequenceMenuItem_actionPerformed(e);
\r
364 remove2LeftMenuItem.setText("Remove Left");
\r
365 remove2LeftMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
367 public void actionPerformed(ActionEvent e)
\r
369 remove2LeftMenuItem_actionPerformed(e);
\r
372 remove2RightMenuItem.setText("Remove Right");
\r
373 remove2RightMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
375 public void actionPerformed(ActionEvent e)
\r
377 remove2RightMenuItem_actionPerformed(e);
\r
380 removeGappedColumnMenuItem.setText("Remove Empty Columns");
\r
381 removeGappedColumnMenuItem.addActionListener(new java.awt.event.
\r
384 public void actionPerformed(ActionEvent e)
\r
386 removeGappedColumnMenuItem_actionPerformed(e);
\r
389 removeAllGapsMenuItem.setText("Remove All Gaps");
\r
390 removeAllGapsMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
392 public void actionPerformed(ActionEvent e)
\r
394 removeAllGapsMenuItem_actionPerformed(e);
\r
397 viewBoxesMenuItem.setText("Boxes");
\r
398 viewBoxesMenuItem.setState(true);
\r
399 viewBoxesMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
401 public void actionPerformed(ActionEvent e)
\r
403 viewBoxesMenuItem_actionPerformed(e);
\r
406 viewTextMenuItem.setText("Text");
\r
407 viewTextMenuItem.setState(true);
\r
408 viewTextMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
410 public void actionPerformed(ActionEvent e)
\r
412 viewTextMenuItem_actionPerformed(e);
\r
415 sortPairwiseMenuItem.setText("by Pairwise Identity");
\r
416 sortPairwiseMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
418 public void actionPerformed(ActionEvent e)
\r
420 sortPairwiseMenuItem_actionPerformed(e);
\r
423 sortIDMenuItem.setText("by ID");
\r
424 sortIDMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
426 public void actionPerformed(ActionEvent e)
\r
428 sortIDMenuItem_actionPerformed(e);
\r
431 sortGroupMenuItem.setText("by Group");
\r
432 sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
434 public void actionPerformed(ActionEvent e)
\r
436 sortGroupMenuItem_actionPerformed(e);
\r
439 removeRedundancyMenuItem.setText("Remove Redundancy...");
\r
440 removeRedundancyMenuItem.addActionListener(new java.awt.event.
\r
443 public void actionPerformed(ActionEvent e)
\r
445 removeRedundancyMenuItem_actionPerformed(e);
\r
448 pairwiseAlignmentMenuItem.setText("Pairwise Alignments...");
\r
449 pairwiseAlignmentMenuItem.addActionListener(new java.awt.event.
\r
452 public void actionPerformed(ActionEvent e)
\r
454 pairwiseAlignmentMenuItem_actionPerformed(e);
\r
457 PCAMenuItem.setText("Principal Component Analysis");
\r
458 PCAMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
460 public void actionPerformed(ActionEvent e)
\r
462 PCAMenuItem_actionPerformed(e);
\r
465 averageDistanceTreeMenuItem.setText(
\r
466 "Average Distance Using % Identity");
\r
467 averageDistanceTreeMenuItem.addActionListener(new java.awt.event.
\r
470 public void actionPerformed(ActionEvent e)
\r
472 averageDistanceTreeMenuItem_actionPerformed(e);
\r
475 neighbourTreeMenuItem.setText("Neighbour Joining Using % Identity");
\r
476 neighbourTreeMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
478 public void actionPerformed(ActionEvent e)
\r
480 neighbourTreeMenuItem_actionPerformed(e);
\r
483 this.getContentPane().setLayout(borderLayout1);
\r
484 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
\r
485 statusBar.setBackground(Color.white);
\r
486 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
\r
487 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
\r
488 statusBar.setText("Status bar");
\r
489 outputTextboxMenu.setMnemonic('T');
\r
490 outputTextboxMenu.setText("Output to Textbox");
\r
491 clustalColour.setText("Clustalx");
\r
493 clustalColour.addActionListener(new java.awt.event.ActionListener()
\r
495 public void actionPerformed(ActionEvent e)
\r
497 clustalColour_actionPerformed(e);
\r
500 zappoColour.setText("Zappo");
\r
501 zappoColour.addActionListener(new java.awt.event.ActionListener()
\r
503 public void actionPerformed(ActionEvent e)
\r
505 zappoColour_actionPerformed(e);
\r
508 taylorColour.setText("Taylor");
\r
509 taylorColour.addActionListener(new java.awt.event.ActionListener()
\r
511 public void actionPerformed(ActionEvent e)
\r
513 taylorColour_actionPerformed(e);
\r
516 hydrophobicityColour.setText("Hydrophobicity");
\r
517 hydrophobicityColour.addActionListener(new java.awt.event.ActionListener()
\r
519 public void actionPerformed(ActionEvent e)
\r
521 hydrophobicityColour_actionPerformed(e);
\r
524 helixColour.setText("Helix Propensity");
\r
525 helixColour.addActionListener(new java.awt.event.ActionListener()
\r
527 public void actionPerformed(ActionEvent e)
\r
529 helixColour_actionPerformed(e);
\r
532 strandColour.setText("Strand Propensity");
\r
533 strandColour.addActionListener(new java.awt.event.ActionListener()
\r
535 public void actionPerformed(ActionEvent e)
\r
537 strandColour_actionPerformed(e);
\r
540 turnColour.setText("Turn Propensity");
\r
541 turnColour.addActionListener(new java.awt.event.ActionListener()
\r
543 public void actionPerformed(ActionEvent e)
\r
545 turnColour_actionPerformed(e);
\r
548 buriedColour.setText("Buried Index");
\r
549 buriedColour.addActionListener(new java.awt.event.ActionListener()
\r
551 public void actionPerformed(ActionEvent e)
\r
553 buriedColour_actionPerformed(e);
\r
556 userDefinedColour.setText("User Defined...");
\r
557 userDefinedColour.addActionListener(new java.awt.event.ActionListener()
\r
559 public void actionPerformed(ActionEvent e)
\r
561 userDefinedColour_actionPerformed(e);
\r
564 PIDColour.setText("Percentage Identity");
\r
565 PIDColour.addActionListener(new java.awt.event.ActionListener()
\r
567 public void actionPerformed(ActionEvent e)
\r
569 PIDColour_actionPerformed(e);
\r
572 BLOSUM62Colour.setText("BLOSUM62 Score");
\r
573 BLOSUM62Colour.addActionListener(new java.awt.event.ActionListener()
\r
575 public void actionPerformed(ActionEvent e)
\r
577 BLOSUM62Colour_actionPerformed(e);
\r
580 avDistanceTreeBlosumMenuItem.setText(
\r
581 "Average Distance Using BLOSUM62");
\r
582 avDistanceTreeBlosumMenuItem.addActionListener(new java.awt.event.
\r
585 public void actionPerformed(ActionEvent e)
\r
587 avTreeBlosumMenuItem_actionPerformed(e);
\r
590 njTreeBlosumMenuItem.setText("Neighbour Joining using BLOSUM62");
\r
591 njTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
593 public void actionPerformed(ActionEvent e)
\r
595 njTreeBlosumMenuItem_actionPerformed(e);
\r
598 annotationPanelMenuItem.setActionCommand("");
\r
599 annotationPanelMenuItem.setText("Show Annotations");
\r
600 annotationPanelMenuItem.setState( jalview.bin.Cache.getDefault("SHOW_ANNOTATIONS",true));
\r
601 annotationPanelMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
603 public void actionPerformed(ActionEvent e)
\r
605 annotationPanelMenuItem_actionPerformed(e);
\r
608 colourTextMenuItem.setText("Colour Text");
\r
609 colourTextMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
611 public void actionPerformed(ActionEvent e)
\r
613 colourTextMenuItem_actionPerformed(e);
\r
616 htmlMenuItem.setText("HTML");
\r
617 htmlMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
619 public void actionPerformed(ActionEvent e)
\r
621 htmlMenuItem_actionPerformed(e);
\r
624 overviewMenuItem.setText("Overview Window");
\r
625 overviewMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
627 public void actionPerformed(ActionEvent e)
\r
629 overviewMenuItem_actionPerformed(e);
\r
632 undoMenuItem.setEnabled(false);
\r
633 undoMenuItem.setMnemonic('Z');
\r
634 undoMenuItem.setText("Undo");
\r
635 undoMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
636 java.awt.event.KeyEvent.VK_Z,
\r
637 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
638 undoMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
640 public void actionPerformed(ActionEvent e)
\r
642 undoMenuItem_actionPerformed(e);
\r
645 redoMenuItem.setEnabled(false);
\r
646 redoMenuItem.setMnemonic('0');
\r
647 redoMenuItem.setText("Redo");
\r
648 redoMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
650 public void actionPerformed(ActionEvent e)
\r
652 redoMenuItem_actionPerformed(e);
\r
655 conservationMenuItem.setText("By Conservation");
\r
656 conservationMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
658 public void actionPerformed(ActionEvent e)
\r
660 conservationMenuItem_actionPerformed(e);
\r
663 noColourmenuItem.setText("None");
\r
664 noColourmenuItem.addActionListener(new java.awt.event.ActionListener()
\r
666 public void actionPerformed(ActionEvent e)
\r
668 noColourmenuItem_actionPerformed(e);
\r
671 wrapMenuItem.setText("Wrap");
\r
672 wrapMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
674 public void actionPerformed(ActionEvent e)
\r
676 wrapMenuItem_actionPerformed(e);
\r
679 printMenuItem.setText("Print");
\r
680 printMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
682 public void actionPerformed(ActionEvent e)
\r
684 printMenuItem_actionPerformed(e);
\r
687 renderGapsMenuItem.setText("Show Gaps");
\r
688 renderGapsMenuItem.setState(true);
\r
689 renderGapsMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
691 public void actionPerformed(ActionEvent e)
\r
693 renderGapsMenuItem_actionPerformed(e);
\r
696 findMenuItem.setText("Find...");
\r
697 findMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
698 java.awt.event.KeyEvent.VK_F,
\r
699 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
700 findMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
702 public void actionPerformed(ActionEvent e)
\r
704 findMenuItem_actionPerformed(e);
\r
707 searchMenu.setText("Search");
\r
709 abovePIDThreshold.setText("Above Identity Threshold");
\r
710 abovePIDThreshold.addActionListener(new java.awt.event.ActionListener()
\r
712 public void actionPerformed(ActionEvent e)
\r
714 abovePIDThreshold_actionPerformed(e);
\r
717 showSeqFeatures.setText("Show Sequence Features");
\r
718 showSeqFeatures.addActionListener(new ActionListener()
\r
720 public void actionPerformed(ActionEvent actionEvent)
\r
722 showSeqFeatures_actionPerformed(actionEvent);
\r
725 nucleotideColour.setText("Nucleotide");
\r
726 nucleotideColour.addActionListener(new java.awt.event.ActionListener()
\r
728 public void actionPerformed(ActionEvent e)
\r
730 nucleotideColour_actionPerformed(e);
\r
733 deleteGroups.setText("Undefine groups");
\r
734 deleteGroups.addActionListener(new java.awt.event.ActionListener()
\r
736 public void actionPerformed(ActionEvent e)
\r
738 deleteGroups_actionPerformed(e);
\r
741 copy.setText("Copy");
\r
742 copy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
743 java.awt.event.KeyEvent.VK_C,
\r
744 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
745 copy.setMnemonic(KeyEvent.VK_C);
\r
747 copy.addActionListener(new java.awt.event.ActionListener()
\r
749 public void actionPerformed(ActionEvent e)
\r
751 copy_actionPerformed(e);
\r
754 cut.setText("Cut");
\r
755 cut.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
756 java.awt.event.KeyEvent.VK_X,
\r
757 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
758 cut.setMnemonic(KeyEvent.VK_X);
\r
759 cut.addActionListener(new java.awt.event.ActionListener()
\r
761 public void actionPerformed(ActionEvent e)
\r
763 cut_actionPerformed(e);
\r
766 delete.setText("Delete");
\r
767 delete.addActionListener(new java.awt.event.ActionListener()
\r
769 public void actionPerformed(ActionEvent e)
\r
771 delete_actionPerformed(e);
\r
774 jMenu1.setMnemonic('V');
\r
775 jMenu1.setText("Paste");
\r
776 pasteNew.setText("To New Alignment");
\r
777 pasteNew.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
\r
778 java.awt.event.KeyEvent.VK_V,
\r
779 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
\r
780 pasteNew.addActionListener(new java.awt.event.ActionListener()
\r
782 public void actionPerformed(ActionEvent e)
\r
784 pasteNew_actionPerformed(e);
\r
787 pasteThis.setText("Add To This Alignment");
\r
788 pasteThis.addActionListener(new java.awt.event.ActionListener()
\r
790 public void actionPerformed(ActionEvent e)
\r
792 pasteThis_actionPerformed(e);
\r
795 applyToAllGroups.setText("Apply Colour To All Groups");
\r
796 applyToAllGroups.setState(true);
\r
797 applyToAllGroups.addActionListener(new java.awt.event.ActionListener()
\r
799 public void actionPerformed(ActionEvent e)
\r
801 applyToAllGroups_actionPerformed(e);
\r
804 createPNG.addActionListener(new java.awt.event.ActionListener()
\r
806 public void actionPerformed(ActionEvent e)
\r
811 createPNG.setActionCommand("Save As PNG Image");
\r
812 createPNG.setText("PNG");
\r
813 font.setText("Font...");
\r
814 font.addActionListener(new java.awt.event.ActionListener()
\r
816 public void actionPerformed(ActionEvent e)
\r
818 font_actionPerformed(e);
\r
822 seqLimits.setText("Show Sequence Limits");
\r
823 seqLimits.setState( jalview.bin.Cache.getDefault("SHOW_JVSUFFIX",true));
\r
824 seqLimits.addActionListener(new java.awt.event.ActionListener()
\r
826 public void actionPerformed(ActionEvent e)
\r
828 seqLimit_actionPerformed(e);
\r
831 epsFile.setText("EPS");
\r
832 epsFile.addActionListener(new java.awt.event.ActionListener()
\r
834 public void actionPerformed(ActionEvent e)
\r
839 LoadtreeMenuItem.setActionCommand("Load a tree for this sequence set");
\r
840 LoadtreeMenuItem.setText("Load Associated Tree");
\r
841 LoadtreeMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
843 public void actionPerformed(ActionEvent e)
\r
845 LoadtreeMenuItem_actionPerformed(e);
\r
848 scaleAbove.setVisible(false);
\r
849 scaleAbove.setText("Scale Above");
\r
850 scaleAbove.addActionListener(new java.awt.event.ActionListener()
\r
852 public void actionPerformed(ActionEvent e)
\r
854 scaleAbove_actionPerformed(e);
\r
857 scaleLeft.setVisible(false);
\r
858 scaleLeft.setSelected(true);
\r
859 scaleLeft.setText("Scale Left");
\r
860 scaleLeft.addActionListener(new java.awt.event.ActionListener()
\r
862 public void actionPerformed(ActionEvent e)
\r
864 scaleLeft_actionPerformed(e);
\r
867 scaleRight.setVisible(false);
\r
868 scaleRight.setSelected(true);
\r
869 scaleRight.setText("Scale Right");
\r
870 scaleRight.addActionListener(new java.awt.event.ActionListener()
\r
872 public void actionPerformed(ActionEvent e)
\r
874 scaleRight_actionPerformed(e);
\r
877 modifyPID.setText("Modify Identity Threshold...");
\r
878 modifyPID.addActionListener(new java.awt.event.ActionListener()
\r
880 public void actionPerformed(ActionEvent e)
\r
882 modifyPID_actionPerformed(e);
\r
885 modifyConservation.setText("Modify Conservation Threshold...");
\r
886 modifyConservation.addActionListener(new java.awt.event.ActionListener()
\r
888 public void actionPerformed(ActionEvent e)
\r
890 modifyConservation_actionPerformed(e);
\r
893 sortByTreeMenu.setText("By Tree Order");
\r
894 sort.setText("Sort");
\r
895 calculate.setText("Calculate Tree");
\r
897 jMenu2.setText("Export");
\r
898 padGapsMenuitem.setText("Pad Gaps");
\r
899 padGapsMenuitem.setState( jalview.bin.Cache.getDefault("PAD_GAPS", false));
\r
900 padGapsMenuitem.addActionListener(new ActionListener()
\r
902 public void actionPerformed(ActionEvent e)
\r
904 padGapsMenuitem_actionPerformed(e);
\r
907 vamsasStore.setVisible(false);
\r
908 vamsasStore.setText("VAMSAS store");
\r
909 vamsasStore.addActionListener(new ActionListener()
\r
911 public void actionPerformed(ActionEvent e)
\r
913 vamsasStore_actionPerformed(e);
\r
916 showTranslation.setText("Translate cDNA");
\r
917 showTranslation.addActionListener(new ActionListener()
\r
919 public void actionPerformed(ActionEvent e)
\r
921 showTranslation_actionPerformed(e);
\r
925 /* tabbedPane.addChangeListener(new ChangeListener()
\r
927 public void stateChanged(ChangeEvent ece)
\r
933 featureSettings.setText("Feature Settings...");
\r
934 featureSettings.addActionListener(new ActionListener()
\r
936 public void actionPerformed(ActionEvent e)
\r
938 featureSettings_actionPerformed(e);
\r
941 fetchSequence.setText("Fetch Sequence(s)...");
\r
942 fetchSequence.addActionListener(new ActionListener()
\r
944 public void actionPerformed(ActionEvent e)
\r
946 fetchSequence_actionPerformed(e);
\r
949 smoothFont.setText("Smooth Fonts");
\r
950 smoothFont.addActionListener(new ActionListener()
\r
952 public void actionPerformed(ActionEvent e)
\r
954 smoothFont_actionPerformed(e);
\r
957 smoothFont.setState( jalview.bin.Cache.getDefault("ANTI_ALIAS",false));
\r
958 annotationColour.setText("By Annotation...");
\r
959 annotationColour.addActionListener(new ActionListener()
\r
961 public void actionPerformed(ActionEvent e)
\r
963 annotationColour_actionPerformed(e);
\r
966 fetchSeqFeatures.setText("Fetch Sequence Features");
\r
967 fetchSeqFeatures.addActionListener(new ActionListener()
\r
969 public void actionPerformed(ActionEvent e)
\r
971 fetchSeqFeatures_actionPerformed(e);
\r
974 associatedData.setText("Load Features / Annotations");
\r
975 associatedData.addActionListener(new ActionListener()
\r
977 public void actionPerformed(ActionEvent e)
\r
979 associatedData_actionPerformed(e);
\r
982 autoCalculate.setText("Autocalculate Consensus");
\r
983 autoCalculate.setState( jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
\r
984 autoCalculate.addActionListener(new ActionListener()
\r
986 public void actionPerformed(ActionEvent e)
\r
988 autoCalculate_actionPerformed(e);
\r
991 alignFrameMenuBar.add(fileMenu);
\r
992 alignFrameMenuBar.add(editMenu);
\r
993 alignFrameMenuBar.add(searchMenu);
\r
994 alignFrameMenuBar.add(viewMenu);
\r
995 alignFrameMenuBar.add(colourMenu);
\r
996 alignFrameMenuBar.add(calculateMenu);
\r
997 alignFrameMenuBar.add(webService);
\r
998 fileMenu.add(fetchSequence);
\r
999 fileMenu.addSeparator();
\r
1000 fileMenu.add(vamsasStore);
\r
1001 fileMenu.add(saveAlignmentMenu);
\r
1002 fileMenu.add(jMenu2);
\r
1003 fileMenu.add(outputTextboxMenu);
\r
1004 fileMenu.add(printMenuItem);
\r
1005 fileMenu.addSeparator();
\r
1006 fileMenu.add(LoadtreeMenuItem);
\r
1007 fileMenu.add(associatedData);
\r
1008 fileMenu.addSeparator();
\r
1009 fileMenu.add(closeMenuItem);
\r
1010 editMenu.add(undoMenuItem);
\r
1011 editMenu.add(redoMenuItem);
\r
1012 editMenu.add(cut);
\r
1013 editMenu.add(copy);
\r
1014 editMenu.add(jMenu1);
\r
1015 editMenu.add(delete);
\r
1016 editMenu.addSeparator();
\r
1017 editMenu.add(selectAllSequenceMenuItem);
\r
1018 editMenu.add(deselectAllSequenceMenuItem);
\r
1019 editMenu.add(invertSequenceMenuItem);
\r
1020 editMenu.add(deleteGroups);
\r
1021 editMenu.addSeparator();
\r
1022 editMenu.add(remove2LeftMenuItem);
\r
1023 editMenu.add(remove2RightMenuItem);
\r
1024 editMenu.add(removeGappedColumnMenuItem);
\r
1025 editMenu.add(removeAllGapsMenuItem);
\r
1026 editMenu.add(removeRedundancyMenuItem);
\r
1027 editMenu.addSeparator();
\r
1028 editMenu.add(padGapsMenuitem);
\r
1029 searchMenu.add(findMenuItem);
\r
1030 viewMenu.add(font);
\r
1031 viewMenu.add(smoothFont);
\r
1032 viewMenu.addSeparator();
\r
1033 viewMenu.add(wrapMenuItem);
\r
1034 viewMenu.add(seqLimits);
\r
1035 viewMenu.add(scaleAbove);
\r
1036 viewMenu.add(scaleLeft);
\r
1037 viewMenu.add(scaleRight);
\r
1038 viewMenu.add(viewBoxesMenuItem);
\r
1039 viewMenu.add(viewTextMenuItem);
\r
1040 viewMenu.add(colourTextMenuItem);
\r
1041 viewMenu.add(renderGapsMenuItem);
\r
1042 viewMenu.add(annotationPanelMenuItem);
\r
1043 viewMenu.addSeparator();
\r
1044 viewMenu.add(fetchSeqFeatures);
\r
1045 viewMenu.add(showSeqFeatures);
\r
1046 viewMenu.add(featureSettings);
\r
1047 viewMenu.addSeparator();
\r
1048 viewMenu.add(overviewMenuItem);
\r
1049 colourMenu.add(applyToAllGroups);
\r
1050 colourMenu.addSeparator();
\r
1051 colourMenu.add(noColourmenuItem);
\r
1052 colourMenu.add(clustalColour);
\r
1053 colourMenu.add(BLOSUM62Colour);
\r
1054 colourMenu.add(PIDColour);
\r
1055 colourMenu.add(zappoColour);
\r
1056 colourMenu.add(taylorColour);
\r
1057 colourMenu.add(hydrophobicityColour);
\r
1058 colourMenu.add(helixColour);
\r
1059 colourMenu.add(strandColour);
\r
1060 colourMenu.add(turnColour);
\r
1061 colourMenu.add(buriedColour);
\r
1062 colourMenu.add(nucleotideColour);
\r
1063 colourMenu.add(userDefinedColour);
\r
1064 colourMenu.addSeparator();
\r
1065 colourMenu.add(conservationMenuItem);
\r
1066 colourMenu.add(modifyConservation);
\r
1067 colourMenu.add(abovePIDThreshold);
\r
1068 colourMenu.add(modifyPID);
\r
1069 colourMenu.add(annotationColour);
\r
1070 calculateMenu.add(sort);
\r
1071 calculateMenu.add(calculate);
\r
1072 calculateMenu.addSeparator();
\r
1073 calculateMenu.add(pairwiseAlignmentMenuItem);
\r
1074 calculateMenu.add(PCAMenuItem);
\r
1075 calculateMenu.addSeparator();
\r
1076 calculateMenu.add(showTranslation);
\r
1077 calculateMenu.add(autoCalculate);
\r
1078 webServiceNoServices=new JMenuItem("<No Services>");
\r
1079 webService.add(webServiceNoServices);
\r
1080 this.getContentPane().add(statusBar, BorderLayout.SOUTH);
\r
1081 // this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
\r
1082 jMenu1.add(pasteNew);
\r
1083 jMenu1.add(pasteThis);
\r
1084 sort.add(sortIDMenuItem);
\r
1085 sort.add(sortGroupMenuItem);
\r
1086 sort.add(sortPairwiseMenuItem);
\r
1087 calculate.add(averageDistanceTreeMenuItem);
\r
1088 calculate.add(neighbourTreeMenuItem);
\r
1089 calculate.add(avDistanceTreeBlosumMenuItem);
\r
1090 calculate.add(njTreeBlosumMenuItem);
\r
1091 jMenu2.add(htmlMenuItem);
\r
1092 jMenu2.add(epsFile);
\r
1093 jMenu2.add(createPNG);
\r
1096 protected void outputText_actionPerformed(ActionEvent e)
\r
1100 protected void htmlMenuItem_actionPerformed(ActionEvent e)
\r
1104 protected void closeMenuItem_actionPerformed(ActionEvent e)
\r
1108 protected void redoMenuItem_actionPerformed(ActionEvent e)
\r
1112 protected void undoMenuItem_actionPerformed(ActionEvent e)
\r
1116 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
\r
1120 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
\r
1124 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
\r
1128 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
\r
1132 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
\r
1136 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
\r
1140 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
\r
1144 protected void wrapMenuItem_actionPerformed(ActionEvent e)
\r
1148 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
\r
1152 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
\r
1156 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
\r
1160 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
\r
1164 protected void overviewMenuItem_actionPerformed(ActionEvent e)
\r
1168 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
\r
1172 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
\r
1176 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
\r
1180 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
\r
1184 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
\r
1188 protected void PCAMenuItem_actionPerformed(ActionEvent e)
\r
1192 protected void averageDistanceTreeMenuItem_actionPerformed(ActionEvent e)
\r
1196 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
\r
1200 protected void njTreeBlosumMenuItem_actionPerformed(ActionEvent e)
\r
1204 protected void avTreeBlosumMenuItem_actionPerformed(ActionEvent e)
\r
1208 protected void clustalColour_actionPerformed(ActionEvent e)
\r
1212 protected void zappoColour_actionPerformed(ActionEvent e)
\r
1216 protected void taylorColour_actionPerformed(ActionEvent e)
\r
1220 protected void hydrophobicityColour_actionPerformed(ActionEvent e)
\r
1224 protected void helixColour_actionPerformed(ActionEvent e)
\r
1228 protected void strandColour_actionPerformed(ActionEvent e)
\r
1232 protected void turnColour_actionPerformed(ActionEvent e)
\r
1236 protected void buriedColour_actionPerformed(ActionEvent e)
\r
1240 protected void userDefinedColour_actionPerformed(ActionEvent e)
\r
1244 protected void PIDColour_actionPerformed(ActionEvent e)
\r
1248 protected void BLOSUM62Colour_actionPerformed(ActionEvent e)
\r
1252 protected void noColourmenuItem_actionPerformed(ActionEvent e)
\r
1256 protected void conservationMenuItem_actionPerformed(ActionEvent e)
\r
1260 protected void printMenuItem_actionPerformed(ActionEvent e)
\r
1264 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
\r
1268 protected void findMenuItem_actionPerformed(ActionEvent e)
\r
1272 protected void abovePIDThreshold_actionPerformed(ActionEvent e)
\r
1276 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
\r
1280 protected void nucleotideColour_actionPerformed(ActionEvent e)
\r
1284 protected void deleteGroups_actionPerformed(ActionEvent e)
\r
1288 protected void copy_actionPerformed(ActionEvent e)
\r
1292 protected void cut_actionPerformed(ActionEvent e)
\r
1296 protected void delete_actionPerformed(ActionEvent e)
\r
1300 protected void pasteNew_actionPerformed(ActionEvent e)
\r
1304 protected void pasteThis_actionPerformed(ActionEvent e)
\r
1308 protected void applyToAllGroups_actionPerformed(ActionEvent e)
\r
1312 public void createPNG(java.io.File f)
\r
1316 protected void font_actionPerformed(ActionEvent e)
\r
1320 protected void seqLimit_actionPerformed(ActionEvent e)
\r
1324 public void seqDBRef_actionPerformed(ActionEvent e)
\r
1330 public void createEPS(java.io.File f)
\r
1334 protected void LoadtreeMenuItem_actionPerformed(ActionEvent e)
\r
1338 protected void jpred_actionPerformed(ActionEvent e)
\r
1342 protected void scaleAbove_actionPerformed(ActionEvent e)
\r
1346 protected void scaleLeft_actionPerformed(ActionEvent e)
\r
1350 protected void scaleRight_actionPerformed(ActionEvent e)
\r
1354 protected void modifyPID_actionPerformed(ActionEvent e)
\r
1358 protected void modifyConservation_actionPerformed(ActionEvent e)
\r
1364 protected void saveAlignmentMenu_actionPerformed(ActionEvent e)
\r
1368 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
\r
1373 public void vamsasStore_actionPerformed(ActionEvent e)
\r
1378 public void vamsasLoad_actionPerformed(ActionEvent e)
\r
1383 public void showTranslation_actionPerformed(ActionEvent e)
\r
1388 public void featureSettings_actionPerformed(ActionEvent e)
\r
1393 public void fetchSequence_actionPerformed(ActionEvent e)
\r
1398 public void smoothFont_actionPerformed(ActionEvent e)
\r
1403 public void annotationColour_actionPerformed(ActionEvent e)
\r
1408 public void fetchSeqFeatures_actionPerformed(ActionEvent e)
\r
1413 public void associatedData_actionPerformed(ActionEvent e)
\r
1418 public void autoCalculate_actionPerformed(ActionEvent e)
\r