2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
3 * Copyright (C) 2014 The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.jbgui;
23 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
24 import jalview.bin.Cache;
25 import jalview.gui.JvSwingUtils;
26 import jalview.gui.Preferences;
27 import jalview.schemes.ColourSchemeProperty;
28 import jalview.util.MessageManager;
30 import java.awt.BorderLayout;
31 import java.awt.Color;
32 import java.awt.GridLayout;
33 import java.awt.Toolkit;
34 import java.awt.event.ActionEvent;
35 import java.awt.event.ActionListener;
36 import java.awt.event.FocusAdapter;
37 import java.awt.event.FocusEvent;
38 import java.awt.event.MouseAdapter;
39 import java.awt.event.MouseEvent;
41 import javax.swing.BorderFactory;
42 import javax.swing.ButtonGroup;
43 import javax.swing.JCheckBoxMenuItem;
44 import javax.swing.JInternalFrame;
45 import javax.swing.JLabel;
46 import javax.swing.JMenu;
47 import javax.swing.JMenuBar;
48 import javax.swing.JMenuItem;
49 import javax.swing.JOptionPane;
50 import javax.swing.JPanel;
51 import javax.swing.JRadioButtonMenuItem;
52 import javax.swing.JTabbedPane;
53 import javax.swing.SwingUtilities;
54 import javax.swing.event.ChangeEvent;
55 import javax.swing.event.MenuEvent;
56 import javax.swing.event.MenuListener;
58 public class GAlignFrame extends JInternalFrame
60 protected JMenuBar alignFrameMenuBar = new JMenuBar();
62 protected JMenu fileMenu = new JMenu();
64 protected JMenuItem closeMenuItem = new JMenuItem();
66 protected JMenu editMenu = new JMenu();
68 protected JMenu viewMenu = new JMenu();
70 protected JMenu annotationsMenu = new JMenu();
72 protected JMenu colourMenu = new JMenu();
74 protected JMenu calculateMenu = new JMenu();
76 protected JMenu webService = new JMenu();
78 protected JMenuItem webServiceNoServices;
80 protected JMenuItem selectAllSequenceMenuItem = new JMenuItem();
82 protected JMenuItem deselectAllSequenceMenuItem = new JMenuItem();
84 protected JMenuItem invertSequenceMenuItem = new JMenuItem();
86 protected JMenuItem remove2LeftMenuItem = new JMenuItem();
88 protected JMenuItem remove2RightMenuItem = new JMenuItem();
90 protected JMenuItem removeGappedColumnMenuItem = new JMenuItem();
92 protected JMenuItem removeAllGapsMenuItem = new JMenuItem();
94 public JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
96 public JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
98 protected JMenuItem sortPairwiseMenuItem = new JMenuItem();
100 protected JMenuItem sortIDMenuItem = new JMenuItem();
102 protected JMenuItem sortLengthMenuItem = new JMenuItem();
104 protected JMenuItem sortGroupMenuItem = new JMenuItem();
106 protected JMenu sortByAnnotScore = new JMenu();
108 protected JMenuItem removeRedundancyMenuItem = new JMenuItem();
110 protected JMenuItem pairwiseAlignmentMenuItem = new JMenuItem();
112 protected JMenuItem PCAMenuItem = new JMenuItem();
114 protected JMenuItem averageDistanceTreeMenuItem = new JMenuItem();
116 protected JMenuItem neighbourTreeMenuItem = new JMenuItem();
118 BorderLayout borderLayout1 = new BorderLayout();
120 public JLabel statusBar = new JLabel();
122 protected JMenuItem saveAs = new JMenuItem();
124 protected JMenu outputTextboxMenu = new JMenu();
126 protected JRadioButtonMenuItem clustalColour = new JRadioButtonMenuItem();
128 protected JRadioButtonMenuItem zappoColour = new JRadioButtonMenuItem();
130 protected JRadioButtonMenuItem taylorColour = new JRadioButtonMenuItem();
132 protected JRadioButtonMenuItem hydrophobicityColour = new JRadioButtonMenuItem();
134 protected JRadioButtonMenuItem helixColour = new JRadioButtonMenuItem();
136 protected JRadioButtonMenuItem strandColour = new JRadioButtonMenuItem();
138 protected JRadioButtonMenuItem turnColour = new JRadioButtonMenuItem();
140 protected JRadioButtonMenuItem buriedColour = new JRadioButtonMenuItem();
142 protected JRadioButtonMenuItem userDefinedColour = new JRadioButtonMenuItem();
144 protected JRadioButtonMenuItem PIDColour = new JRadioButtonMenuItem();
146 protected JRadioButtonMenuItem BLOSUM62Colour = new JRadioButtonMenuItem();
148 protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem();
150 protected JRadioButtonMenuItem purinePyrimidineColour = new JRadioButtonMenuItem();
152 protected JRadioButtonMenuItem RNAInteractionColour = new JRadioButtonMenuItem();
154 // protected JRadioButtonMenuItem covariationColour = new
155 // JRadioButtonMenuItem();
157 protected JRadioButtonMenuItem tcoffeeColour = new JRadioButtonMenuItem();
159 JMenuItem njTreeBlosumMenuItem = new JMenuItem();
161 JMenuItem avDistanceTreeBlosumMenuItem = new JMenuItem();
163 public JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
165 public JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
167 public JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
169 JMenuItem htmlMenuItem = new JMenuItem();
171 JMenuItem overviewMenuItem = new JMenuItem();
173 protected JMenuItem undoMenuItem = new JMenuItem();
175 protected JMenuItem redoMenuItem = new JMenuItem();
177 public JCheckBoxMenuItem conservationMenuItem = new JCheckBoxMenuItem();
179 JRadioButtonMenuItem noColourmenuItem = new JRadioButtonMenuItem();
181 public JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
183 JMenuItem printMenuItem = new JMenuItem();
185 public JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
187 JMenuItem findMenuItem = new JMenuItem();
189 public JCheckBoxMenuItem abovePIDThreshold = new JCheckBoxMenuItem();
191 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
193 public JCheckBoxMenuItem showSeqFeaturesHeight = new JCheckBoxMenuItem();
195 JMenuItem deleteGroups = new JMenuItem();
197 JMenuItem createGroup = new JMenuItem();
199 JMenuItem unGroup = new JMenuItem();
201 JMenuItem delete = new JMenuItem();
203 JMenuItem copy = new JMenuItem();
205 JMenuItem cut = new JMenuItem();
207 JMenu pasteMenu = new JMenu();
209 JMenuItem pasteNew = new JMenuItem();
211 JMenuItem pasteThis = new JMenuItem();
213 public JCheckBoxMenuItem applyToAllGroups = new JCheckBoxMenuItem();
215 JMenuItem createPNG = new JMenuItem();
217 JMenuItem createBioJS = new JMenuItem();
219 JMenuItem createSVG = new JMenuItem();
221 protected JMenuItem font = new JMenuItem();
223 public JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
225 JMenuItem epsFile = new JMenuItem();
227 JMenuItem LoadtreeMenuItem = new JMenuItem();
229 public JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
231 public JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
233 public JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
235 protected JMenuItem modifyPID = new JMenuItem();
237 protected JMenuItem modifyConservation = new JMenuItem();
239 protected JMenu sortByTreeMenu = new JMenu();
241 protected JMenu sort = new JMenu();
243 protected JMenu calculateTree = new JMenu();
245 JMenu jMenu2 = new JMenu();
247 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
249 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
251 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
253 protected ButtonGroup colours = new ButtonGroup();
255 JMenuItem vamsasStore = new JMenuItem();
257 protected JMenuItem showTranslation = new JMenuItem();
259 protected JMenuItem extractScores = new JMenuItem();
261 protected JMenuItem expandAlignment = new JMenuItem();
263 protected JMenu showProducts = new JMenu();
265 public JMenuItem openFeatureSettings = new JMenuItem();
267 JMenuItem fetchSequence = new JMenuItem();
269 JMenuItem annotationColour = new JMenuItem();
271 protected JMenuItem rnahelicesColour = new JMenuItem();
273 JMenuItem associatedData = new JMenuItem();
275 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
277 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
279 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
281 JMenu addSequenceMenu = new JMenu();
283 JMenuItem addFromFile = new JMenuItem();
285 JMenuItem addFromText = new JMenuItem();
287 JMenuItem addFromURL = new JMenuItem();
289 JMenuItem exportAnnotations = new JMenuItem();
291 JMenuItem exportFeatures = new JMenuItem();
293 protected JPanel statusPanel = new JPanel();
295 GridLayout gridLayout1 = new GridLayout();
297 JMenu jMenu3 = new JMenu();
299 JMenuItem showAllSeqs = new JMenuItem();
301 JMenuItem showAllColumns = new JMenuItem();
303 JMenu hideMenu = new JMenu();
305 JMenuItem hideSelSequences = new JMenuItem();
307 JMenuItem hideSelColumns = new JMenuItem();
309 JMenuItem hideAllButSelection = new JMenuItem();
311 JMenuItem hideAllSelection = new JMenuItem();
313 JMenuItem showAllhidden = new JMenuItem();
315 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
317 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
319 protected JMenuItem showAllAlAnnotations = new JMenuItem();
321 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
323 protected JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem();
325 protected JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem();
327 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
329 JMenuItem invertColSel = new JMenuItem();
331 protected JTabbedPane tabbedPane = new JTabbedPane();
333 JMenuItem save = new JMenuItem();
335 protected JMenuItem reload = new JMenuItem();
337 JMenuItem newView = new JMenuItem();
339 JMenuItem textColour = new JMenuItem();
341 JMenu formatMenu = new JMenu();
343 JMenu selectMenu = new JMenu();
345 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
347 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
349 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
351 protected JMenuItem gatherViews = new JMenuItem();
353 protected JMenuItem expandViews = new JMenuItem();
355 JMenuItem pageSetup = new JMenuItem();
357 JMenuItem alignmentProperties = new JMenuItem();
359 JMenu tooltipSettingsMenu = new JMenu();
361 private JMenuItem justifyLeftMenuItem = new JMenuItem();
363 private JMenuItem justifyRightMenuItem = new JMenuItem();
365 JMenu autoAnnMenu = new JMenu();
367 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
369 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
371 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
373 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
375 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
377 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
379 protected JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem();
381 protected JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem();
383 private JMenuItem grpsFromSelection = new JMenuItem();
385 private SequenceAnnotationOrder annotationSortOrder;
387 private boolean showAutoCalculatedAbove = false;
394 setJMenuBar(alignFrameMenuBar);
396 // dynamically fill save as menu with available formats
397 for (int i = 0; i < jalview.io.FormatAdapter.WRITEABLE_FORMATS.length; i++)
399 JMenuItem item = new JMenuItem(
400 jalview.io.FormatAdapter.WRITEABLE_FORMATS[i]);
402 item.addActionListener(new java.awt.event.ActionListener()
405 public void actionPerformed(ActionEvent e)
407 outputText_actionPerformed(e);
411 outputTextboxMenu.add(item);
413 } catch (Exception e)
415 System.err.println(e.toString());
418 if (!new jalview.util.Platform().isAMac())
420 closeMenuItem.setMnemonic('C');
421 outputTextboxMenu.setMnemonic('T');
422 undoMenuItem.setMnemonic('Z');
423 redoMenuItem.setMnemonic('0');
424 copy.setMnemonic('C');
425 cut.setMnemonic('U');
426 pasteMenu.setMnemonic('P');
427 reload.setMnemonic('R');
430 if (jalview.gui.UserDefinedColours.getUserColourSchemes() != null)
432 java.util.Enumeration userColours = jalview.gui.UserDefinedColours
433 .getUserColourSchemes().keys();
435 while (userColours.hasMoreElements())
437 final JRadioButtonMenuItem radioItem = new JRadioButtonMenuItem(
438 userColours.nextElement().toString());
439 radioItem.setName("USER_DEFINED");
440 radioItem.addMouseListener(new MouseAdapter()
443 public void mousePressed(MouseEvent evt)
445 if (evt.isControlDown()
446 || SwingUtilities.isRightMouseButton(evt))
448 radioItem.removeActionListener(radioItem.getActionListeners()[0]);
450 int option = JOptionPane.showInternalConfirmDialog(
451 jalview.gui.Desktop.desktop,
453 .getString("label.remove_from_default_list"),
455 .getString("label.remove_user_defined_colour"),
456 JOptionPane.YES_NO_OPTION);
457 if (option == JOptionPane.YES_OPTION)
459 jalview.gui.UserDefinedColours
460 .removeColourFromDefaults(radioItem.getText());
461 colourMenu.remove(radioItem);
465 radioItem.addActionListener(new ActionListener()
468 public void actionPerformed(ActionEvent evt)
470 userDefinedColour_actionPerformed(evt);
477 radioItem.addActionListener(new ActionListener()
480 public void actionPerformed(ActionEvent evt)
482 userDefinedColour_actionPerformed(evt);
485 colourMenu.insert(radioItem, 15);
486 colours.add(radioItem);
489 colours.add(noColourmenuItem);
490 colours.add(clustalColour);
491 colours.add(zappoColour);
492 colours.add(taylorColour);
493 colours.add(hydrophobicityColour);
494 colours.add(helixColour);
495 colours.add(strandColour);
496 colours.add(turnColour);
497 colours.add(buriedColour);
498 colours.add(userDefinedColour);
499 colours.add(PIDColour);
500 colours.add(BLOSUM62Colour);
501 colours.add(nucleotideColour);
502 colours.add(purinePyrimidineColour);
503 // colours.add(covariationColour);
504 colours.add(tcoffeeColour);
505 colours.add(RNAInteractionColour);
506 setColourSelected(jalview.bin.Cache
507 .getDefault("DEFAULT_COLOUR", "None"));
511 public void setColourSelected(String defaultColour)
514 if (defaultColour != null)
516 int index = ColourSchemeProperty
517 .getColourIndexFromName(defaultColour);
521 case ColourSchemeProperty.CLUSTAL:
522 clustalColour.setSelected(true);
526 case ColourSchemeProperty.BLOSUM:
527 BLOSUM62Colour.setSelected(true);
531 case ColourSchemeProperty.PID:
532 PIDColour.setSelected(true);
536 case ColourSchemeProperty.ZAPPO:
537 zappoColour.setSelected(true);
541 case ColourSchemeProperty.TAYLOR:
542 taylorColour.setSelected(true);
545 case ColourSchemeProperty.HYDROPHOBIC:
546 hydrophobicityColour.setSelected(true);
550 case ColourSchemeProperty.HELIX:
551 helixColour.setSelected(true);
555 case ColourSchemeProperty.STRAND:
556 strandColour.setSelected(true);
560 case ColourSchemeProperty.TURN:
561 turnColour.setSelected(true);
565 case ColourSchemeProperty.BURIED:
566 buriedColour.setSelected(true);
570 case ColourSchemeProperty.NUCLEOTIDE:
571 nucleotideColour.setSelected(true);
575 case ColourSchemeProperty.TCOFFEE:
576 tcoffeeColour.setSelected(true);
579 case ColourSchemeProperty.PURINEPYRIMIDINE:
580 purinePyrimidineColour.setSelected(true);
584 case ColourSchemeProperty.RNAINTERACTION:
585 RNAInteractionColour.setSelected(true);
589 * case ColourSchemeProperty.COVARIATION:
590 * covariationColour.setSelected(true);
594 case ColourSchemeProperty.USER_DEFINED:
595 userDefinedColour.setSelected(true);
598 case ColourSchemeProperty.NONE:
600 noColourmenuItem.setSelected(true);
608 private void jbInit() throws Exception
610 fileMenu.setText(MessageManager.getString("action.file"));
611 saveAs.setText(MessageManager.getString("action.save_as") + "...");
612 saveAs.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
613 java.awt.event.KeyEvent.VK_S, Toolkit.getDefaultToolkit()
614 .getMenuShortcutKeyMask()
615 | java.awt.event.KeyEvent.SHIFT_MASK, false));
616 saveAs.addActionListener(new ActionListener()
619 public void actionPerformed(ActionEvent e)
621 saveAs_actionPerformed(e);
624 closeMenuItem.setText(MessageManager.getString("action.close"));
625 closeMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
626 java.awt.event.KeyEvent.VK_W, Toolkit.getDefaultToolkit()
627 .getMenuShortcutKeyMask(), false));
628 closeMenuItem.addActionListener(new java.awt.event.ActionListener()
631 public void actionPerformed(ActionEvent e)
633 closeMenuItem_actionPerformed(false);
636 editMenu.setText(MessageManager.getString("action.edit"));
637 viewMenu.setText(MessageManager.getString("action.view"));
638 annotationsMenu.setText(MessageManager.getString("action.annotations"));
639 colourMenu.setText(MessageManager.getString("action.colour"));
640 calculateMenu.setText(MessageManager.getString("action.calculate"));
641 webService.setText(MessageManager.getString("action.web_service"));
642 selectAllSequenceMenuItem.setText(MessageManager
643 .getString("action.select_all"));
644 selectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke
645 .getKeyStroke(java.awt.event.KeyEvent.VK_A, Toolkit
646 .getDefaultToolkit().getMenuShortcutKeyMask(), false));
647 selectAllSequenceMenuItem
648 .addActionListener(new java.awt.event.ActionListener()
651 public void actionPerformed(ActionEvent e)
653 selectAllSequenceMenuItem_actionPerformed(e);
656 deselectAllSequenceMenuItem.setText(MessageManager
657 .getString("action.deselect_all"));
658 deselectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke
659 .getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0, false));
660 deselectAllSequenceMenuItem
661 .addActionListener(new java.awt.event.ActionListener()
664 public void actionPerformed(ActionEvent e)
666 deselectAllSequenceMenuItem_actionPerformed(e);
669 invertSequenceMenuItem.setText(MessageManager
670 .getString("action.invert_sequence_selection"));
671 invertSequenceMenuItem.setAccelerator(javax.swing.KeyStroke
672 .getKeyStroke(java.awt.event.KeyEvent.VK_I, Toolkit
673 .getDefaultToolkit().getMenuShortcutKeyMask(), false));
674 invertSequenceMenuItem
675 .addActionListener(new java.awt.event.ActionListener()
678 public void actionPerformed(ActionEvent e)
680 invertSequenceMenuItem_actionPerformed(e);
683 grpsFromSelection.setText(MessageManager
684 .getString("action.make_groups_selection"));
685 grpsFromSelection.addActionListener(new java.awt.event.ActionListener()
688 public void actionPerformed(ActionEvent e)
690 makeGrpsFromSelection_actionPerformed(e);
693 expandAlignment.setText(MessageManager
694 .getString("action.view_flanking_regions"));
695 expandAlignment.setToolTipText(MessageManager
696 .getString("label.view_flanking_regions"));
697 expandAlignment.addActionListener(new java.awt.event.ActionListener()
700 public void actionPerformed(ActionEvent e)
705 remove2LeftMenuItem.setText(MessageManager
706 .getString("action.remove_left"));
707 remove2LeftMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
708 java.awt.event.KeyEvent.VK_L, Toolkit.getDefaultToolkit()
709 .getMenuShortcutKeyMask(), false));
711 .addActionListener(new java.awt.event.ActionListener()
714 public void actionPerformed(ActionEvent e)
716 remove2LeftMenuItem_actionPerformed(e);
719 remove2RightMenuItem.setText(MessageManager
720 .getString("action.remove_right"));
721 remove2RightMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
722 java.awt.event.KeyEvent.VK_R, Toolkit.getDefaultToolkit()
723 .getMenuShortcutKeyMask(), false));
725 .addActionListener(new java.awt.event.ActionListener()
728 public void actionPerformed(ActionEvent e)
730 remove2RightMenuItem_actionPerformed(e);
733 removeGappedColumnMenuItem.setText(MessageManager
734 .getString("action.remove_empty_columns"));
735 removeGappedColumnMenuItem.setAccelerator(javax.swing.KeyStroke
736 .getKeyStroke(java.awt.event.KeyEvent.VK_E, Toolkit
737 .getDefaultToolkit().getMenuShortcutKeyMask(), false));
738 removeGappedColumnMenuItem
739 .addActionListener(new java.awt.event.ActionListener()
742 public void actionPerformed(ActionEvent e)
744 removeGappedColumnMenuItem_actionPerformed(e);
747 removeAllGapsMenuItem.setText(MessageManager
748 .getString("action.remove_all_gaps"));
749 removeAllGapsMenuItem.setAccelerator(javax.swing.KeyStroke
750 .getKeyStroke(java.awt.event.KeyEvent.VK_E, Toolkit
751 .getDefaultToolkit().getMenuShortcutKeyMask()
752 | java.awt.event.KeyEvent.SHIFT_MASK, false));
753 removeAllGapsMenuItem
754 .addActionListener(new java.awt.event.ActionListener()
757 public void actionPerformed(ActionEvent e)
759 removeAllGapsMenuItem_actionPerformed(e);
762 justifyLeftMenuItem.setText(MessageManager
763 .getString("action.left_justify_alignment"));
765 .addActionListener(new java.awt.event.ActionListener()
768 public void actionPerformed(ActionEvent e)
770 justifyLeftMenuItem_actionPerformed(e);
773 justifyRightMenuItem.setText(MessageManager
774 .getString("action.right_justify_alignment"));
776 .addActionListener(new java.awt.event.ActionListener()
779 public void actionPerformed(ActionEvent e)
781 justifyRightMenuItem_actionPerformed(e);
784 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
785 viewBoxesMenuItem.setState(true);
786 viewBoxesMenuItem.addActionListener(new java.awt.event.ActionListener()
789 public void actionPerformed(ActionEvent e)
791 viewBoxesMenuItem_actionPerformed(e);
794 viewTextMenuItem.setText(MessageManager.getString("action.text"));
795 viewTextMenuItem.setState(true);
796 viewTextMenuItem.addActionListener(new java.awt.event.ActionListener()
799 public void actionPerformed(ActionEvent e)
801 viewTextMenuItem_actionPerformed(e);
804 showNonconservedMenuItem.setText(MessageManager
805 .getString("label.show_non_conversed"));
806 showNonconservedMenuItem.setState(false);
807 showNonconservedMenuItem
808 .addActionListener(new java.awt.event.ActionListener()
811 public void actionPerformed(ActionEvent e)
813 showUnconservedMenuItem_actionPerformed(e);
816 sortPairwiseMenuItem.setText(MessageManager
817 .getString("action.by_pairwise_id"));
819 .addActionListener(new java.awt.event.ActionListener()
822 public void actionPerformed(ActionEvent e)
824 sortPairwiseMenuItem_actionPerformed(e);
827 sortIDMenuItem.setText(MessageManager.getString("action.by_id"));
828 sortIDMenuItem.addActionListener(new java.awt.event.ActionListener()
831 public void actionPerformed(ActionEvent e)
833 sortIDMenuItem_actionPerformed(e);
837 .setText(MessageManager.getString("action.by_length"));
839 .addActionListener(new java.awt.event.ActionListener()
842 public void actionPerformed(ActionEvent e)
844 sortLengthMenuItem_actionPerformed(e);
847 sortGroupMenuItem.setText(MessageManager.getString("action.by_group"));
848 sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener()
851 public void actionPerformed(ActionEvent e)
853 sortGroupMenuItem_actionPerformed(e);
856 removeRedundancyMenuItem.setText(MessageManager
857 .getString("action.remove_redundancy").concat("..."));
858 removeRedundancyMenuItem.setAccelerator(javax.swing.KeyStroke
859 .getKeyStroke(java.awt.event.KeyEvent.VK_D, Toolkit
860 .getDefaultToolkit().getMenuShortcutKeyMask(), false));
861 removeRedundancyMenuItem
862 .addActionListener(new java.awt.event.ActionListener()
865 public void actionPerformed(ActionEvent e)
867 removeRedundancyMenuItem_actionPerformed(e);
870 pairwiseAlignmentMenuItem.setText(MessageManager
871 .getString("action.pairwise_alignment"));
872 pairwiseAlignmentMenuItem
873 .addActionListener(new java.awt.event.ActionListener()
876 public void actionPerformed(ActionEvent e)
878 pairwiseAlignmentMenuItem_actionPerformed(e);
881 PCAMenuItem.setText(MessageManager
882 .getString("label.principal_component_analysis"));
883 PCAMenuItem.addActionListener(new java.awt.event.ActionListener()
886 public void actionPerformed(ActionEvent e)
888 PCAMenuItem_actionPerformed(e);
891 averageDistanceTreeMenuItem.setText(MessageManager
892 .getString("label.average_distance_identity"));
893 averageDistanceTreeMenuItem
894 .addActionListener(new java.awt.event.ActionListener()
897 public void actionPerformed(ActionEvent e)
899 averageDistanceTreeMenuItem_actionPerformed(e);
902 neighbourTreeMenuItem.setText(MessageManager
903 .getString("label.neighbour_joining_identity"));
904 neighbourTreeMenuItem
905 .addActionListener(new java.awt.event.ActionListener()
908 public void actionPerformed(ActionEvent e)
910 neighbourTreeMenuItem_actionPerformed(e);
913 this.getContentPane().setLayout(borderLayout1);
914 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
915 statusBar.setBackground(Color.white);
916 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
917 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
918 statusBar.setText(MessageManager.getString("label.status_bar"));
919 outputTextboxMenu.setText(MessageManager
920 .getString("label.out_to_textbox"));
921 clustalColour.setText(MessageManager.getString("label.clustalx"));
923 clustalColour.addActionListener(new java.awt.event.ActionListener()
926 public void actionPerformed(ActionEvent e)
928 clustalColour_actionPerformed(e);
931 zappoColour.setText(MessageManager.getString("label.zappo"));
932 zappoColour.addActionListener(new java.awt.event.ActionListener()
935 public void actionPerformed(ActionEvent e)
937 zappoColour_actionPerformed(e);
940 taylorColour.setText(MessageManager.getString("label.taylor"));
941 taylorColour.addActionListener(new java.awt.event.ActionListener()
944 public void actionPerformed(ActionEvent e)
946 taylorColour_actionPerformed(e);
949 hydrophobicityColour.setText(MessageManager
950 .getString("label.hydrophobicity"));
952 .addActionListener(new java.awt.event.ActionListener()
955 public void actionPerformed(ActionEvent e)
957 hydrophobicityColour_actionPerformed(e);
960 helixColour.setText(MessageManager.getString("label.helix_propensity"));
961 helixColour.addActionListener(new java.awt.event.ActionListener()
964 public void actionPerformed(ActionEvent e)
966 helixColour_actionPerformed(e);
969 strandColour.setText(MessageManager
970 .getString("label.strand_propensity"));
971 strandColour.addActionListener(new java.awt.event.ActionListener()
974 public void actionPerformed(ActionEvent e)
976 strandColour_actionPerformed(e);
979 turnColour.setText(MessageManager.getString("label.turn_propensity"));
980 turnColour.addActionListener(new java.awt.event.ActionListener()
983 public void actionPerformed(ActionEvent e)
985 turnColour_actionPerformed(e);
988 buriedColour.setText(MessageManager.getString("label.buried_index"));
989 buriedColour.addActionListener(new java.awt.event.ActionListener()
992 public void actionPerformed(ActionEvent e)
994 buriedColour_actionPerformed(e);
997 userDefinedColour.setText(MessageManager
998 .getString("action.user_defined"));
999 userDefinedColour.addActionListener(new java.awt.event.ActionListener()
1002 public void actionPerformed(ActionEvent e)
1004 userDefinedColour_actionPerformed(e);
1008 .setText(MessageManager.getString("label.percentage_identity"));
1009 PIDColour.addActionListener(new java.awt.event.ActionListener()
1012 public void actionPerformed(ActionEvent e)
1014 PIDColour_actionPerformed(e);
1018 .setText(MessageManager.getString("label.blosum62_score"));
1019 BLOSUM62Colour.addActionListener(new java.awt.event.ActionListener()
1022 public void actionPerformed(ActionEvent e)
1024 BLOSUM62Colour_actionPerformed(e);
1027 nucleotideColour.setText(MessageManager.getString("label.nucleotide"));
1028 nucleotideColour.addActionListener(new java.awt.event.ActionListener()
1031 public void actionPerformed(ActionEvent e)
1033 nucleotideColour_actionPerformed(e);
1037 purinePyrimidineColour.setText(MessageManager
1038 .getString("label.purine_pyrimidine"));
1039 purinePyrimidineColour
1040 .addActionListener(new java.awt.event.ActionListener()
1043 public void actionPerformed(ActionEvent e)
1045 purinePyrimidineColour_actionPerformed(e);
1049 RNAInteractionColour.setText("RNA Interaction type");
1050 RNAInteractionColour
1051 .addActionListener(new java.awt.event.ActionListener()
1054 public void actionPerformed(ActionEvent e)
1056 RNAInteractionColour_actionPerformed(e);
1060 * covariationColour.setText("Covariation");
1061 * covariationColour.addActionListener(new java.awt.event.ActionListener() {
1062 * public void actionPerformed(ActionEvent e) {
1063 * covariationColour_actionPerformed(e); } });
1066 avDistanceTreeBlosumMenuItem.setText(MessageManager
1067 .getString("label.average_distance_bloslum62"));
1068 avDistanceTreeBlosumMenuItem
1069 .addActionListener(new java.awt.event.ActionListener()
1072 public void actionPerformed(ActionEvent e)
1074 avTreeBlosumMenuItem_actionPerformed(e);
1077 njTreeBlosumMenuItem.setText(MessageManager
1078 .getString("label.neighbour_blosum62"));
1079 njTreeBlosumMenuItem
1080 .addActionListener(new java.awt.event.ActionListener()
1083 public void actionPerformed(ActionEvent e)
1085 njTreeBlosumMenuItem_actionPerformed(e);
1088 annotationPanelMenuItem.setActionCommand("");
1089 annotationPanelMenuItem.setText(MessageManager
1090 .getString("label.show_annotations"));
1091 annotationPanelMenuItem.setState(Cache.getDefault("SHOW_ANNOTATIONS",
1093 annotationPanelMenuItem.addActionListener(new ActionListener()
1096 public void actionPerformed(ActionEvent e)
1098 annotationPanelMenuItem_actionPerformed(e);
1101 showAllAlAnnotations.setText(MessageManager
1102 .getString("label.show_all_al_annotations"));
1103 final boolean isAnnotationPanelShown = annotationPanelMenuItem
1105 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
1106 showAllAlAnnotations.addActionListener(new ActionListener()
1109 public void actionPerformed(ActionEvent e)
1111 showAllAnnotations_actionPerformed(false, true);
1114 hideAllAlAnnotations.setText(MessageManager
1115 .getString("label.hide_all_al_annotations"));
1116 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
1117 hideAllAlAnnotations.addActionListener(new ActionListener()
1120 public void actionPerformed(ActionEvent e)
1122 hideAllAnnotations_actionPerformed(false, true);
1125 showAllSeqAnnotations.setText(MessageManager
1126 .getString("label.show_all_seq_annotations"));
1127 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
1128 showAllSeqAnnotations.addActionListener(new ActionListener()
1131 public void actionPerformed(ActionEvent e)
1133 showAllAnnotations_actionPerformed(true, false);
1136 hideAllSeqAnnotations.setText(MessageManager
1137 .getString("label.hide_all_seq_annotations"));
1138 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
1139 hideAllSeqAnnotations.addActionListener(new ActionListener()
1142 public void actionPerformed(ActionEvent e)
1144 hideAllAnnotations_actionPerformed(true, false);
1147 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
1148 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
1149 SequenceAnnotationOrder.NONE.name()));
1150 sortAnnBySequence.setText(MessageManager
1151 .getString("label.sort_annotations_by_sequence"));
1153 .setSelected(sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
1154 sortAnnBySequence.addActionListener(new ActionListener()
1157 public void actionPerformed(ActionEvent e)
1159 boolean newState = sortAnnBySequence.getState();
1160 sortAnnByLabel.setSelected(false);
1161 setAnnotationSortOrder(newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
1162 : SequenceAnnotationOrder.NONE);
1163 sortAnnotations_actionPerformed();
1166 sortAnnByLabel.setText(MessageManager
1167 .getString("label.sort_annotations_by_label"));
1169 .setSelected(sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
1170 sortAnnByLabel.addActionListener(new ActionListener()
1173 public void actionPerformed(ActionEvent e)
1175 boolean newState = sortAnnByLabel.getState();
1176 sortAnnBySequence.setSelected(false);
1177 setAnnotationSortOrder(newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
1178 : SequenceAnnotationOrder.NONE);
1179 sortAnnotations_actionPerformed();
1182 colourTextMenuItem.setText(MessageManager
1183 .getString("label.colour_text"));
1185 .addActionListener(new java.awt.event.ActionListener()
1188 public void actionPerformed(ActionEvent e)
1190 colourTextMenuItem_actionPerformed(e);
1193 htmlMenuItem.setText(MessageManager.getString("label.html"));
1194 htmlMenuItem.addActionListener(new java.awt.event.ActionListener()
1197 public void actionPerformed(ActionEvent e)
1199 htmlMenuItem_actionPerformed(e);
1203 // TODO uncomment when supported by MassageManager
1204 // createBioJS.setText(MessageManager.getString("label.biojs_html_export"));
1205 createBioJS.setText("BioJS");
1206 createBioJS.addActionListener(new java.awt.event.ActionListener()
1209 public void actionPerformed(ActionEvent e)
1211 bioJSMenuItem_actionPerformed(e);
1215 overviewMenuItem.setText(MessageManager
1216 .getString("label.overview_window"));
1217 overviewMenuItem.addActionListener(new java.awt.event.ActionListener()
1220 public void actionPerformed(ActionEvent e)
1222 overviewMenuItem_actionPerformed(e);
1225 undoMenuItem.setEnabled(false);
1226 undoMenuItem.setText(MessageManager.getString("action.undo"));
1227 undoMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1228 java.awt.event.KeyEvent.VK_Z, Toolkit.getDefaultToolkit()
1229 .getMenuShortcutKeyMask(), false));
1230 undoMenuItem.addActionListener(new java.awt.event.ActionListener()
1233 public void actionPerformed(ActionEvent e)
1235 undoMenuItem_actionPerformed(e);
1238 redoMenuItem.setEnabled(false);
1239 redoMenuItem.setText(MessageManager.getString("action.redo"));
1240 redoMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1241 java.awt.event.KeyEvent.VK_Y, Toolkit.getDefaultToolkit()
1242 .getMenuShortcutKeyMask(), false));
1243 redoMenuItem.addActionListener(new java.awt.event.ActionListener()
1246 public void actionPerformed(ActionEvent e)
1248 redoMenuItem_actionPerformed(e);
1251 conservationMenuItem.setText(MessageManager
1252 .getString("action.by_conservation"));
1253 conservationMenuItem
1254 .addActionListener(new java.awt.event.ActionListener()
1257 public void actionPerformed(ActionEvent e)
1259 conservationMenuItem_actionPerformed(e);
1262 noColourmenuItem.setText(MessageManager.getString("label.none"));
1263 noColourmenuItem.addActionListener(new java.awt.event.ActionListener()
1266 public void actionPerformed(ActionEvent e)
1268 noColourmenuItem_actionPerformed(e);
1271 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
1272 wrapMenuItem.addActionListener(new java.awt.event.ActionListener()
1275 public void actionPerformed(ActionEvent e)
1277 wrapMenuItem_actionPerformed(e);
1280 printMenuItem.setText(MessageManager.getString("action.print") + "...");
1281 printMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1282 java.awt.event.KeyEvent.VK_P, Toolkit.getDefaultToolkit()
1283 .getMenuShortcutKeyMask(), false));
1284 printMenuItem.addActionListener(new java.awt.event.ActionListener()
1287 public void actionPerformed(ActionEvent e)
1289 printMenuItem_actionPerformed(e);
1293 .setText(MessageManager.getString("action.show_gaps"));
1294 renderGapsMenuItem.setState(true);
1296 .addActionListener(new java.awt.event.ActionListener()
1299 public void actionPerformed(ActionEvent e)
1301 renderGapsMenuItem_actionPerformed(e);
1304 findMenuItem.setText(MessageManager.getString("action.find"));
1305 findMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1306 java.awt.event.KeyEvent.VK_F, Toolkit.getDefaultToolkit()
1307 .getMenuShortcutKeyMask(), false));
1308 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
1309 MessageManager.getString("label.find_tip")));
1310 findMenuItem.addActionListener(new java.awt.event.ActionListener()
1313 public void actionPerformed(ActionEvent e)
1315 findMenuItem_actionPerformed(e);
1318 abovePIDThreshold.setText(MessageManager
1319 .getString("label.above_identity_threshold"));
1320 abovePIDThreshold.addActionListener(new java.awt.event.ActionListener()
1323 public void actionPerformed(ActionEvent e)
1325 abovePIDThreshold_actionPerformed(e);
1328 showSeqFeatures.setText(MessageManager
1329 .getString("label.show_sequence_features"));
1330 showSeqFeatures.addActionListener(new ActionListener()
1333 public void actionPerformed(ActionEvent actionEvent)
1335 showSeqFeatures_actionPerformed(actionEvent);
1339 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
1340 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
1341 * void actionPerformed(ActionEvent actionEvent) {
1342 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
1344 showDbRefsMenuitem.setText(MessageManager
1345 .getString("label.show_database_refs"));
1346 showDbRefsMenuitem.addActionListener(new ActionListener()
1350 public void actionPerformed(ActionEvent e)
1352 showDbRefs_actionPerformed(e);
1356 showNpFeatsMenuitem.setText(MessageManager
1357 .getString("label.show_non_positional_features"));
1358 showNpFeatsMenuitem.addActionListener(new ActionListener()
1362 public void actionPerformed(ActionEvent e)
1364 showNpFeats_actionPerformed(e);
1368 showGroupConservation.setText(MessageManager
1369 .getString("label.group_conservation"));
1370 showGroupConservation.addActionListener(new ActionListener()
1374 public void actionPerformed(ActionEvent e)
1376 showGroupConservation_actionPerformed(e);
1381 showGroupConsensus.setText(MessageManager
1382 .getString("label.group_consensus"));
1383 showGroupConsensus.addActionListener(new ActionListener()
1387 public void actionPerformed(ActionEvent e)
1389 showGroupConsensus_actionPerformed(e);
1393 showConsensusHistogram.setText(MessageManager
1394 .getString("label.show_consensus_histogram"));
1395 showConsensusHistogram.addActionListener(new ActionListener()
1399 public void actionPerformed(ActionEvent e)
1401 showConsensusHistogram_actionPerformed(e);
1405 showSequenceLogo.setText(MessageManager
1406 .getString("label.show_consensus_logo"));
1407 showSequenceLogo.addActionListener(new ActionListener()
1411 public void actionPerformed(ActionEvent e)
1413 showSequenceLogo_actionPerformed(e);
1417 normaliseSequenceLogo.setText(MessageManager
1418 .getString("label.norm_consensus_logo"));
1419 normaliseSequenceLogo.addActionListener(new ActionListener()
1423 public void actionPerformed(ActionEvent e)
1425 normaliseSequenceLogo_actionPerformed(e);
1429 applyAutoAnnotationSettings.setText(MessageManager
1430 .getString("label.apply_all_groups"));
1431 applyAutoAnnotationSettings.setState(false);
1432 applyAutoAnnotationSettings.setVisible(true);
1433 applyAutoAnnotationSettings.addActionListener(new ActionListener()
1436 public void actionPerformed(ActionEvent e)
1438 applyAutoAnnotationSettings_actionPerformed(e);
1442 ButtonGroup buttonGroup = new ButtonGroup();
1443 buttonGroup.add(showAutoFirst);
1444 buttonGroup.add(showAutoLast);
1445 showAutoFirst.setText(MessageManager.getString("label.show_first"));
1446 showAutoFirst.setSelected(Cache.getDefault(
1447 Preferences.SHOW_AUTOCALC_ABOVE,
1449 showAutoFirst.addActionListener(new ActionListener()
1452 public void actionPerformed(ActionEvent e)
1454 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
1455 sortAnnotations_actionPerformed();
1458 showAutoLast.setText(MessageManager.getString("label.show_last"));
1459 showAutoLast.setSelected(!showAutoFirst.isSelected());
1460 showAutoLast.addActionListener(new ActionListener()
1463 public void actionPerformed(ActionEvent e)
1465 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
1466 sortAnnotations_actionPerformed();
1470 nucleotideColour.setText(MessageManager.getString("label.nucleotide"));
1471 nucleotideColour.addActionListener(new java.awt.event.ActionListener()
1474 public void actionPerformed(ActionEvent e)
1476 nucleotideColour_actionPerformed(e);
1480 tcoffeeColour.setText(MessageManager.getString("label.tcoffee_scores"));
1481 tcoffeeColour.setEnabled(false);
1482 tcoffeeColour.addActionListener(new ActionListener()
1486 public void actionPerformed(ActionEvent e)
1488 tcoffeeColorScheme_actionPerformed(e);
1493 .setText(MessageManager.getString("action.undefine_groups"));
1494 deleteGroups.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1495 java.awt.event.KeyEvent.VK_U, Toolkit.getDefaultToolkit()
1496 .getMenuShortcutKeyMask(), false));
1497 deleteGroups.addActionListener(new java.awt.event.ActionListener()
1500 public void actionPerformed(ActionEvent e)
1502 deleteGroups_actionPerformed(e);
1505 createGroup.setText(MessageManager.getString("action.create_groups"));
1506 createGroup.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1507 java.awt.event.KeyEvent.VK_G, Toolkit.getDefaultToolkit()
1508 .getMenuShortcutKeyMask(), false));
1509 createGroup.addActionListener(new java.awt.event.ActionListener()
1512 public void actionPerformed(ActionEvent e)
1514 createGroup_actionPerformed(e);
1517 unGroup.setText(MessageManager.getString("action.remove_group"));
1518 unGroup.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1519 java.awt.event.KeyEvent.VK_G, Toolkit.getDefaultToolkit()
1520 .getMenuShortcutKeyMask()
1521 | java.awt.event.KeyEvent.SHIFT_MASK, false));
1522 unGroup.addActionListener(new java.awt.event.ActionListener()
1525 public void actionPerformed(ActionEvent e)
1527 unGroup_actionPerformed(e);
1530 copy.setText(MessageManager.getString("action.copy"));
1531 copy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1532 java.awt.event.KeyEvent.VK_C, Toolkit.getDefaultToolkit()
1533 .getMenuShortcutKeyMask(), false));
1535 copy.addActionListener(new java.awt.event.ActionListener()
1538 public void actionPerformed(ActionEvent e)
1540 copy_actionPerformed(e);
1543 cut.setText(MessageManager.getString("action.cut"));
1544 cut.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1545 java.awt.event.KeyEvent.VK_X, Toolkit.getDefaultToolkit()
1546 .getMenuShortcutKeyMask(), false));
1547 cut.addActionListener(new java.awt.event.ActionListener()
1550 public void actionPerformed(ActionEvent e)
1552 cut_actionPerformed(e);
1555 delete.setText(MessageManager.getString("action.delete"));
1556 delete.addActionListener(new java.awt.event.ActionListener()
1559 public void actionPerformed(ActionEvent e)
1561 delete_actionPerformed(e);
1564 pasteMenu.setText(MessageManager.getString("action.paste"));
1565 pasteNew.setText(MessageManager.getString("label.to_new_alignment"));
1566 pasteNew.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1567 java.awt.event.KeyEvent.VK_V, Toolkit.getDefaultToolkit()
1568 .getMenuShortcutKeyMask()
1569 | java.awt.event.KeyEvent.SHIFT_MASK, false));
1570 pasteNew.addActionListener(new java.awt.event.ActionListener()
1573 public void actionPerformed(ActionEvent e)
1575 pasteNew_actionPerformed(e);
1578 pasteThis.setText(MessageManager.getString("label.to_this_alignment"));
1579 pasteThis.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
1580 java.awt.event.KeyEvent.VK_V, Toolkit.getDefaultToolkit()
1581 .getMenuShortcutKeyMask(), false));
1582 pasteThis.addActionListener(new java.awt.event.ActionListener()
1585 public void actionPerformed(ActionEvent e)
1587 pasteThis_actionPerformed(e);
1590 applyToAllGroups.setText(MessageManager
1591 .getString("label.apply_colour_to_all_groups"));
1592 applyToAllGroups.addActionListener(new java.awt.event.ActionListener()
1595 public void actionPerformed(ActionEvent e)
1597 applyToAllGroups_actionPerformed(e);
1600 createPNG.addActionListener(new java.awt.event.ActionListener()
1603 public void actionPerformed(ActionEvent e)
1608 createPNG.setActionCommand(MessageManager
1609 .getString("label.save_png_image"));
1610 createPNG.setText("PNG");
1612 font.setText(MessageManager.getString("action.font"));
1613 font.addActionListener(new java.awt.event.ActionListener()
1616 public void actionPerformed(ActionEvent e)
1618 font_actionPerformed(e);
1621 seqLimits.setText(MessageManager
1622 .getString("label.show_sequence_limits"));
1623 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1624 seqLimits.addActionListener(new java.awt.event.ActionListener()
1627 public void actionPerformed(ActionEvent e)
1629 seqLimit_actionPerformed(e);
1632 epsFile.setText("EPS");
1633 epsFile.addActionListener(new java.awt.event.ActionListener()
1636 public void actionPerformed(ActionEvent e)
1642 createSVG.setText("SVG");
1643 createSVG.addActionListener(new java.awt.event.ActionListener()
1646 public void actionPerformed(ActionEvent e)
1652 LoadtreeMenuItem.setActionCommand(MessageManager
1653 .getString("label.load_tree_for_sequence_set"));
1654 LoadtreeMenuItem.setText(MessageManager
1655 .getString("label.load_associated_tree"));
1656 LoadtreeMenuItem.addActionListener(new java.awt.event.ActionListener()
1659 public void actionPerformed(ActionEvent e)
1661 LoadtreeMenuItem_actionPerformed(e);
1665 scaleAbove.setVisible(false);
1666 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1667 scaleAbove.addActionListener(new java.awt.event.ActionListener()
1670 public void actionPerformed(ActionEvent e)
1672 scaleAbove_actionPerformed(e);
1675 scaleLeft.setVisible(false);
1676 scaleLeft.setSelected(true);
1677 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1678 scaleLeft.addActionListener(new java.awt.event.ActionListener()
1681 public void actionPerformed(ActionEvent e)
1683 scaleLeft_actionPerformed(e);
1686 scaleRight.setVisible(false);
1687 scaleRight.setSelected(true);
1688 scaleRight.setText(MessageManager.getString("action.scale_right"));
1689 scaleRight.addActionListener(new java.awt.event.ActionListener()
1692 public void actionPerformed(ActionEvent e)
1694 scaleRight_actionPerformed(e);
1697 centreColumnLabelsMenuItem.setVisible(true);
1698 centreColumnLabelsMenuItem.setState(false);
1699 centreColumnLabelsMenuItem.setText(MessageManager
1700 .getString("label.centre_column_labels"));
1701 centreColumnLabelsMenuItem
1702 .addActionListener(new java.awt.event.ActionListener()
1705 public void actionPerformed(ActionEvent e)
1707 centreColumnLabels_actionPerformed(e);
1710 followHighlightMenuItem.setVisible(true);
1711 followHighlightMenuItem.setState(true);
1712 followHighlightMenuItem.setText(MessageManager
1713 .getString("label.automatic_scrolling"));
1714 followHighlightMenuItem.addActionListener(new ActionListener()
1718 public void actionPerformed(ActionEvent e)
1720 followHighlight_actionPerformed();
1725 modifyPID.setText(MessageManager
1726 .getString("label.modify_identity_thereshold"));
1727 modifyPID.addActionListener(new java.awt.event.ActionListener()
1730 public void actionPerformed(ActionEvent e)
1732 modifyPID_actionPerformed(e);
1735 modifyConservation.setText(MessageManager
1736 .getString("label.modify_conservation_thereshold"));
1738 .addActionListener(new java.awt.event.ActionListener()
1741 public void actionPerformed(ActionEvent e)
1743 modifyConservation_actionPerformed(e);
1747 .setText(MessageManager.getString("action.by_tree_order"));
1748 sort.setText(MessageManager.getString("action.sort"));
1749 sort.addMenuListener(new MenuListener()
1752 public void menuSelected(MenuEvent e)
1758 public void menuDeselected(MenuEvent e)
1763 public void menuCanceled(MenuEvent e)
1767 sortByAnnotScore.setText(MessageManager
1768 .getString("label.sort_by_score"));
1769 sort.add(sortByAnnotScore);
1770 sort.addMenuListener(new javax.swing.event.MenuListener()
1774 public void menuCanceled(MenuEvent e)
1779 public void menuDeselected(MenuEvent e)
1784 public void menuSelected(MenuEvent e)
1786 buildSortByAnnotationScoresMenu();
1789 sortByAnnotScore.setVisible(false);
1792 .setText(MessageManager.getString("action.calculate_tree"));
1794 jMenu2.setText(MessageManager.getString("label.export_image"));
1795 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1796 padGapsMenuitem.setState(jalview.bin.Cache
1797 .getDefault("PAD_GAPS", false));
1798 padGapsMenuitem.addActionListener(new ActionListener()
1801 public void actionPerformed(ActionEvent e)
1803 padGapsMenuitem_actionPerformed(e);
1806 vamsasStore.setVisible(false);
1807 vamsasStore.setText(MessageManager.getString("label.vamsas_store"));
1808 vamsasStore.addActionListener(new ActionListener()
1811 public void actionPerformed(ActionEvent e)
1813 vamsasStore_actionPerformed(e);
1816 showTranslation.setText(MessageManager
1817 .getString("label.translate_cDNA"));
1818 showTranslation.addActionListener(new ActionListener()
1821 public void actionPerformed(ActionEvent e)
1823 showTranslation_actionPerformed(e);
1826 extractScores.setText(MessageManager.getString("label.extract_scores")
1828 extractScores.addActionListener(new ActionListener()
1831 public void actionPerformed(ActionEvent e)
1833 extractScores_actionPerformed(e);
1836 extractScores.setVisible(true); // JBPNote: TODO: make gui for regex based
1838 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1840 * showProducts.addActionListener(new ActionListener() {
1842 * public void actionPerformed(ActionEvent e) {
1843 * showProducts_actionPerformed(e); } });
1845 openFeatureSettings.setText(MessageManager
1846 .getString("label.feature_settings"));
1847 openFeatureSettings.addActionListener(new ActionListener()
1850 public void actionPerformed(ActionEvent e)
1852 featureSettings_actionPerformed(e);
1856 .setText(MessageManager.getString("label.fetch_sequences"));
1857 fetchSequence.addActionListener(new ActionListener()
1860 public void actionPerformed(ActionEvent e)
1862 fetchSequence_actionPerformed(e);
1866 annotationColour.setText(MessageManager
1867 .getString("action.by_annotation"));
1868 annotationColour.addActionListener(new ActionListener()
1871 public void actionPerformed(ActionEvent e)
1873 annotationColour_actionPerformed(e);
1877 rnahelicesColour.setText(MessageManager
1878 .getString("action.by_rna_helixes"));
1879 rnahelicesColour.addActionListener(new ActionListener()
1882 public void actionPerformed(ActionEvent e)
1884 rnahelicesColour_actionPerformed(e);
1888 associatedData.setText(MessageManager
1889 .getString("label.load_features_annotations"));
1890 associatedData.addActionListener(new ActionListener()
1893 public void actionPerformed(ActionEvent e)
1895 associatedData_actionPerformed(e);
1898 autoCalculate.setText(MessageManager
1899 .getString("label.autocalculate_consensus"));
1900 autoCalculate.setState(jalview.bin.Cache.getDefault(
1901 "AUTO_CALC_CONSENSUS", true));
1902 autoCalculate.addActionListener(new ActionListener()
1905 public void actionPerformed(ActionEvent e)
1907 autoCalculate_actionPerformed(e);
1910 sortByTree.setText(MessageManager
1911 .getString("label.sort_alignment_new_tree"));
1913 .setToolTipText("<html>"
1915 .getString("label.enable_automatically_sort_alignment_when_open_new_tree"));
1917 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1918 sortByTree.addActionListener(new ActionListener()
1921 public void actionPerformed(ActionEvent e)
1923 sortByTreeOption_actionPerformed(e);
1927 listenToViewSelections.setText(MessageManager
1928 .getString("label.listen_for_selections"));
1929 listenToViewSelections
1930 .setToolTipText("<html>"
1932 .getString("label.selections_mirror_selections_made_same_sequences_other_views"));
1933 listenToViewSelections.setState(false);
1934 listenToViewSelections.addActionListener(new ActionListener()
1937 public void actionPerformed(ActionEvent e)
1939 listenToViewSelections_actionPerformed(e);
1944 .setText(MessageManager.getString("label.add_sequences"));
1945 addFromFile.setText(MessageManager.getString("label.from_file"));
1946 addFromFile.addActionListener(new ActionListener()
1949 public void actionPerformed(ActionEvent e)
1951 addFromFile_actionPerformed(e);
1954 addFromText.setText(MessageManager.getString("label.from_textbox"));
1955 addFromText.addActionListener(new ActionListener()
1958 public void actionPerformed(ActionEvent e)
1960 addFromText_actionPerformed(e);
1963 addFromURL.setText(MessageManager.getString("label.from_url"));
1964 addFromURL.addActionListener(new ActionListener()
1967 public void actionPerformed(ActionEvent e)
1969 addFromURL_actionPerformed(e);
1972 exportFeatures.setText(MessageManager
1973 .getString("label.export_features"));
1974 exportFeatures.addActionListener(new ActionListener()
1977 public void actionPerformed(ActionEvent e)
1979 exportFeatures_actionPerformed(e);
1982 exportAnnotations.setText(MessageManager
1983 .getString("label.export_annotations"));
1984 exportAnnotations.addActionListener(new ActionListener()
1987 public void actionPerformed(ActionEvent e)
1989 exportAnnotations_actionPerformed(e);
1992 statusPanel.setLayout(gridLayout1);
1993 jMenu3.setText(MessageManager.getString("action.show"));
1994 showAllSeqs.setText(MessageManager.getString("label.all_sequences"));
1995 showAllSeqs.setToolTipText(MessageManager
1996 .getString("label.toggle_sequence_visibility"));
1997 showAllSeqs.addActionListener(new ActionListener()
2000 public void actionPerformed(ActionEvent e)
2002 showAllSeqs_actionPerformed(e);
2005 showAllColumns.setText(MessageManager.getString("label.all_columns"));
2006 showAllColumns.setToolTipText(MessageManager
2007 .getString("label.toggle_columns_visibility"));
2008 showAllColumns.addActionListener(new ActionListener()
2011 public void actionPerformed(ActionEvent e)
2013 showAllColumns_actionPerformed(e);
2016 hideMenu.setText(MessageManager.getString("action.hide"));
2017 hideSelSequences.setText(MessageManager
2018 .getString("label.selected_sequences"));
2019 hideSelSequences.setToolTipText(MessageManager
2020 .getString("label.toggle_sequence_visibility"));
2021 hideSelSequences.addActionListener(new ActionListener()
2024 public void actionPerformed(ActionEvent e)
2026 hideSelSequences_actionPerformed(e);
2029 hideSelColumns.setText(MessageManager
2030 .getString("label.selected_columns"));
2031 hideSelColumns.setToolTipText(MessageManager
2032 .getString("label.toggle_columns_visibility"));
2033 hideSelColumns.addActionListener(new ActionListener()
2036 public void actionPerformed(ActionEvent e)
2038 hideSelColumns_actionPerformed(e);
2041 hideAllSelection.setText(MessageManager
2042 .getString("label.selected_region"));
2043 hideAllSelection.addActionListener(new ActionListener()
2046 public void actionPerformed(ActionEvent e)
2048 hideAllSelection_actionPerformed(e);
2051 // TODO: should be hidden if no selection exists.
2052 hideAllButSelection.setText(MessageManager
2053 .getString("label.all_but_selected_region"));
2054 hideAllButSelection.addActionListener(new ActionListener()
2057 public void actionPerformed(ActionEvent e)
2059 hideAllButSelection_actionPerformed(e);
2062 showAllhidden.setText(MessageManager
2063 .getString("label.all_sequences_columns"));
2064 showAllhidden.setToolTipText(MessageManager
2065 .getString("label.toggles_visibility_hidden_selected_regions"));
2066 showAllhidden.addActionListener(new ActionListener()
2069 public void actionPerformed(ActionEvent e)
2071 showAllhidden_actionPerformed(e);
2074 hiddenMarkers.setText(MessageManager
2075 .getString("action.show_hidden_markers"));
2076 hiddenMarkers.addActionListener(new ActionListener()
2079 public void actionPerformed(ActionEvent e)
2081 hiddenMarkers_actionPerformed(e);
2084 invertColSel.setText(MessageManager
2085 .getString("action.invert_column_selection"));
2086 invertColSel.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
2087 java.awt.event.KeyEvent.VK_I, Toolkit.getDefaultToolkit()
2088 .getMenuShortcutKeyMask()
2089 | java.awt.event.KeyEvent.ALT_MASK, false));
2090 invertColSel.addActionListener(new ActionListener()
2093 public void actionPerformed(ActionEvent e)
2095 invertColSel_actionPerformed(e);
2098 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
2101 public void stateChanged(ChangeEvent evt)
2103 JTabbedPane pane = (JTabbedPane) evt.getSource();
2104 int sel = pane.getSelectedIndex();
2105 tabSelectionChanged(sel);
2108 tabbedPane.addMouseListener(new MouseAdapter()
2111 public void mousePressed(MouseEvent e)
2113 tabbedPane_mousePressed(e);
2116 tabbedPane.addFocusListener(new FocusAdapter()
2119 public void focusGained(FocusEvent e)
2121 tabbedPane_focusGained(e);
2124 save.setText(MessageManager.getString("action.save"));
2125 save.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
2126 java.awt.event.KeyEvent.VK_S, Toolkit.getDefaultToolkit()
2127 .getMenuShortcutKeyMask(), false));
2128 save.addActionListener(new ActionListener()
2131 public void actionPerformed(ActionEvent e)
2133 save_actionPerformed(e);
2136 reload.setEnabled(false);
2137 reload.setText(MessageManager.getString("action.reload"));
2138 reload.addActionListener(new ActionListener()
2141 public void actionPerformed(ActionEvent e)
2143 reload_actionPerformed(e);
2146 newView.setText(MessageManager.getString("action.new_view"));
2147 newView.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
2148 java.awt.event.KeyEvent.VK_T, Toolkit.getDefaultToolkit()
2149 .getMenuShortcutKeyMask(), false));
2150 newView.addActionListener(new ActionListener()
2153 public void actionPerformed(ActionEvent e)
2155 newView_actionPerformed(e);
2158 tabbedPane.setToolTipText("<html><i>"
2159 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
2161 textColour.setText(MessageManager.getString("label.colour_text")
2163 textColour.addActionListener(new ActionListener()
2166 public void actionPerformed(ActionEvent e)
2168 textColour_actionPerformed(e);
2171 formatMenu.setText(MessageManager.getString("action.format"));
2172 selectMenu.setText(MessageManager.getString("action.select"));
2173 idRightAlign.setText(MessageManager
2174 .getString("label.right_align_sequence_id"));
2175 idRightAlign.addActionListener(new ActionListener()
2178 public void actionPerformed(ActionEvent e)
2180 idRightAlign_actionPerformed(e);
2183 gatherViews.setEnabled(false);
2184 gatherViews.setText(MessageManager.getString("action.gather_views"));
2185 gatherViews.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
2186 java.awt.event.KeyEvent.VK_G, 0, false));
2187 gatherViews.addActionListener(new ActionListener()
2190 public void actionPerformed(ActionEvent e)
2192 gatherViews_actionPerformed(e);
2195 expandViews.setEnabled(false);
2196 expandViews.setText(MessageManager.getString("action.expand_views"));
2197 expandViews.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
2198 java.awt.event.KeyEvent.VK_X, 0, false));
2199 expandViews.addActionListener(new ActionListener()
2202 public void actionPerformed(ActionEvent e)
2204 expandViews_actionPerformed(e);
2208 .setText(MessageManager.getString("action.page_setup") + "...");
2209 pageSetup.addActionListener(new ActionListener()
2212 public void actionPerformed(ActionEvent e)
2214 pageSetup_actionPerformed(e);
2217 alignmentProperties.setText(MessageManager
2218 .getString("label.alignment_props") + "...");
2219 alignmentProperties.addActionListener(new ActionListener()
2222 public void actionPerformed(ActionEvent actionEvent)
2224 alignmentProperties();
2227 tooltipSettingsMenu.setText(MessageManager
2228 .getString("label.sequence_id_tooltip"));
2229 autoAnnMenu.setText(MessageManager
2230 .getString("label.autocalculated_annotation"));
2231 alignFrameMenuBar.add(fileMenu);
2232 alignFrameMenuBar.add(editMenu);
2233 alignFrameMenuBar.add(selectMenu);
2234 alignFrameMenuBar.add(viewMenu);
2235 alignFrameMenuBar.add(annotationsMenu);
2236 alignFrameMenuBar.add(formatMenu);
2237 alignFrameMenuBar.add(colourMenu);
2238 alignFrameMenuBar.add(calculateMenu);
2239 alignFrameMenuBar.add(webService);
2240 fileMenu.add(fetchSequence);
2241 fileMenu.add(addSequenceMenu);
2242 fileMenu.add(reload);
2243 fileMenu.addSeparator();
2244 fileMenu.add(vamsasStore);
2246 fileMenu.add(saveAs);
2247 fileMenu.add(outputTextboxMenu);
2248 fileMenu.add(pageSetup);
2249 fileMenu.add(printMenuItem);
2250 fileMenu.addSeparator();
2251 fileMenu.add(jMenu2);
2252 fileMenu.add(exportFeatures);
2253 fileMenu.add(exportAnnotations);
2254 fileMenu.add(LoadtreeMenuItem);
2255 fileMenu.add(associatedData);
2256 fileMenu.addSeparator();
2257 fileMenu.add(closeMenuItem);
2258 editMenu.add(undoMenuItem);
2259 editMenu.add(redoMenuItem);
2262 editMenu.add(pasteMenu);
2263 editMenu.add(delete);
2264 editMenu.addSeparator();
2265 editMenu.add(remove2LeftMenuItem);
2266 editMenu.add(remove2RightMenuItem);
2267 editMenu.add(removeGappedColumnMenuItem);
2268 editMenu.add(removeAllGapsMenuItem);
2269 editMenu.add(removeRedundancyMenuItem);
2270 editMenu.addSeparator();
2271 // dont add these yet in the CVS build - they cannot be undone!
2272 // Excluded from Jalview 2.5 release - undo needs to be implemented.
2273 // editMenu.add(justifyLeftMenuItem);
2274 // editMenu.add(justifyRightMenuItem);
2275 // editMenu.addSeparator();
2276 editMenu.add(padGapsMenuitem);
2277 viewMenu.add(newView);
2278 viewMenu.add(expandViews);
2279 viewMenu.add(gatherViews);
2280 viewMenu.addSeparator();
2281 viewMenu.add(jMenu3);
2282 viewMenu.add(hideMenu);
2283 viewMenu.addSeparator();
2284 viewMenu.add(followHighlightMenuItem);
2285 annotationsMenu.add(annotationPanelMenuItem);
2286 annotationsMenu.addSeparator();
2287 annotationsMenu.add(showAllAlAnnotations);
2288 annotationsMenu.add(hideAllAlAnnotations);
2289 annotationsMenu.addSeparator();
2290 annotationsMenu.add(showAllSeqAnnotations);
2291 annotationsMenu.add(hideAllSeqAnnotations);
2292 annotationsMenu.add(sortAnnBySequence);
2293 annotationsMenu.add(sortAnnByLabel);
2294 annotationsMenu.addSeparator();
2295 autoAnnMenu.add(showAutoFirst);
2296 autoAnnMenu.add(showAutoLast);
2297 autoAnnMenu.addSeparator();
2298 autoAnnMenu.add(applyAutoAnnotationSettings);
2299 autoAnnMenu.add(showConsensusHistogram);
2300 autoAnnMenu.add(showSequenceLogo);
2301 autoAnnMenu.add(normaliseSequenceLogo);
2302 autoAnnMenu.addSeparator();
2303 autoAnnMenu.add(showGroupConservation);
2304 autoAnnMenu.add(showGroupConsensus);
2305 annotationsMenu.add(autoAnnMenu);
2306 viewMenu.addSeparator();
2307 viewMenu.add(showSeqFeatures);
2308 // viewMenu.add(showSeqFeaturesHeight);
2310 viewMenu.add(openFeatureSettings);
2311 tooltipSettingsMenu.add(showDbRefsMenuitem);
2312 tooltipSettingsMenu.add(showNpFeatsMenuitem);
2313 viewMenu.add(tooltipSettingsMenu);
2314 viewMenu.addSeparator();
2315 viewMenu.add(alignmentProperties);
2316 viewMenu.addSeparator();
2317 viewMenu.add(overviewMenuItem);
2318 colourMenu.add(applyToAllGroups);
2319 colourMenu.add(textColour);
2320 colourMenu.addSeparator();
2321 colourMenu.add(noColourmenuItem);
2322 colourMenu.add(clustalColour);
2323 colourMenu.add(BLOSUM62Colour);
2324 colourMenu.add(PIDColour);
2325 colourMenu.add(zappoColour);
2326 colourMenu.add(taylorColour);
2327 colourMenu.add(hydrophobicityColour);
2328 colourMenu.add(helixColour);
2329 colourMenu.add(strandColour);
2330 colourMenu.add(turnColour);
2331 colourMenu.add(buriedColour);
2332 colourMenu.add(nucleotideColour);
2333 colourMenu.add(purinePyrimidineColour);
2334 colourMenu.add(RNAInteractionColour);
2335 // colourMenu.add(covariationColour);
2336 colourMenu.add(tcoffeeColour);
2337 colourMenu.add(userDefinedColour);
2338 colourMenu.addSeparator();
2339 colourMenu.add(conservationMenuItem);
2340 colourMenu.add(modifyConservation);
2341 colourMenu.add(abovePIDThreshold);
2342 colourMenu.add(modifyPID);
2343 colourMenu.add(annotationColour);
2344 colourMenu.add(rnahelicesColour);
2345 calculateMenu.add(sort);
2346 calculateMenu.add(calculateTree);
2347 calculateMenu.addSeparator();
2348 calculateMenu.add(pairwiseAlignmentMenuItem);
2349 calculateMenu.add(PCAMenuItem);
2350 calculateMenu.addSeparator();
2351 calculateMenu.add(showTranslation);
2352 calculateMenu.add(showProducts);
2353 calculateMenu.add(autoCalculate);
2354 calculateMenu.add(sortByTree);
2355 calculateMenu.addSeparator();
2356 calculateMenu.add(extractScores);
2357 webServiceNoServices = new JMenuItem(
2358 MessageManager.getString("label.no_services"));
2359 webService.add(webServiceNoServices);
2360 pasteMenu.add(pasteNew);
2361 pasteMenu.add(pasteThis);
2362 sort.add(sortIDMenuItem);
2363 sort.add(sortLengthMenuItem);
2364 sort.add(sortGroupMenuItem);
2365 sort.add(sortPairwiseMenuItem);
2366 sort.add(sortByTreeMenu);
2367 jMenu2.add(htmlMenuItem);
2368 jMenu2.add(epsFile);
2369 jMenu2.add(createPNG);
2370 jMenu2.add(createBioJS);
2371 jMenu2.add(createSVG);
2372 addSequenceMenu.add(addFromFile);
2373 addSequenceMenu.add(addFromText);
2374 addSequenceMenu.add(addFromURL);
2375 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
2376 statusPanel.add(statusBar, null);
2377 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
2378 jMenu3.add(showAllColumns);
2379 jMenu3.add(showAllSeqs);
2380 jMenu3.add(showAllhidden);
2381 hideMenu.add(hideSelColumns);
2382 hideMenu.add(hideSelSequences);
2383 hideMenu.add(hideAllSelection);
2384 hideMenu.add(hideAllButSelection);
2386 formatMenu.add(font);
2387 formatMenu.addSeparator();
2388 formatMenu.add(wrapMenuItem);
2389 formatMenu.add(scaleAbove);
2390 formatMenu.add(scaleLeft);
2391 formatMenu.add(scaleRight);
2392 formatMenu.add(seqLimits);
2393 formatMenu.add(idRightAlign);
2394 formatMenu.add(hiddenMarkers);
2395 formatMenu.add(viewBoxesMenuItem);
2396 formatMenu.add(viewTextMenuItem);
2397 formatMenu.add(colourTextMenuItem);
2398 formatMenu.add(renderGapsMenuItem);
2399 formatMenu.add(centreColumnLabelsMenuItem);
2400 formatMenu.add(showNonconservedMenuItem);
2401 selectMenu.add(findMenuItem);
2402 selectMenu.addSeparator();
2403 selectMenu.add(selectAllSequenceMenuItem);
2404 selectMenu.add(deselectAllSequenceMenuItem);
2405 selectMenu.add(invertSequenceMenuItem);
2406 selectMenu.add(invertColSel);
2407 selectMenu.add(createGroup);
2408 selectMenu.add(unGroup);
2409 selectMenu.add(grpsFromSelection);
2410 selectMenu.add(deleteGroups);
2411 calculateMenu.add(expandAlignment);
2412 // TODO - determine if the listenToViewSelections button is needed : see bug
2414 // selectMenu.addSeparator();
2415 // selectMenu.add(listenToViewSelections);
2419 * Action on clicking sort annotations by type.
2423 protected void sortAnnotations_actionPerformed()
2428 * Action on clicking Show all annotations.
2430 * @param forSequences
2431 * update sequence-related annotations
2432 * @param forAlignment
2433 * update non-sequence-related annotations
2435 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2436 boolean forAlignment)
2438 setAnnotationsVisibility(true, forSequences, forAlignment);
2442 * Action on clicking Hide all annotations.
2444 * @param forSequences
2445 * update sequence-related annotations
2446 * @param forAlignment
2447 * update non-sequence-related annotations
2449 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2450 boolean forAlignment)
2452 setAnnotationsVisibility(false, forSequences, forAlignment);
2456 * Set the visibility of annotations to true or false. Can act on
2457 * sequence-related annotations, or alignment-related, or both.
2460 * @param forSequences
2461 * update sequence-related annotations
2462 * @param forAlignment
2463 * update non-sequence-related annotations
2465 protected void setAnnotationsVisibility(boolean visible,
2466 boolean forSequences, boolean forAlignment)
2471 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2473 // TODO Auto-generated method stub
2477 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2479 // TODO Auto-generated method stub
2483 protected void showAllhidden_actionPerformed(ActionEvent e)
2485 // TODO Auto-generated method stub
2489 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2491 // TODO Auto-generated method stub
2495 protected void hideAllSelection_actionPerformed(ActionEvent e)
2497 // TODO Auto-generated method stub
2501 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2503 // TODO Auto-generated method stub
2507 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2509 // TODO Auto-generated method stub
2513 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2515 // TODO Auto-generated method stub
2519 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2521 // TODO Auto-generated method stub
2525 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2527 // TODO Auto-generated method stub
2531 protected void showGroupConservation_actionPerformed(ActionEvent e)
2533 // TODO Auto-generated method stub
2537 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2539 // TODO Auto-generated method stub
2543 protected void showSeqFeaturesHeight_actionPerformed(
2544 ActionEvent actionEvent)
2546 // TODO Auto-generated method stub
2550 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2552 // TODO Auto-generated method stub
2556 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2558 // TODO Auto-generated method stub
2562 protected void followHighlight_actionPerformed()
2564 // TODO Auto-generated method stub
2568 protected void showNpFeats_actionPerformed(ActionEvent e)
2570 // TODO Auto-generated method stub
2574 protected void showDbRefs_actionPerformed(ActionEvent e)
2576 // TODO Auto-generated method stub
2580 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2584 protected void showProducts_actionPerformed(ActionEvent e)
2588 protected void buildSortByAnnotationScoresMenu()
2592 protected void extractScores_actionPerformed(ActionEvent e)
2596 protected void outputText_actionPerformed(ActionEvent e)
2600 public void addFromFile_actionPerformed(ActionEvent e)
2605 public void addFromText_actionPerformed(ActionEvent e)
2610 public void addFromURL_actionPerformed(ActionEvent e)
2615 public void exportFeatures_actionPerformed(ActionEvent e)
2620 public void exportAnnotations_actionPerformed(ActionEvent e)
2625 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2629 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2634 protected void closeMenuItem_actionPerformed(boolean b)
2638 protected void redoMenuItem_actionPerformed(ActionEvent e)
2642 protected void undoMenuItem_actionPerformed(ActionEvent e)
2646 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2650 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2654 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2658 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2662 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2666 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2670 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2674 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2678 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2682 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2686 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2690 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2694 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2698 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2702 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2706 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2710 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2714 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2718 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2722 protected void PCAMenuItem_actionPerformed(ActionEvent e)
2726 protected void averageDistanceTreeMenuItem_actionPerformed(ActionEvent e)
2730 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2734 protected void njTreeBlosumMenuItem_actionPerformed(ActionEvent e)
2738 protected void avTreeBlosumMenuItem_actionPerformed(ActionEvent e)
2742 protected void clustalColour_actionPerformed(ActionEvent e)
2746 protected void zappoColour_actionPerformed(ActionEvent e)
2750 protected void taylorColour_actionPerformed(ActionEvent e)
2754 protected void hydrophobicityColour_actionPerformed(ActionEvent e)
2758 protected void helixColour_actionPerformed(ActionEvent e)
2762 protected void strandColour_actionPerformed(ActionEvent e)
2766 protected void turnColour_actionPerformed(ActionEvent e)
2770 protected void buriedColour_actionPerformed(ActionEvent e)
2774 protected void userDefinedColour_actionPerformed(ActionEvent e)
2778 protected void PIDColour_actionPerformed(ActionEvent e)
2782 protected void BLOSUM62Colour_actionPerformed(ActionEvent e)
2786 protected void purinePyrimidineColour_actionPerformed(ActionEvent e)
2790 protected void RNAInteractionColour_actionPerformed(ActionEvent e)
2795 * protected void covariationColour_actionPerformed(ActionEvent e) { }
2798 protected void noColourmenuItem_actionPerformed(ActionEvent e)
2802 protected void conservationMenuItem_actionPerformed(ActionEvent e)
2806 protected void printMenuItem_actionPerformed(ActionEvent e)
2810 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2814 protected void findMenuItem_actionPerformed(ActionEvent e)
2818 protected void abovePIDThreshold_actionPerformed(ActionEvent e)
2822 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2826 protected void nucleotideColour_actionPerformed(ActionEvent e)
2830 protected void deleteGroups_actionPerformed(ActionEvent e)
2834 protected void createGroup_actionPerformed(ActionEvent e)
2838 protected void unGroup_actionPerformed(ActionEvent e)
2842 protected void copy_actionPerformed(ActionEvent e)
2846 protected void cut_actionPerformed(ActionEvent e)
2850 protected void delete_actionPerformed(ActionEvent e)
2854 protected void pasteNew_actionPerformed(ActionEvent e)
2858 protected void pasteThis_actionPerformed(ActionEvent e)
2862 protected void applyToAllGroups_actionPerformed(ActionEvent e)
2866 public void createPNG(java.io.File f)
2870 protected void font_actionPerformed(ActionEvent e)
2874 protected void seqLimit_actionPerformed(ActionEvent e)
2878 public void seqDBRef_actionPerformed(ActionEvent e)
2883 public void createEPS(java.io.File f)
2887 public void createSVG(java.io.File f)
2891 protected void LoadtreeMenuItem_actionPerformed(ActionEvent e)
2897 * Template method to handle the 'load T-Coffee scores' menu event.
2899 * Subclasses override this method to provide a custom action.
2904 protected void loadScores_actionPerformed(ActionEvent event)
2910 * Template method to handle the 'Color T-Coffee scores' menu event.
2912 * Subclasses override this method to provide a custom action.
2917 protected void tcoffeeColorScheme_actionPerformed(ActionEvent event)
2922 protected void jpred_actionPerformed(ActionEvent e)
2926 protected void scaleAbove_actionPerformed(ActionEvent e)
2930 protected void scaleLeft_actionPerformed(ActionEvent e)
2934 protected void scaleRight_actionPerformed(ActionEvent e)
2938 protected void modifyPID_actionPerformed(ActionEvent e)
2942 protected void modifyConservation_actionPerformed(ActionEvent e)
2946 protected void saveAs_actionPerformed(ActionEvent e)
2950 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2954 public void vamsasStore_actionPerformed(ActionEvent e)
2959 public void vamsasLoad_actionPerformed(ActionEvent e)
2964 public void showTranslation_actionPerformed(ActionEvent e)
2969 public void featureSettings_actionPerformed(ActionEvent e)
2974 public void fetchSequence_actionPerformed(ActionEvent e)
2979 public void smoothFont_actionPerformed(ActionEvent e)
2984 public void annotationColour_actionPerformed(ActionEvent e)
2989 public void rnahelicesColour_actionPerformed(ActionEvent e)
2994 public void associatedData_actionPerformed(ActionEvent e)
2999 public void autoCalculate_actionPerformed(ActionEvent e)
3004 public void sortByTreeOption_actionPerformed(ActionEvent e)
3009 public void showAllSeqs_actionPerformed(ActionEvent e)
3014 public void showAllColumns_actionPerformed(ActionEvent e)
3019 public void hideSelSequences_actionPerformed(ActionEvent e)
3024 public void hideSelColumns_actionPerformed(ActionEvent e)
3029 public void hiddenMarkers_actionPerformed(ActionEvent e)
3034 public void findPdbId_actionPerformed(ActionEvent e)
3039 public void enterPdbId_actionPerformed(ActionEvent e)
3044 public void pdbFile_actionPerformed(ActionEvent e)
3049 public void invertColSel_actionPerformed(ActionEvent e)
3054 public void tabSelectionChanged(int sel)
3059 public void tabbedPane_mousePressed(MouseEvent e)
3064 public void tabbedPane_focusGained(FocusEvent e)
3069 public void save_actionPerformed(ActionEvent e)
3074 public void reload_actionPerformed(ActionEvent e)
3079 public void newView_actionPerformed(ActionEvent e)
3084 public void textColour_actionPerformed(ActionEvent e)
3089 public void idRightAlign_actionPerformed(ActionEvent e)
3094 public void expandViews_actionPerformed(ActionEvent e)
3099 public void gatherViews_actionPerformed(ActionEvent e)
3104 public void buildTreeMenu()
3109 public void pageSetup_actionPerformed(ActionEvent e)
3114 public void alignmentProperties()
3119 protected void expand_newalign(ActionEvent e)
3121 // TODO Auto-generated method stub
3125 protected boolean isShowAutoCalculatedAbove()
3127 return showAutoCalculatedAbove;
3130 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
3132 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
3135 protected SequenceAnnotationOrder getAnnotationSortOrder()
3137 return annotationSortOrder;
3140 protected void setAnnotationSortOrder(SequenceAnnotationOrder annotationSortOrder)
3142 this.annotationSortOrder = annotationSortOrder;