2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ 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.api.SplitContainerI;
25 import jalview.bin.Cache;
26 import jalview.gui.JvSwingUtils;
27 import jalview.gui.Preferences;
28 import jalview.io.FileFormats;
29 import jalview.util.MessageManager;
30 import jalview.util.Platform;
32 import java.awt.BorderLayout;
33 import java.awt.Color;
34 import java.awt.GridLayout;
35 import java.awt.Toolkit;
36 import java.awt.event.ActionEvent;
37 import java.awt.event.ActionListener;
38 import java.awt.event.FocusAdapter;
39 import java.awt.event.FocusEvent;
40 import java.awt.event.KeyEvent;
41 import java.awt.event.MouseAdapter;
42 import java.awt.event.MouseEvent;
43 import java.io.IOException;
44 import java.util.HashMap;
47 import javax.swing.BorderFactory;
48 import javax.swing.ButtonGroup;
49 import javax.swing.JCheckBoxMenuItem;
50 import javax.swing.JInternalFrame;
51 import javax.swing.JLabel;
52 import javax.swing.JMenu;
53 import javax.swing.JMenuBar;
54 import javax.swing.JMenuItem;
55 import javax.swing.JPanel;
56 import javax.swing.JRadioButtonMenuItem;
57 import javax.swing.JTabbedPane;
58 import javax.swing.KeyStroke;
59 import javax.swing.event.ChangeEvent;
60 import javax.swing.event.MenuEvent;
61 import javax.swing.event.MenuListener;
63 public class GAlignFrame extends JInternalFrame
65 protected JMenuBar alignFrameMenuBar = new JMenuBar();
67 protected JMenuItem closeMenuItem = new JMenuItem();
69 protected JMenu webService = new JMenu();
71 protected JMenu hmmerMenu = new JMenu();
73 protected JMenuItem hmmAlign = new JMenuItem();
75 protected JMenuItem hmmSearch = new JMenuItem();
77 protected JMenuItem hmmBuild = new JCheckBoxMenuItem();
79 protected JMenuItem webServiceNoServices;
81 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
83 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
85 protected JMenu sortByAnnotScore = new JMenu();
87 public JLabel statusBar = new JLabel();
89 protected JMenu outputTextboxMenu = new JMenu();
91 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
93 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
95 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
97 protected JMenuItem undoMenuItem = new JMenuItem();
99 protected JMenuItem redoMenuItem = new JMenuItem();
101 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
103 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
105 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
107 JMenuItem copy = new JMenuItem();
109 JMenuItem cut = new JMenuItem();
111 JMenu pasteMenu = new JMenu();
113 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
115 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
117 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
119 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
121 protected JCheckBoxMenuItem applyToAllGroups;
123 protected JMenu colourMenu = new JMenu();
125 protected JMenuItem textColour;
127 protected JCheckBoxMenuItem conservationMenuItem;
129 protected JMenuItem modifyConservation;
131 protected JCheckBoxMenuItem abovePIDThreshold;
133 protected JMenuItem modifyPID;
135 protected JMenuItem annotationColour;
137 protected JMenu sortByTreeMenu = new JMenu();
139 protected JMenu sort = new JMenu();
141 protected JMenuItem calculateTree = new JMenuItem();
143 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
145 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
147 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
149 protected JMenuItem showTranslation = new JMenuItem();
151 protected JMenuItem showReverse = new JMenuItem();
153 protected JMenuItem showReverseComplement = new JMenuItem();
155 protected JMenu showProducts = new JMenu();
157 protected JMenuItem runGroovy = new JMenuItem();
159 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
161 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
163 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
165 protected JPanel statusPanel = new JPanel();
167 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
169 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
171 protected JMenuItem showAllAlAnnotations = new JMenuItem();
173 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
175 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
177 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
179 protected JTabbedPane tabbedPane = new JTabbedPane();
181 protected JMenuItem reload = new JMenuItem();
183 protected JMenu formatMenu = new JMenu();
185 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
187 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
189 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
191 protected JMenuItem gatherViews = new JMenuItem();
193 protected JMenuItem expandViews = new JMenuItem();
195 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
197 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
199 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
201 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
203 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
205 protected JCheckBoxMenuItem showInformationHistogram = new JCheckBoxMenuItem();
207 protected JCheckBoxMenuItem showHMMSequenceLogo = new JCheckBoxMenuItem();
209 protected JCheckBoxMenuItem normaliseHMMSequenceLogo = new JCheckBoxMenuItem();
211 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
213 private SequenceAnnotationOrder annotationSortOrder;
215 private boolean showAutoCalculatedAbove = false;
217 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
219 private SplitContainerI splitFrame;
226 setJMenuBar(alignFrameMenuBar);
228 // dynamically fill save as menu with available formats
229 for (String ff : FileFormats.getInstance().getWritableFormats(true))
231 JMenuItem item = new JMenuItem(ff);
233 item.addActionListener(new ActionListener()
236 public void actionPerformed(ActionEvent e)
238 outputText_actionPerformed(e);
242 outputTextboxMenu.add(item);
244 } catch (Exception e)
246 System.err.println(e.toString());
249 if (!Platform.isAMac())
251 closeMenuItem.setMnemonic('C');
252 outputTextboxMenu.setMnemonic('T');
253 undoMenuItem.setMnemonic('Z');
254 redoMenuItem.setMnemonic('0');
255 copy.setMnemonic('C');
256 cut.setMnemonic('U');
257 pasteMenu.setMnemonic('P');
258 reload.setMnemonic('R');
262 private void jbInit() throws Exception
267 JMenuItem saveAs = new JMenuItem(
268 MessageManager.getString("action.save_as"));
269 ActionListener al = new ActionListener()
272 public void actionPerformed(ActionEvent e)
274 saveAs_actionPerformed(e);
278 // FIXME getDefaultToolkit throws an exception in Headless mode
279 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, Toolkit
280 .getDefaultToolkit().getMenuShortcutKeyMask()
281 | KeyEvent.SHIFT_MASK, false);
282 addMenuActionAndAccelerator(keyStroke, saveAs, al);
284 closeMenuItem.setText(MessageManager.getString("action.close"));
285 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W, Toolkit
286 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
287 al = new ActionListener()
290 public void actionPerformed(ActionEvent e)
292 closeMenuItem_actionPerformed(false);
295 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
297 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
298 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
299 JMenu annotationsMenu = new JMenu(
300 MessageManager.getString("action.annotations"));
301 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
302 colourMenu.setText(MessageManager.getString("action.colour"));
303 JMenu calculateMenu = new JMenu(
304 MessageManager.getString("action.calculate"));
305 webService.setText(MessageManager.getString("action.web_service"));
306 hmmerMenu.setText(MessageManager.getString("action.hmmer"));
307 String status = Cache.getProperty("HMMER_FUNCTIONING");
308 if ("false".equals(status) || status == null)
310 hmmerMenu.setEnabled(false);
314 hmmerMenu.setEnabled(true);
316 hmmerMenu.addActionListener(new ActionListener()
320 public void actionPerformed(ActionEvent e)
322 hmmerMenu_actionPerformed(e);
325 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
326 MessageManager.getString("action.select_all"));
327 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A, Toolkit
328 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
329 al = new ActionListener()
332 public void actionPerformed(ActionEvent e)
334 selectAllSequenceMenuItem_actionPerformed(e);
337 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
339 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
340 MessageManager.getString("action.deselect_all"));
341 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
342 al = new ActionListener()
345 public void actionPerformed(ActionEvent e)
347 deselectAllSequenceMenuItem_actionPerformed(e);
350 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
352 JMenuItem invertSequenceMenuItem = new JMenuItem(
353 MessageManager.getString("action.invert_sequence_selection"));
354 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I, Toolkit
355 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
356 al = new ActionListener()
359 public void actionPerformed(ActionEvent e)
361 invertSequenceMenuItem_actionPerformed(e);
364 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
366 JMenuItem grpsFromSelection = new JMenuItem(
367 MessageManager.getString("action.make_groups_selection"));
368 grpsFromSelection.addActionListener(new ActionListener()
371 public void actionPerformed(ActionEvent e)
373 makeGrpsFromSelection_actionPerformed(e);
376 JMenuItem expandAlignment = new JMenuItem(
377 MessageManager.getString("action.view_flanking_regions"));
378 expandAlignment.setToolTipText(MessageManager
379 .getString("label.view_flanking_regions"));
380 expandAlignment.addActionListener(new ActionListener()
383 public void actionPerformed(ActionEvent e)
388 JMenuItem remove2LeftMenuItem = new JMenuItem(
389 MessageManager.getString("action.remove_left"));
390 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L, Toolkit
391 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
392 al = new ActionListener()
395 public void actionPerformed(ActionEvent e)
397 remove2LeftMenuItem_actionPerformed(e);
400 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
402 JMenuItem remove2RightMenuItem = new JMenuItem(
403 MessageManager.getString("action.remove_right"));
404 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R, Toolkit
405 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
406 al = new ActionListener()
409 public void actionPerformed(ActionEvent e)
411 remove2RightMenuItem_actionPerformed(e);
414 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
416 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
417 MessageManager.getString("action.remove_empty_columns"));
418 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E, Toolkit
419 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
420 al = new ActionListener()
423 public void actionPerformed(ActionEvent e)
425 removeGappedColumnMenuItem_actionPerformed(e);
428 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
430 JMenuItem removeAllGapsMenuItem = new JMenuItem(
431 MessageManager.getString("action.remove_all_gaps"));
432 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E, Toolkit
433 .getDefaultToolkit().getMenuShortcutKeyMask()
434 | KeyEvent.SHIFT_MASK, false);
435 al = new ActionListener()
438 public void actionPerformed(ActionEvent e)
440 removeAllGapsMenuItem_actionPerformed(e);
443 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
445 JMenuItem justifyLeftMenuItem = new JMenuItem(
446 MessageManager.getString("action.left_justify_alignment"));
447 justifyLeftMenuItem.addActionListener(new ActionListener()
450 public void actionPerformed(ActionEvent e)
452 justifyLeftMenuItem_actionPerformed(e);
455 JMenuItem justifyRightMenuItem = new JMenuItem(
456 MessageManager.getString("action.right_justify_alignment"));
457 justifyRightMenuItem.addActionListener(new ActionListener()
460 public void actionPerformed(ActionEvent e)
462 justifyRightMenuItem_actionPerformed(e);
465 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
466 viewBoxesMenuItem.setState(true);
467 viewBoxesMenuItem.addActionListener(new ActionListener()
470 public void actionPerformed(ActionEvent e)
472 viewBoxesMenuItem_actionPerformed(e);
475 viewTextMenuItem.setText(MessageManager.getString("action.text"));
476 viewTextMenuItem.setState(true);
477 viewTextMenuItem.addActionListener(new ActionListener()
480 public void actionPerformed(ActionEvent e)
482 viewTextMenuItem_actionPerformed(e);
485 showNonconservedMenuItem.setText(MessageManager
486 .getString("label.show_non_conserved"));
487 showNonconservedMenuItem.setState(false);
488 showNonconservedMenuItem.addActionListener(new ActionListener()
491 public void actionPerformed(ActionEvent e)
493 showUnconservedMenuItem_actionPerformed(e);
496 JMenuItem sortPairwiseMenuItem = new JMenuItem(
497 MessageManager.getString("action.by_pairwise_id"));
498 sortPairwiseMenuItem.addActionListener(new ActionListener()
501 public void actionPerformed(ActionEvent e)
503 sortPairwiseMenuItem_actionPerformed(e);
506 JMenuItem sortIDMenuItem = new JMenuItem(
507 MessageManager.getString("action.by_id"));
508 sortIDMenuItem.addActionListener(new ActionListener()
511 public void actionPerformed(ActionEvent e)
513 sortIDMenuItem_actionPerformed(e);
516 JMenuItem sortLengthMenuItem = new JMenuItem(
517 MessageManager.getString("action.by_length"));
518 sortLengthMenuItem.addActionListener(new ActionListener()
521 public void actionPerformed(ActionEvent e)
523 sortLengthMenuItem_actionPerformed(e);
526 JMenuItem sortGroupMenuItem = new JMenuItem(
527 MessageManager.getString("action.by_group"));
528 sortGroupMenuItem.addActionListener(new ActionListener()
531 public void actionPerformed(ActionEvent e)
533 sortGroupMenuItem_actionPerformed(e);
537 JMenuItem removeRedundancyMenuItem = new JMenuItem(
538 MessageManager.getString("action.remove_redundancy"));
539 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D, Toolkit
540 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
541 al = new ActionListener()
544 public void actionPerformed(ActionEvent e)
546 removeRedundancyMenuItem_actionPerformed(e);
549 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
551 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
552 MessageManager.getString("action.pairwise_alignment"));
553 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
556 public void actionPerformed(ActionEvent e)
558 pairwiseAlignmentMenuItem_actionPerformed(e);
562 this.getContentPane().setLayout(new BorderLayout());
563 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
564 statusBar.setBackground(Color.white);
565 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
566 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
567 statusBar.setText(MessageManager.getString("label.status_bar"));
568 outputTextboxMenu.setText(MessageManager
569 .getString("label.out_to_textbox"));
571 annotationPanelMenuItem.setActionCommand("");
572 annotationPanelMenuItem.setText(MessageManager
573 .getString("label.show_annotations"));
574 annotationPanelMenuItem.setState(Cache.getDefault("SHOW_ANNOTATIONS",
576 annotationPanelMenuItem.addActionListener(new ActionListener()
579 public void actionPerformed(ActionEvent e)
581 annotationPanelMenuItem_actionPerformed(e);
584 showAllAlAnnotations.setText(MessageManager
585 .getString("label.show_all_al_annotations"));
586 final boolean isAnnotationPanelShown = annotationPanelMenuItem
588 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
589 showAllAlAnnotations.addActionListener(new ActionListener()
592 public void actionPerformed(ActionEvent e)
594 showAllAnnotations_actionPerformed(false, true);
597 hideAllAlAnnotations.setText(MessageManager
598 .getString("label.hide_all_al_annotations"));
599 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
600 hideAllAlAnnotations.addActionListener(new ActionListener()
603 public void actionPerformed(ActionEvent e)
605 hideAllAnnotations_actionPerformed(false, true);
608 showAllSeqAnnotations.setText(MessageManager
609 .getString("label.show_all_seq_annotations"));
610 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
611 showAllSeqAnnotations.addActionListener(new ActionListener()
614 public void actionPerformed(ActionEvent e)
616 showAllAnnotations_actionPerformed(true, false);
619 hideAllSeqAnnotations.setText(MessageManager
620 .getString("label.hide_all_seq_annotations"));
621 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
622 hideAllSeqAnnotations.addActionListener(new ActionListener()
625 public void actionPerformed(ActionEvent e)
627 hideAllAnnotations_actionPerformed(true, false);
630 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
631 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
632 SequenceAnnotationOrder.NONE.name()));
633 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
634 MessageManager.getString("label.sort_annotations_by_sequence"));
635 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
636 MessageManager.getString("label.sort_annotations_by_label"));
639 .setSelected(sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
640 sortAnnBySequence.addActionListener(new ActionListener()
643 public void actionPerformed(ActionEvent e)
645 boolean newState = sortAnnBySequence.getState();
646 sortAnnByLabel.setSelected(false);
647 setAnnotationSortOrder(newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
648 : SequenceAnnotationOrder.NONE);
649 sortAnnotations_actionPerformed();
653 .setSelected(sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
654 sortAnnByLabel.addActionListener(new ActionListener()
657 public void actionPerformed(ActionEvent e)
659 boolean newState = sortAnnByLabel.getState();
660 sortAnnBySequence.setSelected(false);
661 setAnnotationSortOrder(newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
662 : SequenceAnnotationOrder.NONE);
663 sortAnnotations_actionPerformed();
666 colourTextMenuItem = new JCheckBoxMenuItem(
668 .getString("label.colour_text"));
669 colourTextMenuItem.addActionListener(new ActionListener()
672 public void actionPerformed(ActionEvent e)
674 colourTextMenuItem_actionPerformed(e);
678 JMenuItem htmlMenuItem = new JMenuItem(
679 MessageManager.getString("label.html"));
680 htmlMenuItem.addActionListener(new ActionListener()
683 public void actionPerformed(ActionEvent e)
685 htmlMenuItem_actionPerformed(e);
689 JMenuItem createBioJS = new JMenuItem(
690 MessageManager.getString("label.biojs_html_export"));
691 createBioJS.addActionListener(new java.awt.event.ActionListener()
694 public void actionPerformed(ActionEvent e)
696 bioJSMenuItem_actionPerformed(e);
700 JMenuItem overviewMenuItem = new JMenuItem(
701 MessageManager.getString("label.overview_window"));
702 overviewMenuItem.addActionListener(new ActionListener()
705 public void actionPerformed(ActionEvent e)
707 overviewMenuItem_actionPerformed(e);
711 undoMenuItem.setEnabled(false);
712 undoMenuItem.setText(MessageManager.getString("action.undo"));
713 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z, Toolkit
714 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
715 al = new ActionListener()
718 public void actionPerformed(ActionEvent e)
720 undoMenuItem_actionPerformed(e);
723 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
725 redoMenuItem.setEnabled(false);
726 redoMenuItem.setText(MessageManager.getString("action.redo"));
727 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y, Toolkit
728 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
729 al = new ActionListener()
732 public void actionPerformed(ActionEvent e)
734 redoMenuItem_actionPerformed(e);
737 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
739 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
740 wrapMenuItem.addActionListener(new ActionListener()
743 public void actionPerformed(ActionEvent e)
745 wrapMenuItem_actionPerformed(e);
749 JMenuItem printMenuItem = new JMenuItem(
750 MessageManager.getString("action.print"));
751 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P, Toolkit
752 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
753 al = new ActionListener()
756 public void actionPerformed(ActionEvent e)
758 printMenuItem_actionPerformed(e);
761 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
764 .setText(MessageManager.getString("action.show_gaps"));
765 renderGapsMenuItem.setState(true);
766 renderGapsMenuItem.addActionListener(new ActionListener()
769 public void actionPerformed(ActionEvent e)
771 renderGapsMenuItem_actionPerformed(e);
775 JMenuItem findMenuItem = new JMenuItem(
776 MessageManager.getString("action.find"));
777 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F, Toolkit
778 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
779 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
780 MessageManager.getString("label.find_tip")));
781 al = new ActionListener()
784 public void actionPerformed(ActionEvent e)
786 findMenuItem_actionPerformed(e);
789 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
791 showSeqFeatures.setText(MessageManager
792 .getString("label.show_sequence_features"));
793 showSeqFeatures.addActionListener(new ActionListener()
796 public void actionPerformed(ActionEvent actionEvent)
798 showSeqFeatures_actionPerformed(actionEvent);
802 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
803 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
804 * void actionPerformed(ActionEvent actionEvent) {
805 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
807 showDbRefsMenuitem.setText(MessageManager
808 .getString("label.show_database_refs"));
809 showDbRefsMenuitem.addActionListener(new ActionListener()
813 public void actionPerformed(ActionEvent e)
815 showDbRefs_actionPerformed(e);
819 showNpFeatsMenuitem.setText(MessageManager
820 .getString("label.show_non_positional_features"));
821 showNpFeatsMenuitem.addActionListener(new ActionListener()
825 public void actionPerformed(ActionEvent e)
827 showNpFeats_actionPerformed(e);
831 showGroupConservation.setText(MessageManager
832 .getString("label.group_conservation"));
833 showGroupConservation.addActionListener(new ActionListener()
837 public void actionPerformed(ActionEvent e)
839 showGroupConservation_actionPerformed(e);
844 showGroupConsensus.setText(MessageManager
845 .getString("label.group_consensus"));
846 showGroupConsensus.addActionListener(new ActionListener()
850 public void actionPerformed(ActionEvent e)
852 showGroupConsensus_actionPerformed(e);
856 showConsensusHistogram.setText(MessageManager
857 .getString("label.show_consensus_histogram"));
858 showConsensusHistogram.addActionListener(new ActionListener()
862 public void actionPerformed(ActionEvent e)
864 showConsensusHistogram_actionPerformed(e);
868 showSequenceLogo.setText(MessageManager
869 .getString("label.show_consensus_logo"));
870 showSequenceLogo.addActionListener(new ActionListener()
874 public void actionPerformed(ActionEvent e)
876 showSequenceLogo_actionPerformed(e);
880 normaliseSequenceLogo.setText(MessageManager
881 .getString("label.norm_consensus_logo"));
882 normaliseSequenceLogo.addActionListener(new ActionListener()
886 public void actionPerformed(ActionEvent e)
888 normaliseSequenceLogo_actionPerformed(e);
892 applyAutoAnnotationSettings.setText(MessageManager
893 .getString("label.apply_all_groups"));
894 applyAutoAnnotationSettings.setState(false);
895 applyAutoAnnotationSettings.setVisible(true);
896 applyAutoAnnotationSettings.addActionListener(new ActionListener()
899 public void actionPerformed(ActionEvent e)
901 applyAutoAnnotationSettings_actionPerformed(e);
905 ButtonGroup buttonGroup = new ButtonGroup();
906 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
907 MessageManager.getString("label.show_first"));
908 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
909 MessageManager.getString("label.show_last"));
910 buttonGroup.add(showAutoFirst);
911 buttonGroup.add(showAutoLast);
912 final boolean autoFirst = Cache.getDefault(
913 Preferences.SHOW_AUTOCALC_ABOVE, false);
914 showAutoFirst.setSelected(autoFirst);
915 setShowAutoCalculatedAbove(autoFirst);
916 showAutoFirst.addActionListener(new ActionListener()
919 public void actionPerformed(ActionEvent e)
921 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
922 sortAnnotations_actionPerformed();
925 showAutoLast.setSelected(!showAutoFirst.isSelected());
926 showAutoLast.addActionListener(new ActionListener()
929 public void actionPerformed(ActionEvent e)
931 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
932 sortAnnotations_actionPerformed();
936 JMenuItem deleteGroups = new JMenuItem(
937 MessageManager.getString("action.undefine_groups"));
938 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U, Toolkit
939 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
940 al = new ActionListener()
943 public void actionPerformed(ActionEvent e)
945 deleteGroups_actionPerformed(e);
948 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
950 JMenuItem annotationColumn = new JMenuItem(
951 MessageManager.getString("action.select_by_annotation"));
952 annotationColumn.addActionListener(new ActionListener()
955 public void actionPerformed(ActionEvent e)
957 annotationColumn_actionPerformed(e);
961 JMenuItem createGroup = new JMenuItem(
962 MessageManager.getString("action.create_group"));
963 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, Toolkit
964 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
965 al = new ActionListener()
968 public void actionPerformed(ActionEvent e)
970 createGroup_actionPerformed(e);
973 addMenuActionAndAccelerator(keyStroke, createGroup, al);
975 JMenuItem unGroup = new JMenuItem(
976 MessageManager.getString("action.remove_group"));
977 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, Toolkit
978 .getDefaultToolkit().getMenuShortcutKeyMask()
979 | KeyEvent.SHIFT_MASK, false);
980 al = new ActionListener()
983 public void actionPerformed(ActionEvent e)
985 unGroup_actionPerformed(e);
988 addMenuActionAndAccelerator(keyStroke, unGroup, al);
990 copy.setText(MessageManager.getString("action.copy"));
991 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C, Toolkit
992 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
994 al = new ActionListener()
997 public void actionPerformed(ActionEvent e)
999 copy_actionPerformed(e);
1002 addMenuActionAndAccelerator(keyStroke, copy, al);
1004 cut.setText(MessageManager.getString("action.cut"));
1005 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, Toolkit
1006 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1007 al = new ActionListener()
1010 public void actionPerformed(ActionEvent e)
1012 cut_actionPerformed(e);
1015 addMenuActionAndAccelerator(keyStroke, cut, al);
1017 JMenuItem delete = new JMenuItem(
1018 MessageManager.getString("action.delete"));
1019 delete.addActionListener(new ActionListener()
1022 public void actionPerformed(ActionEvent e)
1024 delete_actionPerformed(e);
1028 pasteMenu.setText(MessageManager.getString("action.paste"));
1029 JMenuItem pasteNew = new JMenuItem(
1030 MessageManager.getString("label.to_new_alignment"));
1031 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V, Toolkit
1032 .getDefaultToolkit().getMenuShortcutKeyMask()
1033 | KeyEvent.SHIFT_MASK, false);
1034 al = new ActionListener()
1037 public void actionPerformed(ActionEvent e)
1041 pasteNew_actionPerformed(e);
1042 } catch (IOException | InterruptedException e1)
1044 // TODO Auto-generated catch block
1045 e1.printStackTrace();
1049 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1051 JMenuItem pasteThis = new JMenuItem(
1052 MessageManager.getString("label.to_this_alignment"));
1053 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V, Toolkit
1054 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1055 al = new ActionListener()
1058 public void actionPerformed(ActionEvent e)
1062 pasteThis_actionPerformed(e);
1063 } catch (IOException | InterruptedException e1)
1065 // TODO Auto-generated catch block
1066 e1.printStackTrace();
1070 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1072 JMenuItem createPNG = new JMenuItem("PNG");
1073 createPNG.addActionListener(new ActionListener()
1076 public void actionPerformed(ActionEvent e)
1081 createPNG.setActionCommand(MessageManager
1082 .getString("label.save_png_image"));
1084 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1085 font.addActionListener(new ActionListener()
1088 public void actionPerformed(ActionEvent e)
1090 font_actionPerformed(e);
1093 seqLimits.setText(MessageManager
1094 .getString("label.show_sequence_limits"));
1095 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1096 seqLimits.addActionListener(new ActionListener()
1099 public void actionPerformed(ActionEvent e)
1101 seqLimit_actionPerformed(e);
1104 JMenuItem epsFile = new JMenuItem("EPS");
1105 epsFile.addActionListener(new ActionListener()
1108 public void actionPerformed(ActionEvent e)
1114 JMenuItem createSVG = new JMenuItem("SVG");
1115 createSVG.addActionListener(new ActionListener()
1118 public void actionPerformed(ActionEvent e)
1124 JMenuItem loadTreeMenuItem = new JMenuItem(
1125 MessageManager.getString("label.load_associated_tree"));
1126 loadTreeMenuItem.setActionCommand(MessageManager
1127 .getString("label.load_tree_for_sequence_set"));
1128 loadTreeMenuItem.addActionListener(new ActionListener()
1131 public void actionPerformed(ActionEvent e)
1133 loadTreeMenuItem_actionPerformed(e);
1137 scaleAbove.setVisible(false);
1138 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1139 scaleAbove.addActionListener(new ActionListener()
1142 public void actionPerformed(ActionEvent e)
1144 scaleAbove_actionPerformed(e);
1147 scaleLeft.setVisible(false);
1148 scaleLeft.setSelected(true);
1149 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1150 scaleLeft.addActionListener(new ActionListener()
1153 public void actionPerformed(ActionEvent e)
1155 scaleLeft_actionPerformed(e);
1158 scaleRight.setVisible(false);
1159 scaleRight.setSelected(true);
1160 scaleRight.setText(MessageManager.getString("action.scale_right"));
1161 scaleRight.addActionListener(new ActionListener()
1164 public void actionPerformed(ActionEvent e)
1166 scaleRight_actionPerformed(e);
1169 centreColumnLabelsMenuItem.setVisible(true);
1170 centreColumnLabelsMenuItem.setState(false);
1171 centreColumnLabelsMenuItem.setText(MessageManager
1172 .getString("label.centre_column_labels"));
1173 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1176 public void actionPerformed(ActionEvent e)
1178 centreColumnLabels_actionPerformed(e);
1181 followHighlightMenuItem.setVisible(true);
1182 followHighlightMenuItem.setState(true);
1183 followHighlightMenuItem.setText(MessageManager
1184 .getString("label.automatic_scrolling"));
1185 followHighlightMenuItem.addActionListener(new ActionListener()
1189 public void actionPerformed(ActionEvent e)
1191 followHighlight_actionPerformed();
1197 .setText(MessageManager.getString("action.by_tree_order"));
1198 sort.setText(MessageManager.getString("action.sort"));
1199 sort.addMenuListener(new MenuListener()
1202 public void menuSelected(MenuEvent e)
1204 buildTreeSortMenu();
1208 public void menuDeselected(MenuEvent e)
1213 public void menuCanceled(MenuEvent e)
1217 sortByAnnotScore.setText(MessageManager
1218 .getString("label.sort_by_score"));
1219 sort.add(sortByAnnotScore);
1220 sort.addMenuListener(new javax.swing.event.MenuListener()
1224 public void menuCanceled(MenuEvent e)
1229 public void menuDeselected(MenuEvent e)
1234 public void menuSelected(MenuEvent e)
1236 buildSortByAnnotationScoresMenu();
1239 sortByAnnotScore.setVisible(false);
1241 calculateTree.setText(MessageManager
1242 .getString("action.calculate_tree_pca"));
1244 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1245 padGapsMenuitem.setState(jalview.bin.Cache
1246 .getDefault("PAD_GAPS", false));
1247 padGapsMenuitem.addActionListener(new ActionListener()
1250 public void actionPerformed(ActionEvent e)
1252 padGapsMenuitem_actionPerformed(e);
1255 JMenuItem vamsasStore = new JMenuItem(
1256 MessageManager.getString("label.vamsas_store"));
1257 vamsasStore.setVisible(false);
1258 vamsasStore.addActionListener(new ActionListener()
1261 public void actionPerformed(ActionEvent e)
1263 vamsasStore_actionPerformed(e);
1266 showTranslation.setText(MessageManager
1267 .getString("label.translate_cDNA"));
1268 showTranslation.addActionListener(new ActionListener()
1271 public void actionPerformed(ActionEvent e)
1273 showTranslation_actionPerformed(e);
1276 showReverse.setText(MessageManager.getString("label.reverse"));
1277 showReverse.addActionListener(new ActionListener()
1280 public void actionPerformed(ActionEvent e)
1282 showReverse_actionPerformed(false);
1285 showReverseComplement.setText(MessageManager
1286 .getString("label.reverse_complement"));
1287 showReverseComplement.addActionListener(new ActionListener()
1290 public void actionPerformed(ActionEvent e)
1292 showReverse_actionPerformed(true);
1296 JMenuItem extractScores = new JMenuItem(
1297 MessageManager.getString("label.extract_scores"));
1298 extractScores.addActionListener(new ActionListener()
1301 public void actionPerformed(ActionEvent e)
1303 extractScores_actionPerformed(e);
1306 extractScores.setVisible(true);
1307 // JBPNote: TODO: make gui for regex based score extraction
1309 // for show products actions see AlignFrame.canShowProducts
1310 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1312 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1313 runGroovy.setToolTipText(MessageManager
1314 .getString("label.run_groovy_tip"));
1315 runGroovy.addActionListener(new ActionListener()
1318 public void actionPerformed(ActionEvent e)
1320 runGroovy_actionPerformed();
1324 JMenuItem openFeatureSettings = new JMenuItem(
1325 MessageManager.getString("action.feature_settings"));
1326 openFeatureSettings.addActionListener(new ActionListener()
1329 public void actionPerformed(ActionEvent e)
1331 featureSettings_actionPerformed(e);
1334 JMenuItem fetchSequence = new JMenuItem(
1335 MessageManager.getString("label.fetch_sequences"));
1336 fetchSequence.addActionListener(new ActionListener()
1339 public void actionPerformed(ActionEvent e)
1341 fetchSequence_actionPerformed(e);
1345 JMenuItem associatedData = new JMenuItem(
1346 MessageManager.getString("label.load_features_annotations"));
1347 associatedData.addActionListener(new ActionListener()
1350 public void actionPerformed(ActionEvent e)
1354 associatedData_actionPerformed(e);
1355 } catch (IOException | InterruptedException e1)
1357 // TODO Auto-generated catch block
1358 e1.printStackTrace();
1362 autoCalculate.setText(MessageManager
1363 .getString("label.autocalculate_consensus"));
1364 autoCalculate.setState(jalview.bin.Cache.getDefault(
1365 "AUTO_CALC_CONSENSUS", true));
1366 autoCalculate.addActionListener(new ActionListener()
1369 public void actionPerformed(ActionEvent e)
1371 autoCalculate_actionPerformed(e);
1374 sortByTree.setText(MessageManager
1375 .getString("label.sort_alignment_new_tree"));
1377 .setToolTipText("<html>"
1379 .getString("label.enable_automatically_sort_alignment_when_open_new_tree"));
1381 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1382 sortByTree.addActionListener(new ActionListener()
1385 public void actionPerformed(ActionEvent e)
1387 sortByTreeOption_actionPerformed(e);
1391 listenToViewSelections.setText(MessageManager
1392 .getString("label.listen_for_selections"));
1393 listenToViewSelections
1394 .setToolTipText("<html>"
1396 .getString("label.selections_mirror_selections_made_same_sequences_other_views"));
1397 listenToViewSelections.setState(false);
1398 listenToViewSelections.addActionListener(new ActionListener()
1401 public void actionPerformed(ActionEvent e)
1403 listenToViewSelections_actionPerformed(e);
1407 JMenu addSequenceMenu = new JMenu(
1408 MessageManager.getString("label.add_sequences"));
1409 JMenuItem addFromFile = new JMenuItem(
1410 MessageManager.getString("label.from_file"));
1411 addFromFile.addActionListener(new ActionListener()
1414 public void actionPerformed(ActionEvent e)
1416 addFromFile_actionPerformed(e);
1419 JMenuItem addFromText = new JMenuItem(
1420 MessageManager.getString("label.from_textbox"));
1421 addFromText.addActionListener(new ActionListener()
1424 public void actionPerformed(ActionEvent e)
1426 addFromText_actionPerformed(e);
1429 JMenuItem addFromURL = new JMenuItem(
1430 MessageManager.getString("label.from_url"));
1431 addFromURL.addActionListener(new ActionListener()
1434 public void actionPerformed(ActionEvent e)
1436 addFromURL_actionPerformed(e);
1439 JMenuItem exportFeatures = new JMenuItem(
1440 MessageManager.getString("label.export_features"));
1441 exportFeatures.addActionListener(new ActionListener()
1444 public void actionPerformed(ActionEvent e)
1446 exportFeatures_actionPerformed(e);
1449 JMenuItem exportAnnotations = new JMenuItem(
1450 MessageManager.getString("label.export_annotations"));
1451 exportAnnotations.addActionListener(new ActionListener()
1454 public void actionPerformed(ActionEvent e)
1456 exportAnnotations_actionPerformed(e);
1459 statusPanel.setLayout(new GridLayout());
1460 JMenuItem showAllSeqs = new JMenuItem(
1461 MessageManager.getString("label.all_sequences"));
1462 showAllSeqs.setToolTipText(MessageManager
1463 .getString("label.toggle_sequence_visibility"));
1464 showAllSeqs.addActionListener(new ActionListener()
1467 public void actionPerformed(ActionEvent e)
1469 showAllSeqs_actionPerformed(e);
1472 JMenuItem showAllColumns = new JMenuItem(
1473 MessageManager.getString("label.all_columns"));
1474 showAllColumns.setToolTipText(MessageManager
1475 .getString("label.toggle_columns_visibility"));
1476 showAllColumns.addActionListener(new ActionListener()
1479 public void actionPerformed(ActionEvent e)
1481 showAllColumns_actionPerformed(e);
1484 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1485 JMenuItem hideSelSequences = new JMenuItem(
1486 MessageManager.getString("label.selected_sequences"));
1487 hideSelSequences.setToolTipText(MessageManager
1488 .getString("label.toggle_sequence_visibility"));
1489 hideSelSequences.addActionListener(new ActionListener()
1492 public void actionPerformed(ActionEvent e)
1494 hideSelSequences_actionPerformed(e);
1497 JMenuItem hideSelColumns = new JMenuItem(
1498 MessageManager.getString("label.selected_columns"));
1499 hideSelColumns.setToolTipText(MessageManager
1500 .getString("label.toggle_columns_visibility"));
1501 hideSelColumns.addActionListener(new ActionListener()
1504 public void actionPerformed(ActionEvent e)
1506 hideSelColumns_actionPerformed(e);
1509 JMenuItem hideAllSelection = new JMenuItem(
1510 MessageManager.getString("label.selected_region"));
1511 hideAllSelection.addActionListener(new ActionListener()
1514 public void actionPerformed(ActionEvent e)
1516 hideAllSelection_actionPerformed(e);
1519 // TODO: should be hidden if no selection exists.
1520 JMenuItem hideAllButSelection = new JMenuItem(
1521 MessageManager.getString("label.all_but_selected_region"));
1522 hideAllButSelection.addActionListener(new ActionListener()
1525 public void actionPerformed(ActionEvent e)
1527 hideAllButSelection_actionPerformed(e);
1530 JMenuItem showAllhidden = new JMenuItem(
1531 MessageManager.getString("label.all_sequences_columns"));
1532 showAllhidden.setToolTipText(MessageManager
1533 .getString("label.toggles_visibility_hidden_selected_regions"));
1534 showAllhidden.addActionListener(new ActionListener()
1537 public void actionPerformed(ActionEvent e)
1539 showAllhidden_actionPerformed(e);
1542 hiddenMarkers.setText(MessageManager
1543 .getString("action.show_hidden_markers"));
1544 hiddenMarkers.addActionListener(new ActionListener()
1547 public void actionPerformed(ActionEvent e)
1549 hiddenMarkers_actionPerformed(e);
1553 JMenuItem invertColSel = new JMenuItem(
1554 MessageManager.getString("action.invert_column_selection"));
1555 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I, Toolkit
1556 .getDefaultToolkit().getMenuShortcutKeyMask()
1557 | KeyEvent.ALT_MASK, false);
1558 al = new ActionListener()
1561 public void actionPerformed(ActionEvent e)
1563 invertColSel_actionPerformed(e);
1566 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1568 showComplementMenuItem.setVisible(false);
1569 showComplementMenuItem.addActionListener(new ActionListener()
1572 public void actionPerformed(ActionEvent e)
1574 showComplement_actionPerformed(showComplementMenuItem.getState());
1578 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1581 public void stateChanged(ChangeEvent evt)
1583 JTabbedPane pane = (JTabbedPane) evt.getSource();
1584 int sel = pane.getSelectedIndex();
1585 tabSelectionChanged(sel);
1588 tabbedPane.addMouseListener(new MouseAdapter()
1591 public void mousePressed(MouseEvent e)
1593 if (e.isPopupTrigger()) // Mac
1595 tabbedPane_mousePressed(e);
1600 public void mouseReleased(MouseEvent e)
1602 if (e.isPopupTrigger()) // Windows
1604 tabbedPane_mousePressed(e);
1608 tabbedPane.addFocusListener(new FocusAdapter()
1611 public void focusGained(FocusEvent e)
1613 tabbedPane_focusGained(e);
1617 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1618 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, Toolkit
1619 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1620 al = new ActionListener()
1623 public void actionPerformed(ActionEvent e)
1625 save_actionPerformed(e);
1628 addMenuActionAndAccelerator(keyStroke, save, al);
1630 reload.setEnabled(false);
1631 reload.setText(MessageManager.getString("action.reload"));
1632 reload.addActionListener(new ActionListener()
1635 public void actionPerformed(ActionEvent e)
1637 reload_actionPerformed(e);
1641 JMenuItem newView = new JMenuItem(
1642 MessageManager.getString("action.new_view"));
1643 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T, Toolkit
1644 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1645 al = new ActionListener()
1648 public void actionPerformed(ActionEvent e)
1650 newView_actionPerformed(e);
1653 addMenuActionAndAccelerator(keyStroke, newView, al);
1655 tabbedPane.setToolTipText("<html><i>"
1656 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1659 formatMenu.setText(MessageManager.getString("action.format"));
1660 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1662 idRightAlign.setText(MessageManager
1663 .getString("label.right_align_sequence_id"));
1664 idRightAlign.addActionListener(new ActionListener()
1667 public void actionPerformed(ActionEvent e)
1669 idRightAlign_actionPerformed(e);
1673 gatherViews.setEnabled(false);
1674 gatherViews.setText(MessageManager.getString("action.gather_views"));
1675 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1676 al = new ActionListener()
1679 public void actionPerformed(ActionEvent e)
1681 gatherViews_actionPerformed(e);
1684 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1686 expandViews.setEnabled(false);
1687 expandViews.setText(MessageManager.getString("action.expand_views"));
1688 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1689 al = new ActionListener()
1692 public void actionPerformed(ActionEvent e)
1694 expandViews_actionPerformed(e);
1697 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1699 JMenuItem pageSetup = new JMenuItem(
1700 MessageManager.getString("action.page_setup"));
1701 pageSetup.addActionListener(new ActionListener()
1704 public void actionPerformed(ActionEvent e)
1706 pageSetup_actionPerformed(e);
1709 JMenuItem alignmentProperties = new JMenuItem(
1710 MessageManager.getString("label.alignment_props"));
1711 alignmentProperties.addActionListener(new ActionListener()
1714 public void actionPerformed(ActionEvent actionEvent)
1716 alignmentProperties();
1719 JMenuItem selectHighlighted = new JMenuItem(
1720 MessageManager.getString("action.select_highlighted_columns"));
1721 selectHighlighted.setToolTipText(MessageManager
1722 .getString("tooltip.select_highlighted_columns"));
1723 al = new ActionListener()
1726 public void actionPerformed(ActionEvent actionEvent)
1728 selectHighlightedColumns_actionPerformed(actionEvent);
1731 hmmBuild.setText(MessageManager.getString("label.hmmbuild"));
1732 hmmBuild.addActionListener(new ActionListener()
1736 public void actionPerformed(ActionEvent e)
1740 hmmBuild_actionPerformed(e);
1741 } catch (IOException e1)
1743 // TODO Auto-generated catch block
1744 e1.printStackTrace();
1745 } catch (InterruptedException e1)
1747 // TODO Auto-generated catch block
1748 e1.printStackTrace();
1753 hmmAlign.setText(MessageManager.getString("label.hmmalign"));
1754 hmmAlign.addActionListener(new ActionListener()
1758 public void actionPerformed(ActionEvent e)
1762 hmmAlign_actionPerformed(e);
1763 } catch (IOException e1)
1765 // TODO Auto-generated catch block
1766 e1.printStackTrace();
1767 } catch (InterruptedException e1)
1769 // TODO Auto-generated catch block
1770 e1.printStackTrace();
1775 selectHighlighted.addActionListener(al);
1776 JMenu tooltipSettingsMenu = new JMenu(
1777 MessageManager.getString("label.sequence_id_tooltip"));
1778 JMenu autoAnnMenu = new JMenu(
1779 MessageManager.getString("label.autocalculated_annotation"));
1781 JMenu exportImageMenu = new JMenu(
1782 MessageManager.getString("label.export_image"));
1783 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1784 alignFrameMenuBar.add(fileMenu);
1785 alignFrameMenuBar.add(editMenu);
1786 alignFrameMenuBar.add(selectMenu);
1787 alignFrameMenuBar.add(viewMenu);
1788 alignFrameMenuBar.add(annotationsMenu);
1789 alignFrameMenuBar.add(formatMenu);
1790 alignFrameMenuBar.add(colourMenu);
1791 alignFrameMenuBar.add(calculateMenu);
1792 alignFrameMenuBar.add(webService);
1793 alignFrameMenuBar.add(hmmerMenu);
1795 fileMenu.add(fetchSequence);
1796 fileMenu.add(addSequenceMenu);
1797 fileMenu.add(reload);
1798 fileMenu.addSeparator();
1799 fileMenu.add(vamsasStore);
1801 fileMenu.add(saveAs);
1802 fileMenu.add(outputTextboxMenu);
1803 fileMenu.add(pageSetup);
1804 fileMenu.add(printMenuItem);
1805 fileMenu.addSeparator();
1806 fileMenu.add(exportImageMenu);
1807 fileMenu.add(exportFeatures);
1808 fileMenu.add(exportAnnotations);
1809 fileMenu.add(loadTreeMenuItem);
1810 fileMenu.add(associatedData);
1811 fileMenu.addSeparator();
1812 fileMenu.add(closeMenuItem);
1814 pasteMenu.add(pasteNew);
1815 pasteMenu.add(pasteThis);
1816 editMenu.add(undoMenuItem);
1817 editMenu.add(redoMenuItem);
1820 editMenu.add(pasteMenu);
1821 editMenu.add(delete);
1822 editMenu.addSeparator();
1823 editMenu.add(remove2LeftMenuItem);
1824 editMenu.add(remove2RightMenuItem);
1825 editMenu.add(removeGappedColumnMenuItem);
1826 editMenu.add(removeAllGapsMenuItem);
1827 editMenu.add(removeRedundancyMenuItem);
1828 editMenu.addSeparator();
1829 // dont add these yet in the CVS build - they cannot be undone!
1830 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1831 // editMenu.add(justifyLeftMenuItem);
1832 // editMenu.add(justifyRightMenuItem);
1833 // editMenu.addSeparator();
1834 editMenu.add(padGapsMenuitem);
1836 showMenu.add(showAllColumns);
1837 showMenu.add(showAllSeqs);
1838 showMenu.add(showAllhidden);
1839 hideMenu.add(hideSelColumns);
1840 hideMenu.add(hideSelSequences);
1841 hideMenu.add(hideAllSelection);
1842 hideMenu.add(hideAllButSelection);
1843 viewMenu.add(newView);
1844 viewMenu.add(expandViews);
1845 viewMenu.add(gatherViews);
1846 viewMenu.addSeparator();
1847 viewMenu.add(showMenu);
1848 viewMenu.add(hideMenu);
1849 viewMenu.add(showComplementMenuItem);
1850 viewMenu.addSeparator();
1851 viewMenu.add(followHighlightMenuItem);
1852 viewMenu.addSeparator();
1853 viewMenu.add(showSeqFeatures);
1854 // viewMenu.add(showSeqFeaturesHeight);
1855 viewMenu.add(openFeatureSettings);
1856 tooltipSettingsMenu.add(showDbRefsMenuitem);
1857 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1858 viewMenu.add(tooltipSettingsMenu);
1859 viewMenu.addSeparator();
1860 viewMenu.add(alignmentProperties);
1861 viewMenu.addSeparator();
1862 viewMenu.add(overviewMenuItem);
1864 annotationsMenu.add(annotationPanelMenuItem);
1865 annotationsMenu.addSeparator();
1866 annotationsMenu.add(showAllAlAnnotations);
1867 annotationsMenu.add(hideAllAlAnnotations);
1868 annotationsMenu.addSeparator();
1869 annotationsMenu.add(showAllSeqAnnotations);
1870 annotationsMenu.add(hideAllSeqAnnotations);
1871 annotationsMenu.add(sortAnnBySequence);
1872 annotationsMenu.add(sortAnnByLabel);
1873 annotationsMenu.addSeparator();
1874 autoAnnMenu.add(showAutoFirst);
1875 autoAnnMenu.add(showAutoLast);
1876 autoAnnMenu.addSeparator();
1877 autoAnnMenu.add(applyAutoAnnotationSettings);
1878 autoAnnMenu.add(showConsensusHistogram);
1879 autoAnnMenu.add(showSequenceLogo);
1880 autoAnnMenu.add(normaliseSequenceLogo);
1881 autoAnnMenu.addSeparator();
1882 autoAnnMenu.add(showGroupConservation);
1883 autoAnnMenu.add(showGroupConsensus);
1884 annotationsMenu.add(autoAnnMenu);
1887 sort.add(sortIDMenuItem);
1888 sort.add(sortLengthMenuItem);
1889 sort.add(sortGroupMenuItem);
1890 sort.add(sortPairwiseMenuItem);
1891 sort.add(sortByTreeMenu);
1892 calculateMenu.add(sort);
1893 calculateMenu.add(calculateTree);
1894 calculateMenu.addSeparator();
1895 calculateMenu.add(pairwiseAlignmentMenuItem);
1896 calculateMenu.addSeparator();
1897 calculateMenu.add(showTranslation);
1898 calculateMenu.add(showReverse);
1899 calculateMenu.add(showReverseComplement);
1900 calculateMenu.add(showProducts);
1901 calculateMenu.add(autoCalculate);
1902 calculateMenu.add(sortByTree);
1903 calculateMenu.addSeparator();
1904 calculateMenu.add(expandAlignment);
1905 calculateMenu.add(extractScores);
1906 calculateMenu.addSeparator();
1907 calculateMenu.add(runGroovy);
1909 webServiceNoServices = new JMenuItem(
1910 MessageManager.getString("label.no_services"));
1911 webService.add(webServiceNoServices);
1912 exportImageMenu.add(htmlMenuItem);
1913 exportImageMenu.add(epsFile);
1914 exportImageMenu.add(createPNG);
1915 exportImageMenu.add(createBioJS);
1916 exportImageMenu.add(createSVG);
1917 addSequenceMenu.add(addFromFile);
1918 addSequenceMenu.add(addFromText);
1919 addSequenceMenu.add(addFromURL);
1920 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1921 statusPanel.add(statusBar, null);
1922 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1924 formatMenu.add(font);
1925 formatMenu.addSeparator();
1926 formatMenu.add(wrapMenuItem);
1927 formatMenu.add(scaleAbove);
1928 formatMenu.add(scaleLeft);
1929 formatMenu.add(scaleRight);
1930 formatMenu.add(seqLimits);
1931 formatMenu.add(idRightAlign);
1932 formatMenu.add(hiddenMarkers);
1933 formatMenu.add(viewBoxesMenuItem);
1934 formatMenu.add(viewTextMenuItem);
1935 formatMenu.add(colourTextMenuItem);
1936 formatMenu.add(renderGapsMenuItem);
1937 formatMenu.add(centreColumnLabelsMenuItem);
1938 formatMenu.add(showNonconservedMenuItem);
1939 selectMenu.add(findMenuItem);
1940 selectMenu.addSeparator();
1941 selectMenu.add(selectAllSequenceMenuItem);
1942 selectMenu.add(deselectAllSequenceMenuItem);
1943 selectMenu.add(invertSequenceMenuItem);
1944 selectMenu.add(invertColSel);
1945 selectMenu.add(createGroup);
1946 selectMenu.add(unGroup);
1947 selectMenu.add(grpsFromSelection);
1948 selectMenu.add(deleteGroups);
1949 selectMenu.add(annotationColumn);
1950 selectMenu.add(selectHighlighted);
1951 // TODO - determine if the listenToViewSelections button is needed : see bug
1953 // selectMenu.addSeparator();
1954 // selectMenu.add(listenToViewSelections);
1957 public void hmmerMenu_actionPerformed(ActionEvent e)
1963 * Constructs the entries on the Colour menu (but does not add them to the
1966 protected void initHMMERMenu()
1968 hmmAlign = new JMenuItem(MessageManager.getString("label.hmmalign"));
1969 hmmBuild = new JMenuItem(MessageManager.getString("label.hmmbuild"));
1970 hmmSearch = new JMenuItem(MessageManager.getString("label.hmmsearch"));
1972 protected void initColourMenu()
1974 applyToAllGroups = new JCheckBoxMenuItem(
1975 MessageManager.getString("label.apply_colour_to_all_groups"));
1976 applyToAllGroups.addActionListener(new ActionListener()
1979 public void actionPerformed(ActionEvent e)
1981 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1985 textColour = new JMenuItem(
1986 MessageManager.getString("label.text_colour"));
1987 textColour.addActionListener(new ActionListener()
1990 public void actionPerformed(ActionEvent e)
1992 textColour_actionPerformed();
1996 conservationMenuItem = new JCheckBoxMenuItem(
1997 MessageManager.getString("action.by_conservation"));
1998 conservationMenuItem.addActionListener(new ActionListener()
2001 public void actionPerformed(ActionEvent e)
2003 conservationMenuItem_actionPerformed(conservationMenuItem
2008 abovePIDThreshold = new JCheckBoxMenuItem(
2009 MessageManager.getString("label.above_identity_threshold"));
2010 abovePIDThreshold.addActionListener(new ActionListener()
2013 public void actionPerformed(ActionEvent e)
2015 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
2018 modifyPID = new JMenuItem(
2019 MessageManager.getString("label.modify_identity_threshold"));
2020 modifyPID.addActionListener(new ActionListener()
2023 public void actionPerformed(ActionEvent e)
2025 modifyPID_actionPerformed();
2028 modifyConservation = new JMenuItem(
2030 .getString("label.modify_conservation_threshold"));
2031 modifyConservation.addActionListener(new ActionListener()
2034 public void actionPerformed(ActionEvent e)
2036 modifyConservation_actionPerformed();
2040 annotationColour = new JMenuItem(
2041 MessageManager.getString("action.by_annotation"));
2042 annotationColour.addActionListener(new ActionListener()
2045 public void actionPerformed(ActionEvent e)
2047 annotationColour_actionPerformed();
2052 protected void selectHighlightedColumns_actionPerformed(
2053 ActionEvent actionEvent)
2055 // TODO Auto-generated method stub
2060 * Generate the reverse sequence (or reverse complement if the flag is true)
2061 * and add it to the alignment
2065 protected void showReverse_actionPerformed(boolean complement)
2070 * Try to run script in a Groovy console, having first ensured that this
2071 * alignframe is set as currentAlignFrame in Desktop
2073 protected void runGroovy_actionPerformed()
2079 * Adds the given action listener and key accelerator to the given menu item.
2080 * Also saves in a lookup table to support lookup of action by key stroke.
2084 * @param actionListener
2086 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2087 JMenuItem menuItem, ActionListener actionListener)
2089 menuItem.setAccelerator(keyStroke);
2090 accelerators.put(keyStroke, menuItem);
2091 menuItem.addActionListener(actionListener);
2095 * Action on clicking sort annotations by type.
2099 protected void sortAnnotations_actionPerformed()
2104 * Action on clicking Show all annotations.
2106 * @param forSequences
2107 * update sequence-related annotations
2108 * @param forAlignment
2109 * update non-sequence-related annotations
2111 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2112 boolean forAlignment)
2114 setAnnotationsVisibility(true, forSequences, forAlignment);
2118 * Action on clicking Hide all annotations.
2120 * @param forSequences
2121 * update sequence-related annotations
2122 * @param forAlignment
2123 * update non-sequence-related annotations
2125 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2126 boolean forAlignment)
2128 setAnnotationsVisibility(false, forSequences, forAlignment);
2132 * Set the visibility of annotations to true or false. Can act on
2133 * sequence-related annotations, or alignment-related, or both.
2136 * @param forSequences
2137 * update sequence-related annotations
2138 * @param forAlignment
2139 * update non-sequence-related annotations
2141 protected void setAnnotationsVisibility(boolean visible,
2142 boolean forSequences, boolean forAlignment)
2147 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2149 // TODO Auto-generated method stub
2153 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2155 // TODO Auto-generated method stub
2159 protected void showAllhidden_actionPerformed(ActionEvent e)
2161 // TODO Auto-generated method stub
2165 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2167 // TODO Auto-generated method stub
2171 protected void hideAllSelection_actionPerformed(ActionEvent e)
2173 // TODO Auto-generated method stub
2177 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2179 // TODO Auto-generated method stub
2183 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2185 // TODO Auto-generated method stub
2189 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2191 // TODO Auto-generated method stub
2195 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2197 // TODO Auto-generated method stub
2201 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2203 // TODO Auto-generated method stub
2207 protected void showGroupConservation_actionPerformed(ActionEvent e)
2209 // TODO Auto-generated method stub
2213 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2215 // TODO Auto-generated method stub
2219 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2221 // TODO Auto-generated method stub
2225 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2227 // TODO Auto-generated method stub
2231 protected void followHighlight_actionPerformed()
2233 // TODO Auto-generated method stub
2237 protected void showNpFeats_actionPerformed(ActionEvent e)
2239 // TODO Auto-generated method stub
2243 protected void showDbRefs_actionPerformed(ActionEvent e)
2245 // TODO Auto-generated method stub
2249 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2253 protected void buildSortByAnnotationScoresMenu()
2257 protected void extractScores_actionPerformed(ActionEvent e)
2261 protected void outputText_actionPerformed(ActionEvent e)
2265 public void addFromFile_actionPerformed(ActionEvent e)
2270 public void addFromText_actionPerformed(ActionEvent e)
2275 public void addFromURL_actionPerformed(ActionEvent e)
2280 public void exportFeatures_actionPerformed(ActionEvent e)
2285 public void exportAnnotations_actionPerformed(ActionEvent e)
2290 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2294 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2299 protected void closeMenuItem_actionPerformed(boolean b)
2303 protected void redoMenuItem_actionPerformed(ActionEvent e)
2307 protected void undoMenuItem_actionPerformed(ActionEvent e)
2311 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2315 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2319 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2323 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2327 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2331 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2335 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2339 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2343 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2347 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2351 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2355 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2359 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2363 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2367 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2371 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2375 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2379 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2383 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2387 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2391 protected void conservationMenuItem_actionPerformed(boolean selected)
2395 protected void printMenuItem_actionPerformed(ActionEvent e)
2399 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2403 protected void findMenuItem_actionPerformed(ActionEvent e)
2407 protected void abovePIDThreshold_actionPerformed(boolean selected)
2411 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2415 protected void deleteGroups_actionPerformed(ActionEvent e)
2419 protected void createGroup_actionPerformed(ActionEvent e)
2423 protected void unGroup_actionPerformed(ActionEvent e)
2427 protected void copy_actionPerformed(ActionEvent e)
2431 protected void cut_actionPerformed(ActionEvent e)
2435 protected void delete_actionPerformed(ActionEvent e)
2439 protected void pasteNew_actionPerformed(ActionEvent e)
2440 throws IOException, InterruptedException
2444 protected void pasteThis_actionPerformed(ActionEvent e)
2445 throws IOException, InterruptedException
2449 protected void applyToAllGroups_actionPerformed(boolean selected)
2453 protected void autoAlignSeqs_actionPerformed(boolean selected)
2457 protected void hmmAlign_actionPerformed(ActionEvent e)
2458 throws IOException, InterruptedException
2462 protected void changeHMMERLocation_actionPerformed(ActionEvent e)
2466 protected void hmmBuild_actionPerformed(ActionEvent e)
2467 throws IOException, InterruptedException
2471 protected void hmmSearch_actionPerformed(ActionEvent e)
2475 public void createPNG(java.io.File f)
2479 protected void font_actionPerformed(ActionEvent e)
2483 protected void seqLimit_actionPerformed(ActionEvent e)
2487 public void seqDBRef_actionPerformed(ActionEvent e)
2492 public void createEPS(java.io.File f)
2496 public void createSVG(java.io.File f)
2501 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2507 * Template method to handle the 'load T-Coffee scores' menu event.
2509 * Subclasses override this method to provide a custom action.
2514 protected void loadScores_actionPerformed(ActionEvent event)
2519 protected void jpred_actionPerformed(ActionEvent e)
2523 protected void scaleAbove_actionPerformed(ActionEvent e)
2527 protected void scaleLeft_actionPerformed(ActionEvent e)
2531 protected void scaleRight_actionPerformed(ActionEvent e)
2535 protected void modifyPID_actionPerformed()
2539 protected void modifyConservation_actionPerformed()
2543 protected void saveAs_actionPerformed(ActionEvent e)
2547 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2551 public void vamsasStore_actionPerformed(ActionEvent e)
2556 public void vamsasLoad_actionPerformed(ActionEvent e)
2561 public void showTranslation_actionPerformed(ActionEvent e)
2566 public void featureSettings_actionPerformed(ActionEvent e)
2571 public void fetchSequence_actionPerformed(ActionEvent e)
2576 public void smoothFont_actionPerformed(ActionEvent e)
2581 public void annotationColour_actionPerformed()
2585 public void annotationColumn_actionPerformed(ActionEvent e)
2589 public void associatedData_actionPerformed(ActionEvent e)
2590 throws IOException, InterruptedException
2595 public void autoCalculate_actionPerformed(ActionEvent e)
2600 public void sortByTreeOption_actionPerformed(ActionEvent e)
2605 public void showAllSeqs_actionPerformed(ActionEvent e)
2610 public void showAllColumns_actionPerformed(ActionEvent e)
2615 public void hideSelSequences_actionPerformed(ActionEvent e)
2620 public void hideSelColumns_actionPerformed(ActionEvent e)
2625 public void hiddenMarkers_actionPerformed(ActionEvent e)
2630 public void findPdbId_actionPerformed(ActionEvent e)
2635 public void enterPdbId_actionPerformed(ActionEvent e)
2640 public void pdbFile_actionPerformed(ActionEvent e)
2645 public void invertColSel_actionPerformed(ActionEvent e)
2650 public void tabSelectionChanged(int sel)
2655 public void tabbedPane_mousePressed(MouseEvent e)
2660 public void tabbedPane_focusGained(FocusEvent e)
2665 public void save_actionPerformed(ActionEvent e)
2670 public void reload_actionPerformed(ActionEvent e)
2675 public void newView_actionPerformed(ActionEvent e)
2680 public void textColour_actionPerformed()
2685 public void idRightAlign_actionPerformed(ActionEvent e)
2690 public void expandViews_actionPerformed(ActionEvent e)
2695 public void gatherViews_actionPerformed(ActionEvent e)
2700 public void buildTreeSortMenu()
2705 public void pageSetup_actionPerformed(ActionEvent e)
2710 public void alignmentProperties()
2715 protected void expand_newalign(ActionEvent e)
2717 // TODO Auto-generated method stub
2721 protected boolean isShowAutoCalculatedAbove()
2723 return showAutoCalculatedAbove;
2726 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2728 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2731 protected SequenceAnnotationOrder getAnnotationSortOrder()
2733 return annotationSortOrder;
2736 protected void setAnnotationSortOrder(
2737 SequenceAnnotationOrder annotationSortOrder)
2739 this.annotationSortOrder = annotationSortOrder;
2742 public Map<KeyStroke, JMenuItem> getAccelerators()
2744 return this.accelerators;
2748 * Returns the selected index of the tabbed pane, or -1 if none selected
2749 * (including the case where the tabbed pane has not been made visible).
2753 public int getTabIndex()
2755 return tabbedPane.getSelectedIndex();
2758 public JPanel getStatusPanel()
2764 * Sets a reference to the containing split frame. Also makes the 'toggle
2765 * split view' menu item visible and checked.
2769 public void setSplitFrame(SplitContainerI sf)
2771 this.splitFrame = sf;
2774 this.showComplementMenuItem.setVisible(true);
2775 this.showComplementMenuItem.setState(true);
2779 public SplitContainerI getSplitViewContainer()
2781 return this.splitFrame;
2784 protected void showComplement_actionPerformed(boolean complement)
2788 protected void showInformationHistogram_actionPerformed(ActionEvent e)
2790 // TODO Auto-generated method stub
2794 protected void showHMMSequenceLogo_actionPerformed(ActionEvent e)
2796 // TODO Auto-generated method stub
2800 protected void normaliseHMMSequenceLogo_actionPerformed(ActionEvent e)
2802 // TODO Auto-generated method stub