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.bin.Jalview;
27 import jalview.gui.JvSwingUtils;
28 import jalview.gui.Preferences;
29 import jalview.io.FileFormats;
30 import jalview.util.MessageManager;
31 import jalview.util.Platform;
33 import java.awt.BorderLayout;
34 import java.awt.Color;
35 import java.awt.GridLayout;
36 import java.awt.Toolkit;
37 import java.awt.event.ActionEvent;
38 import java.awt.event.ActionListener;
39 import java.awt.event.FocusAdapter;
40 import java.awt.event.FocusEvent;
41 import java.awt.event.KeyEvent;
42 import java.awt.event.MouseAdapter;
43 import java.awt.event.MouseEvent;
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 JMenuItem webServiceNoServices;
73 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
75 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
77 protected JMenu sortByAnnotScore = new JMenu();
79 public JLabel statusBar = new JLabel();
81 protected JMenu outputTextboxMenu = new JMenu();
83 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
85 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
87 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
89 protected JMenuItem undoMenuItem = new JMenuItem();
91 protected JMenuItem redoMenuItem = new JMenuItem();
93 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
95 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
97 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
99 JMenuItem copy = new JMenuItem();
101 JMenuItem cut = new JMenuItem();
103 JMenu pasteMenu = new JMenu();
105 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
107 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
109 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
111 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
113 protected JCheckBoxMenuItem applyToAllGroups;
115 protected JMenu colourMenu = new JMenu();
117 protected JMenuItem textColour;
119 protected JCheckBoxMenuItem conservationMenuItem;
121 protected JMenuItem modifyConservation;
123 protected JCheckBoxMenuItem abovePIDThreshold;
125 protected JMenuItem modifyPID;
127 protected JMenuItem annotationColour;
129 protected JMenu sortByTreeMenu = new JMenu();
131 protected JMenu sort = new JMenu();
133 protected JMenuItem calculateTree = new JMenuItem();
135 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
137 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
139 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
141 protected JMenuItem showTranslation = new JMenuItem();
143 protected JMenuItem showReverse = new JMenuItem();
145 protected JMenuItem showReverseComplement = new JMenuItem();
147 protected JMenu showProducts = new JMenu();
149 protected JMenuItem runGroovy = new JMenuItem();
151 protected JMenuItem loadVcf;
153 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
155 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
157 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
159 protected JPanel statusPanel = new JPanel();
161 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
163 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
165 protected JMenuItem showAllAlAnnotations = new JMenuItem();
167 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
169 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
171 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
173 protected JTabbedPane tabbedPane = jalview.jbgui.GDesktop.createTabbedPane();
175 protected JMenuItem reload = new JMenuItem();
177 protected JMenu formatMenu = new JMenu();
179 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
181 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
183 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
185 protected JMenuItem gatherViews = new JMenuItem();
187 protected JMenuItem expandViews = new JMenuItem();
189 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
191 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
193 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
195 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
197 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
199 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
201 protected JMenuItem openFeatureSettings;
203 private SequenceAnnotationOrder annotationSortOrder;
205 private boolean showAutoCalculatedAbove = false;
207 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<KeyStroke, JMenuItem>();
209 private SplitContainerI splitFrame;
216 setJMenuBar(alignFrameMenuBar);
218 // dynamically fill save as menu with available formats
219 for (String ff : FileFormats.getInstance().getWritableFormats(true))
221 JMenuItem item = new JMenuItem(ff);
223 item.addActionListener(new ActionListener()
226 public void actionPerformed(ActionEvent e)
228 outputText_actionPerformed(e.getActionCommand());
232 outputTextboxMenu.add(item);
234 } catch (Exception e)
236 System.err.println(e.toString());
239 if (!Platform.isAMac())
241 closeMenuItem.setMnemonic('C');
242 outputTextboxMenu.setMnemonic('T');
243 undoMenuItem.setMnemonic('Z');
244 redoMenuItem.setMnemonic('0');
245 copy.setMnemonic('C');
246 cut.setMnemonic('U');
247 pasteMenu.setMnemonic('P');
248 reload.setMnemonic('R');
252 private void jbInit() throws Exception
256 JMenuItem saveAs = new JMenuItem(
257 MessageManager.getString("action.save_as"));
258 ActionListener al = new ActionListener()
261 public void actionPerformed(ActionEvent e)
263 saveAs_actionPerformed();
267 // FIXME getDefaultToolkit throws an exception in Headless mode
268 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
269 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
270 | KeyEvent.SHIFT_MASK,
272 addMenuActionAndAccelerator(keyStroke, saveAs, al);
274 closeMenuItem.setText(MessageManager.getString("action.close"));
275 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
276 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
277 al = new ActionListener()
280 public void actionPerformed(ActionEvent e)
282 closeMenuItem_actionPerformed(false);
285 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
287 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
288 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
289 JMenu annotationsMenu = new JMenu(
290 MessageManager.getString("action.annotations"));
291 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
292 colourMenu.setText(MessageManager.getString("action.colour"));
293 JMenu calculateMenu = new JMenu(
294 MessageManager.getString("action.calculate"));
295 webService.setText(MessageManager.getString("action.web_service"));
296 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
297 MessageManager.getString("action.select_all"));
298 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
299 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
300 al = new ActionListener()
303 public void actionPerformed(ActionEvent e)
305 selectAllSequenceMenuItem_actionPerformed(e);
308 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
310 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
311 MessageManager.getString("action.deselect_all"));
312 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
313 al = new ActionListener()
316 public void actionPerformed(ActionEvent e)
318 deselectAllSequenceMenuItem_actionPerformed(e);
321 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
323 JMenuItem invertSequenceMenuItem = new JMenuItem(
324 MessageManager.getString("action.invert_sequence_selection"));
325 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
326 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
327 al = new ActionListener()
330 public void actionPerformed(ActionEvent e)
332 invertSequenceMenuItem_actionPerformed(e);
335 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
337 JMenuItem grpsFromSelection = new JMenuItem(
338 MessageManager.getString("action.make_groups_selection"));
339 grpsFromSelection.addActionListener(new ActionListener()
342 public void actionPerformed(ActionEvent e)
344 makeGrpsFromSelection_actionPerformed(e);
347 JMenuItem expandAlignment = new JMenuItem(
348 MessageManager.getString("action.view_flanking_regions"));
349 expandAlignment.setToolTipText(
350 MessageManager.getString("label.view_flanking_regions"));
351 expandAlignment.addActionListener(new ActionListener()
354 public void actionPerformed(ActionEvent e)
359 JMenuItem remove2LeftMenuItem = new JMenuItem(
360 MessageManager.getString("action.remove_left"));
361 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
362 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
363 al = new ActionListener()
366 public void actionPerformed(ActionEvent e)
368 remove2LeftMenuItem_actionPerformed(e);
371 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
373 JMenuItem remove2RightMenuItem = new JMenuItem(
374 MessageManager.getString("action.remove_right"));
375 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
376 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
377 al = new ActionListener()
380 public void actionPerformed(ActionEvent e)
382 remove2RightMenuItem_actionPerformed(e);
385 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
387 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
388 MessageManager.getString("action.remove_empty_columns"));
389 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
390 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
391 al = new ActionListener()
394 public void actionPerformed(ActionEvent e)
396 removeGappedColumnMenuItem_actionPerformed(e);
399 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
401 JMenuItem removeAllGapsMenuItem = new JMenuItem(
402 MessageManager.getString("action.remove_all_gaps"));
403 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
404 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
405 | KeyEvent.SHIFT_MASK,
407 al = new ActionListener()
410 public void actionPerformed(ActionEvent e)
412 removeAllGapsMenuItem_actionPerformed(e);
415 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
417 JMenuItem justifyLeftMenuItem = new JMenuItem(
418 MessageManager.getString("action.left_justify_alignment"));
419 justifyLeftMenuItem.addActionListener(new ActionListener()
422 public void actionPerformed(ActionEvent e)
424 justifyLeftMenuItem_actionPerformed(e);
427 JMenuItem justifyRightMenuItem = new JMenuItem(
428 MessageManager.getString("action.right_justify_alignment"));
429 justifyRightMenuItem.addActionListener(new ActionListener()
432 public void actionPerformed(ActionEvent e)
434 justifyRightMenuItem_actionPerformed(e);
437 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
438 viewBoxesMenuItem.setState(true);
439 viewBoxesMenuItem.addActionListener(new ActionListener()
442 public void actionPerformed(ActionEvent e)
444 viewBoxesMenuItem_actionPerformed(e);
447 viewTextMenuItem.setText(MessageManager.getString("action.text"));
448 viewTextMenuItem.setState(true);
449 viewTextMenuItem.addActionListener(new ActionListener()
452 public void actionPerformed(ActionEvent e)
454 viewTextMenuItem_actionPerformed(e);
457 showNonconservedMenuItem
458 .setText(MessageManager.getString("label.show_non_conserved"));
459 showNonconservedMenuItem.setState(false);
460 showNonconservedMenuItem.addActionListener(new ActionListener()
463 public void actionPerformed(ActionEvent e)
465 showUnconservedMenuItem_actionPerformed(e);
468 JMenuItem sortPairwiseMenuItem = new JMenuItem(
469 MessageManager.getString("action.by_pairwise_id"));
470 sortPairwiseMenuItem.addActionListener(new ActionListener()
473 public void actionPerformed(ActionEvent e)
475 sortPairwiseMenuItem_actionPerformed(e);
478 JMenuItem sortIDMenuItem = new JMenuItem(
479 MessageManager.getString("action.by_id"));
480 sortIDMenuItem.addActionListener(new ActionListener()
483 public void actionPerformed(ActionEvent e)
485 sortIDMenuItem_actionPerformed(e);
488 JMenuItem sortLengthMenuItem = new JMenuItem(
489 MessageManager.getString("action.by_length"));
490 sortLengthMenuItem.addActionListener(new ActionListener()
493 public void actionPerformed(ActionEvent e)
495 sortLengthMenuItem_actionPerformed(e);
498 JMenuItem sortGroupMenuItem = new JMenuItem(
499 MessageManager.getString("action.by_group"));
500 sortGroupMenuItem.addActionListener(new ActionListener()
503 public void actionPerformed(ActionEvent e)
505 sortGroupMenuItem_actionPerformed(e);
509 JMenuItem removeRedundancyMenuItem = new JMenuItem(
510 MessageManager.getString("action.remove_redundancy"));
511 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
512 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
513 al = new ActionListener()
516 public void actionPerformed(ActionEvent e)
518 removeRedundancyMenuItem_actionPerformed(e);
521 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
523 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
524 MessageManager.getString("action.pairwise_alignment"));
525 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
528 public void actionPerformed(ActionEvent e)
530 pairwiseAlignmentMenuItem_actionPerformed(e);
534 this.getContentPane().setLayout(new BorderLayout());
535 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
536 statusBar.setBackground(Color.white);
537 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
538 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
539 statusBar.setText(MessageManager.getString("label.status_bar"));
541 .setText(MessageManager.getString("label.out_to_textbox"));
543 annotationPanelMenuItem.setActionCommand("");
544 annotationPanelMenuItem
545 .setText(MessageManager.getString("label.show_annotations"));
546 annotationPanelMenuItem
547 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
548 annotationPanelMenuItem.addActionListener(new ActionListener()
551 public void actionPerformed(ActionEvent e)
553 annotationPanelMenuItem_actionPerformed(e);
556 showAllAlAnnotations.setText(
557 MessageManager.getString("label.show_all_al_annotations"));
558 final boolean isAnnotationPanelShown = annotationPanelMenuItem
560 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
561 showAllAlAnnotations.addActionListener(new ActionListener()
564 public void actionPerformed(ActionEvent e)
566 showAllAnnotations_actionPerformed(false, true);
569 hideAllAlAnnotations.setText(
570 MessageManager.getString("label.hide_all_al_annotations"));
571 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
572 hideAllAlAnnotations.addActionListener(new ActionListener()
575 public void actionPerformed(ActionEvent e)
577 hideAllAnnotations_actionPerformed(false, true);
580 showAllSeqAnnotations.setText(
581 MessageManager.getString("label.show_all_seq_annotations"));
582 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
583 showAllSeqAnnotations.addActionListener(new ActionListener()
586 public void actionPerformed(ActionEvent e)
588 showAllAnnotations_actionPerformed(true, false);
591 hideAllSeqAnnotations.setText(
592 MessageManager.getString("label.hide_all_seq_annotations"));
593 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
594 hideAllSeqAnnotations.addActionListener(new ActionListener()
597 public void actionPerformed(ActionEvent e)
599 hideAllAnnotations_actionPerformed(true, false);
602 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
603 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
604 SequenceAnnotationOrder.NONE.name()));
605 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
606 MessageManager.getString("label.sort_annotations_by_sequence"));
607 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
608 MessageManager.getString("label.sort_annotations_by_label"));
610 sortAnnBySequence.setSelected(
611 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
612 sortAnnBySequence.addActionListener(new ActionListener()
615 public void actionPerformed(ActionEvent e)
617 boolean newState = sortAnnBySequence.getState();
618 sortAnnByLabel.setSelected(false);
619 setAnnotationSortOrder(
620 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
621 : SequenceAnnotationOrder.NONE);
622 sortAnnotations_actionPerformed();
625 sortAnnByLabel.setSelected(
626 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
627 sortAnnByLabel.addActionListener(new ActionListener()
630 public void actionPerformed(ActionEvent e)
632 boolean newState = sortAnnByLabel.getState();
633 sortAnnBySequence.setSelected(false);
634 setAnnotationSortOrder(
635 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
636 : SequenceAnnotationOrder.NONE);
637 sortAnnotations_actionPerformed();
640 colourTextMenuItem = new JCheckBoxMenuItem(
641 MessageManager.getString("label.colour_text"));
642 colourTextMenuItem.addActionListener(new ActionListener()
645 public void actionPerformed(ActionEvent e)
647 colourTextMenuItem_actionPerformed(e);
651 JMenuItem htmlMenuItem = new JMenuItem(
652 MessageManager.getString("label.html"));
653 htmlMenuItem.addActionListener(new ActionListener()
656 public void actionPerformed(ActionEvent e)
658 htmlMenuItem_actionPerformed(e);
662 JMenuItem createBioJS = new JMenuItem(
663 MessageManager.getString("label.biojs_html_export"));
664 createBioJS.addActionListener(new java.awt.event.ActionListener()
667 public void actionPerformed(ActionEvent e)
669 bioJSMenuItem_actionPerformed(e);
673 JMenuItem overviewMenuItem = new JMenuItem(
674 MessageManager.getString("label.overview_window"));
675 overviewMenuItem.addActionListener(new ActionListener()
678 public void actionPerformed(ActionEvent e)
680 overviewMenuItem_actionPerformed(e);
684 undoMenuItem.setEnabled(false);
685 undoMenuItem.setText(MessageManager.getString("action.undo"));
686 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
687 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
688 al = new ActionListener()
691 public void actionPerformed(ActionEvent e)
693 undoMenuItem_actionPerformed(e);
696 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
698 redoMenuItem.setEnabled(false);
699 redoMenuItem.setText(MessageManager.getString("action.redo"));
700 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
701 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
702 al = new ActionListener()
705 public void actionPerformed(ActionEvent e)
707 redoMenuItem_actionPerformed(e);
710 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
712 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
713 wrapMenuItem.addActionListener(new ActionListener()
716 public void actionPerformed(ActionEvent e)
718 wrapMenuItem_actionPerformed(e);
722 JMenuItem printMenuItem = new JMenuItem(
723 MessageManager.getString("action.print"));
724 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
725 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
726 al = new ActionListener()
729 public void actionPerformed(ActionEvent e)
731 printMenuItem_actionPerformed(e);
734 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
737 .setText(MessageManager.getString("action.show_gaps"));
738 renderGapsMenuItem.setState(true);
739 renderGapsMenuItem.addActionListener(new ActionListener()
742 public void actionPerformed(ActionEvent e)
744 renderGapsMenuItem_actionPerformed(e);
748 JMenuItem findMenuItem = new JMenuItem(
749 MessageManager.getString("action.find"));
750 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
751 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
752 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
753 MessageManager.getString("label.find_tip")));
754 al = new ActionListener()
757 public void actionPerformed(ActionEvent e)
759 findMenuItem_actionPerformed(e);
762 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
764 showSeqFeatures.setText(
765 MessageManager.getString("label.show_sequence_features"));
766 showSeqFeatures.addActionListener(new ActionListener()
769 public void actionPerformed(ActionEvent actionEvent)
771 showSeqFeatures_actionPerformed(actionEvent);
775 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
776 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
777 * void actionPerformed(ActionEvent actionEvent) {
778 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
781 .setText(MessageManager.getString("label.show_database_refs"));
782 showDbRefsMenuitem.addActionListener(new ActionListener()
786 public void actionPerformed(ActionEvent e)
788 showDbRefs_actionPerformed(e);
792 showNpFeatsMenuitem.setText(
793 MessageManager.getString("label.show_non_positional_features"));
794 showNpFeatsMenuitem.addActionListener(new ActionListener()
798 public void actionPerformed(ActionEvent e)
800 showNpFeats_actionPerformed(e);
804 showGroupConservation
805 .setText(MessageManager.getString("label.group_conservation"));
806 showGroupConservation.addActionListener(new ActionListener()
810 public void actionPerformed(ActionEvent e)
812 showGroupConservation_actionPerformed(e);
818 .setText(MessageManager.getString("label.group_consensus"));
819 showGroupConsensus.addActionListener(new ActionListener()
823 public void actionPerformed(ActionEvent e)
825 showGroupConsensus_actionPerformed(e);
829 showConsensusHistogram.setText(
830 MessageManager.getString("label.show_consensus_histogram"));
831 showConsensusHistogram.addActionListener(new ActionListener()
835 public void actionPerformed(ActionEvent e)
837 showConsensusHistogram_actionPerformed(e);
842 .setText(MessageManager.getString("label.show_consensus_logo"));
843 showSequenceLogo.addActionListener(new ActionListener()
847 public void actionPerformed(ActionEvent e)
849 showSequenceLogo_actionPerformed(e);
853 normaliseSequenceLogo
854 .setText(MessageManager.getString("label.norm_consensus_logo"));
855 normaliseSequenceLogo.addActionListener(new ActionListener()
859 public void actionPerformed(ActionEvent e)
861 normaliseSequenceLogo_actionPerformed(e);
865 applyAutoAnnotationSettings
866 .setText(MessageManager.getString("label.apply_all_groups"));
867 applyAutoAnnotationSettings.setState(false);
868 applyAutoAnnotationSettings.setVisible(true);
869 applyAutoAnnotationSettings.addActionListener(new ActionListener()
872 public void actionPerformed(ActionEvent e)
874 applyAutoAnnotationSettings_actionPerformed(e);
878 ButtonGroup buttonGroup = new ButtonGroup();
879 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
880 MessageManager.getString("label.show_first"));
881 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
882 MessageManager.getString("label.show_last"));
883 buttonGroup.add(showAutoFirst);
884 buttonGroup.add(showAutoLast);
885 final boolean autoFirst = Cache
886 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
887 showAutoFirst.setSelected(autoFirst);
888 setShowAutoCalculatedAbove(autoFirst);
889 showAutoFirst.addActionListener(new ActionListener()
892 public void actionPerformed(ActionEvent e)
894 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
895 sortAnnotations_actionPerformed();
898 showAutoLast.setSelected(!showAutoFirst.isSelected());
899 showAutoLast.addActionListener(new ActionListener()
902 public void actionPerformed(ActionEvent e)
904 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
905 sortAnnotations_actionPerformed();
909 JMenuItem deleteGroups = new JMenuItem(
910 MessageManager.getString("action.undefine_groups"));
911 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
912 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
913 al = new ActionListener()
916 public void actionPerformed(ActionEvent e)
918 deleteGroups_actionPerformed(e);
921 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
923 JMenuItem annotationColumn = new JMenuItem(
924 MessageManager.getString("action.select_by_annotation"));
925 annotationColumn.addActionListener(new ActionListener()
928 public void actionPerformed(ActionEvent e)
930 annotationColumn_actionPerformed(e);
934 JMenuItem createGroup = new JMenuItem(
935 MessageManager.getString("action.create_group"));
936 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
937 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
938 al = new ActionListener()
941 public void actionPerformed(ActionEvent e)
943 createGroup_actionPerformed(e);
946 addMenuActionAndAccelerator(keyStroke, createGroup, al);
948 JMenuItem unGroup = new JMenuItem(
949 MessageManager.getString("action.remove_group"));
950 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
951 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
952 | KeyEvent.SHIFT_MASK,
954 al = new ActionListener()
957 public void actionPerformed(ActionEvent e)
959 unGroup_actionPerformed(e);
962 addMenuActionAndAccelerator(keyStroke, unGroup, al);
964 copy.setText(MessageManager.getString("action.copy"));
965 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
966 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
968 al = new ActionListener()
971 public void actionPerformed(ActionEvent e)
973 copy_actionPerformed(e);
976 addMenuActionAndAccelerator(keyStroke, copy, al);
978 cut.setText(MessageManager.getString("action.cut"));
979 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
980 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
981 al = new ActionListener()
984 public void actionPerformed(ActionEvent e)
986 cut_actionPerformed(e);
989 addMenuActionAndAccelerator(keyStroke, cut, al);
991 JMenuItem delete = new JMenuItem(
992 MessageManager.getString("action.delete"));
993 delete.addActionListener(new ActionListener()
996 public void actionPerformed(ActionEvent e)
998 delete_actionPerformed(e);
1002 pasteMenu.setText(MessageManager.getString("action.paste"));
1003 JMenuItem pasteNew = new JMenuItem(
1004 MessageManager.getString("label.to_new_alignment"));
1005 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1006 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1007 | KeyEvent.SHIFT_MASK,
1009 al = new ActionListener()
1012 public void actionPerformed(ActionEvent e)
1014 pasteNew_actionPerformed(e);
1017 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1019 JMenuItem pasteThis = new JMenuItem(
1020 MessageManager.getString("label.to_this_alignment"));
1021 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1022 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1023 al = new ActionListener()
1026 public void actionPerformed(ActionEvent e)
1028 pasteThis_actionPerformed(e);
1031 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1033 JMenuItem createPNG = new JMenuItem("PNG");
1034 createPNG.addActionListener(new ActionListener()
1037 public void actionPerformed(ActionEvent e)
1042 createPNG.setActionCommand(
1043 MessageManager.getString("label.save_png_image"));
1045 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1046 font.addActionListener(new ActionListener()
1049 public void actionPerformed(ActionEvent e)
1051 font_actionPerformed(e);
1055 MessageManager.getString("label.show_sequence_limits"));
1056 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1057 seqLimits.addActionListener(new ActionListener()
1060 public void actionPerformed(ActionEvent e)
1062 seqLimit_actionPerformed(e);
1065 JMenuItem epsFile = new JMenuItem("EPS");
1066 epsFile.addActionListener(new ActionListener()
1069 public void actionPerformed(ActionEvent e)
1075 JMenuItem createSVG = new JMenuItem("SVG");
1076 createSVG.addActionListener(new ActionListener()
1079 public void actionPerformed(ActionEvent e)
1085 JMenuItem loadTreeMenuItem = new JMenuItem(
1086 MessageManager.getString("label.load_associated_tree"));
1087 loadTreeMenuItem.setActionCommand(
1088 MessageManager.getString("label.load_tree_for_sequence_set"));
1089 loadTreeMenuItem.addActionListener(new ActionListener()
1092 public void actionPerformed(ActionEvent e)
1094 loadTreeMenuItem_actionPerformed(e);
1098 scaleAbove.setVisible(false);
1099 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1100 scaleAbove.addActionListener(new ActionListener()
1103 public void actionPerformed(ActionEvent e)
1105 scaleAbove_actionPerformed(e);
1108 scaleLeft.setVisible(false);
1109 scaleLeft.setSelected(true);
1110 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1111 scaleLeft.addActionListener(new ActionListener()
1114 public void actionPerformed(ActionEvent e)
1116 scaleLeft_actionPerformed(e);
1119 scaleRight.setVisible(false);
1120 scaleRight.setSelected(true);
1121 scaleRight.setText(MessageManager.getString("action.scale_right"));
1122 scaleRight.addActionListener(new ActionListener()
1125 public void actionPerformed(ActionEvent e)
1127 scaleRight_actionPerformed(e);
1130 centreColumnLabelsMenuItem.setVisible(true);
1131 centreColumnLabelsMenuItem.setState(false);
1132 centreColumnLabelsMenuItem.setText(
1133 MessageManager.getString("label.centre_column_labels"));
1134 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1137 public void actionPerformed(ActionEvent e)
1139 centreColumnLabels_actionPerformed(e);
1142 followHighlightMenuItem.setVisible(true);
1143 followHighlightMenuItem.setState(true);
1144 followHighlightMenuItem
1145 .setText(MessageManager.getString("label.automatic_scrolling"));
1146 followHighlightMenuItem.addActionListener(new ActionListener()
1150 public void actionPerformed(ActionEvent e)
1152 followHighlight_actionPerformed();
1158 .setText(MessageManager.getString("action.by_tree_order"));
1159 sort.setText(MessageManager.getString("action.sort"));
1160 sort.addMenuListener(new MenuListener()
1163 public void menuSelected(MenuEvent e)
1165 buildTreeSortMenu();
1169 public void menuDeselected(MenuEvent e)
1174 public void menuCanceled(MenuEvent e)
1179 .setText(MessageManager.getString("label.sort_by_score"));
1180 sort.add(sortByAnnotScore);
1181 sort.addMenuListener(new javax.swing.event.MenuListener()
1185 public void menuCanceled(MenuEvent e)
1190 public void menuDeselected(MenuEvent e)
1195 public void menuSelected(MenuEvent e)
1197 buildSortByAnnotationScoresMenu();
1200 sortByAnnotScore.setVisible(false);
1203 .setText(MessageManager.getString("action.calculate_tree_pca"));
1205 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1207 .setState(jalview.bin.Cache.getDefault("PAD_GAPS", false));
1208 padGapsMenuitem.addActionListener(new ActionListener()
1211 public void actionPerformed(ActionEvent e)
1213 padGapsMenuitem_actionPerformed(e);
1216 JMenuItem vamsasStore = new JMenuItem(
1217 MessageManager.getString("label.vamsas_store"));
1218 vamsasStore.setVisible(false);
1219 vamsasStore.addActionListener(new ActionListener()
1222 public void actionPerformed(ActionEvent e)
1224 vamsasStore_actionPerformed(e);
1228 .setText(MessageManager.getString("label.translate_cDNA"));
1229 showTranslation.addActionListener(new ActionListener()
1232 public void actionPerformed(ActionEvent e)
1234 showTranslation_actionPerformed(e);
1237 showReverse.setText(MessageManager.getString("label.reverse"));
1238 showReverse.addActionListener(new ActionListener()
1241 public void actionPerformed(ActionEvent e)
1243 showReverse_actionPerformed(false);
1246 showReverseComplement
1247 .setText(MessageManager.getString("label.reverse_complement"));
1248 showReverseComplement.addActionListener(new ActionListener()
1251 public void actionPerformed(ActionEvent e)
1253 showReverse_actionPerformed(true);
1257 JMenuItem extractScores = new JMenuItem(
1258 MessageManager.getString("label.extract_scores"));
1259 extractScores.addActionListener(new ActionListener()
1262 public void actionPerformed(ActionEvent e)
1264 extractScores_actionPerformed(e);
1267 extractScores.setVisible(true);
1268 // JBPNote: TODO: make gui for regex based score extraction
1270 // for show products actions see AlignFrame.canShowProducts
1271 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1273 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1274 runGroovy.setToolTipText(
1275 MessageManager.getString("label.run_groovy_tip"));
1276 runGroovy.addActionListener(new ActionListener()
1279 public void actionPerformed(ActionEvent e)
1281 runGroovy_actionPerformed();
1285 openFeatureSettings = new JMenuItem(
1286 MessageManager.getString("action.feature_settings"));
1287 openFeatureSettings.setEnabled(false);
1288 openFeatureSettings.addActionListener(new ActionListener()
1291 public void actionPerformed(ActionEvent e)
1293 featureSettings_actionPerformed(e);
1296 JMenuItem fetchSequence = new JMenuItem(
1297 MessageManager.getString("label.fetch_sequences"));
1298 fetchSequence.addActionListener(new ActionListener()
1301 public void actionPerformed(ActionEvent e)
1303 fetchSequence_actionPerformed(e);
1307 JMenuItem associatedData = new JMenuItem(
1308 MessageManager.getString("label.load_features_annotations"));
1309 associatedData.addActionListener(new ActionListener()
1312 public void actionPerformed(ActionEvent e)
1314 associatedData_actionPerformed(e);
1317 loadVcf = new JMenuItem(MessageManager.getString("label.load_vcf_file"));
1318 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1319 loadVcf.addActionListener(new ActionListener()
1322 public void actionPerformed(ActionEvent e)
1324 loadVcf_actionPerformed();
1327 autoCalculate.setText(
1328 MessageManager.getString("label.autocalculate_consensus"));
1329 autoCalculate.setState(
1330 jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1331 autoCalculate.addActionListener(new ActionListener()
1334 public void actionPerformed(ActionEvent e)
1336 autoCalculate_actionPerformed(e);
1340 MessageManager.getString("label.sort_alignment_new_tree"));
1341 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1342 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1344 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1345 sortByTree.addActionListener(new ActionListener()
1348 public void actionPerformed(ActionEvent e)
1350 sortByTreeOption_actionPerformed(e);
1354 listenToViewSelections.setText(
1355 MessageManager.getString("label.listen_for_selections"));
1356 listenToViewSelections
1357 .setToolTipText("<html>" + MessageManager.getString(
1358 "label.selections_mirror_selections_made_same_sequences_other_views"));
1359 listenToViewSelections.setState(false);
1360 listenToViewSelections.addActionListener(new ActionListener()
1363 public void actionPerformed(ActionEvent e)
1365 listenToViewSelections_actionPerformed(e);
1369 JMenu addSequenceMenu = new JMenu(
1370 MessageManager.getString("label.add_sequences"));
1371 JMenuItem addFromFile = new JMenuItem(
1372 MessageManager.getString("label.from_file"));
1373 addFromFile.addActionListener(new ActionListener()
1376 public void actionPerformed(ActionEvent e)
1378 addFromFile_actionPerformed(e);
1381 JMenuItem addFromText = new JMenuItem(
1382 MessageManager.getString("label.from_textbox"));
1383 addFromText.addActionListener(new ActionListener()
1386 public void actionPerformed(ActionEvent e)
1388 addFromText_actionPerformed(e);
1391 JMenuItem addFromURL = new JMenuItem(
1392 MessageManager.getString("label.from_url"));
1393 addFromURL.addActionListener(new ActionListener()
1396 public void actionPerformed(ActionEvent e)
1398 addFromURL_actionPerformed(e);
1401 JMenuItem exportFeatures = new JMenuItem(
1402 MessageManager.getString("label.export_features"));
1403 exportFeatures.addActionListener(new ActionListener()
1406 public void actionPerformed(ActionEvent e)
1408 exportFeatures_actionPerformed(e);
1411 JMenuItem exportAnnotations = new JMenuItem(
1412 MessageManager.getString("label.export_annotations"));
1413 exportAnnotations.addActionListener(new ActionListener()
1416 public void actionPerformed(ActionEvent e)
1418 exportAnnotations_actionPerformed(e);
1421 statusPanel.setLayout(new GridLayout());
1422 JMenuItem showAllSeqs = new JMenuItem(
1423 MessageManager.getString("label.all_sequences"));
1424 showAllSeqs.setToolTipText(
1425 MessageManager.getString("label.toggle_sequence_visibility"));
1426 showAllSeqs.addActionListener(new ActionListener()
1429 public void actionPerformed(ActionEvent e)
1431 showAllSeqs_actionPerformed(e);
1434 JMenuItem showAllColumns = new JMenuItem(
1435 MessageManager.getString("label.all_columns"));
1436 showAllColumns.setToolTipText(
1437 MessageManager.getString("label.toggle_columns_visibility"));
1438 showAllColumns.addActionListener(new ActionListener()
1441 public void actionPerformed(ActionEvent e)
1443 showAllColumns_actionPerformed(e);
1446 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1447 JMenuItem hideSelSequences = new JMenuItem(
1448 MessageManager.getString("label.selected_sequences"));
1449 hideSelSequences.setToolTipText(
1450 MessageManager.getString("label.toggle_sequence_visibility"));
1451 hideSelSequences.addActionListener(new ActionListener()
1454 public void actionPerformed(ActionEvent e)
1456 hideSelSequences_actionPerformed(e);
1459 JMenuItem hideSelColumns = new JMenuItem(
1460 MessageManager.getString("label.selected_columns"));
1461 hideSelColumns.setToolTipText(
1462 MessageManager.getString("label.toggle_columns_visibility"));
1463 hideSelColumns.addActionListener(new ActionListener()
1466 public void actionPerformed(ActionEvent e)
1468 hideSelColumns_actionPerformed(e);
1471 JMenuItem hideAllSelection = new JMenuItem(
1472 MessageManager.getString("label.selected_region"));
1473 hideAllSelection.addActionListener(new ActionListener()
1476 public void actionPerformed(ActionEvent e)
1478 hideAllSelection_actionPerformed(e);
1481 // TODO: should be hidden if no selection exists.
1482 JMenuItem hideAllButSelection = new JMenuItem(
1483 MessageManager.getString("label.all_but_selected_region"));
1484 hideAllButSelection.addActionListener(new ActionListener()
1487 public void actionPerformed(ActionEvent e)
1489 hideAllButSelection_actionPerformed(e);
1492 JMenuItem showAllhidden = new JMenuItem(
1493 MessageManager.getString("label.all_sequences_columns"));
1494 showAllhidden.setToolTipText(MessageManager
1495 .getString("label.toggles_visibility_hidden_selected_regions"));
1496 showAllhidden.addActionListener(new ActionListener()
1499 public void actionPerformed(ActionEvent e)
1501 showAllhidden_actionPerformed(e);
1504 hiddenMarkers.setText(
1505 MessageManager.getString("action.show_hidden_markers"));
1506 hiddenMarkers.addActionListener(new ActionListener()
1509 public void actionPerformed(ActionEvent e)
1511 hiddenMarkers_actionPerformed(e);
1515 JMenuItem invertColSel = new JMenuItem(
1516 MessageManager.getString("action.invert_column_selection"));
1517 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1518 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1519 | KeyEvent.ALT_MASK,
1521 al = new ActionListener()
1524 public void actionPerformed(ActionEvent e)
1526 invertColSel_actionPerformed(e);
1529 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1531 showComplementMenuItem.setVisible(false);
1532 showComplementMenuItem.addActionListener(new ActionListener()
1535 public void actionPerformed(ActionEvent e)
1537 showComplement_actionPerformed(showComplementMenuItem.getState());
1541 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1544 public void stateChanged(ChangeEvent evt)
1546 JTabbedPane pane = (JTabbedPane) evt.getSource();
1547 int sel = pane.getSelectedIndex();
1548 tabSelectionChanged(sel);
1551 tabbedPane.addMouseListener(new MouseAdapter()
1554 public void mousePressed(MouseEvent e)
1556 if (e.isPopupTrigger()) // Mac
1558 tabbedPane_mousePressed(e);
1563 public void mouseReleased(MouseEvent e)
1565 if (e.isPopupTrigger()) // Windows
1567 tabbedPane_mousePressed(e);
1571 tabbedPane.addFocusListener(new FocusAdapter()
1574 public void focusGained(FocusEvent e)
1576 tabbedPane_focusGained(e);
1580 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1581 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1582 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1583 al = new ActionListener()
1586 public void actionPerformed(ActionEvent e)
1588 save_actionPerformed(e);
1591 addMenuActionAndAccelerator(keyStroke, save, al);
1593 reload.setEnabled(false);
1594 reload.setText(MessageManager.getString("action.reload"));
1595 reload.addActionListener(new ActionListener()
1598 public void actionPerformed(ActionEvent e)
1600 reload_actionPerformed(e);
1604 JMenuItem newView = new JMenuItem(
1605 MessageManager.getString("action.new_view"));
1606 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1607 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1608 al = new ActionListener()
1611 public void actionPerformed(ActionEvent e)
1613 newView_actionPerformed(e);
1616 addMenuActionAndAccelerator(keyStroke, newView, al);
1618 tabbedPane.setToolTipText("<html><i>"
1619 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1622 formatMenu.setText(MessageManager.getString("action.format"));
1623 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1625 idRightAlign.setText(
1626 MessageManager.getString("label.right_align_sequence_id"));
1627 idRightAlign.addActionListener(new ActionListener()
1630 public void actionPerformed(ActionEvent e)
1632 idRightAlign_actionPerformed(e);
1636 gatherViews.setEnabled(false);
1637 gatherViews.setText(MessageManager.getString("action.gather_views"));
1638 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1639 al = new ActionListener()
1642 public void actionPerformed(ActionEvent e)
1644 gatherViews_actionPerformed(e);
1647 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1649 expandViews.setEnabled(false);
1650 expandViews.setText(MessageManager.getString("action.expand_views"));
1651 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1652 al = new ActionListener()
1655 public void actionPerformed(ActionEvent e)
1657 expandViews_actionPerformed(e);
1660 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1662 JMenuItem pageSetup = new JMenuItem(
1663 MessageManager.getString("action.page_setup"));
1664 pageSetup.addActionListener(new ActionListener()
1667 public void actionPerformed(ActionEvent e)
1669 pageSetup_actionPerformed(e);
1672 JMenuItem alignmentProperties = new JMenuItem(
1673 MessageManager.getString("label.alignment_props"));
1674 alignmentProperties.addActionListener(new ActionListener()
1677 public void actionPerformed(ActionEvent actionEvent)
1679 alignmentProperties();
1682 JMenuItem selectHighlighted = new JMenuItem(
1683 MessageManager.getString("action.select_highlighted_columns"));
1684 selectHighlighted.setToolTipText(
1685 MessageManager.getString("tooltip.select_highlighted_columns"));
1686 al = new ActionListener()
1689 public void actionPerformed(ActionEvent actionEvent)
1691 selectHighlightedColumns_actionPerformed(actionEvent);
1694 selectHighlighted.addActionListener(al);
1695 JMenu tooltipSettingsMenu = new JMenu(
1696 MessageManager.getString("label.sequence_id_tooltip"));
1697 JMenu autoAnnMenu = new JMenu(
1698 MessageManager.getString("label.autocalculated_annotation"));
1700 JMenu exportImageMenu = new JMenu(
1701 MessageManager.getString("label.export_image"));
1702 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1703 alignFrameMenuBar.add(fileMenu);
1704 alignFrameMenuBar.add(editMenu);
1705 alignFrameMenuBar.add(selectMenu);
1706 alignFrameMenuBar.add(viewMenu);
1707 alignFrameMenuBar.add(annotationsMenu);
1708 alignFrameMenuBar.add(formatMenu);
1709 alignFrameMenuBar.add(colourMenu);
1710 alignFrameMenuBar.add(calculateMenu);
1711 if (!Jalview.isJS())
1713 alignFrameMenuBar.add(webService);
1716 fileMenu.add(fetchSequence);
1717 fileMenu.add(addSequenceMenu);
1718 fileMenu.add(reload);
1719 fileMenu.addSeparator();
1720 fileMenu.add(vamsasStore);
1722 fileMenu.add(saveAs);
1723 fileMenu.add(outputTextboxMenu);
1724 fileMenu.add(pageSetup);
1725 fileMenu.add(printMenuItem);
1726 fileMenu.addSeparator();
1727 fileMenu.add(exportImageMenu);
1728 fileMenu.add(exportFeatures);
1729 fileMenu.add(exportAnnotations);
1730 fileMenu.add(loadTreeMenuItem);
1731 fileMenu.add(associatedData);
1732 if (!Jalview.isJS())
1734 fileMenu.add(loadVcf);
1736 fileMenu.addSeparator();
1737 fileMenu.add(closeMenuItem);
1739 pasteMenu.add(pasteNew);
1740 pasteMenu.add(pasteThis);
1741 editMenu.add(undoMenuItem);
1742 editMenu.add(redoMenuItem);
1745 editMenu.add(pasteMenu);
1746 editMenu.add(delete);
1747 editMenu.addSeparator();
1748 editMenu.add(remove2LeftMenuItem);
1749 editMenu.add(remove2RightMenuItem);
1750 editMenu.add(removeGappedColumnMenuItem);
1751 editMenu.add(removeAllGapsMenuItem);
1752 editMenu.add(removeRedundancyMenuItem);
1753 editMenu.addSeparator();
1754 // dont add these yet in the CVS build - they cannot be undone!
1755 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1756 // editMenu.add(justifyLeftMenuItem);
1757 // editMenu.add(justifyRightMenuItem);
1758 // editMenu.addSeparator();
1759 editMenu.add(padGapsMenuitem);
1761 showMenu.add(showAllColumns);
1762 showMenu.add(showAllSeqs);
1763 showMenu.add(showAllhidden);
1764 hideMenu.add(hideSelColumns);
1765 hideMenu.add(hideSelSequences);
1766 hideMenu.add(hideAllSelection);
1767 hideMenu.add(hideAllButSelection);
1768 viewMenu.add(newView);
1769 if (!Jalview.isJS())
1771 viewMenu.add(expandViews);
1772 viewMenu.add(gatherViews);
1774 viewMenu.addSeparator();
1775 viewMenu.add(showMenu);
1776 viewMenu.add(hideMenu);
1777 viewMenu.add(showComplementMenuItem);
1778 viewMenu.addSeparator();
1779 viewMenu.add(followHighlightMenuItem);
1780 viewMenu.addSeparator();
1781 viewMenu.add(showSeqFeatures);
1782 // viewMenu.add(showSeqFeaturesHeight);
1783 viewMenu.add(openFeatureSettings);
1784 tooltipSettingsMenu.add(showDbRefsMenuitem);
1785 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1786 viewMenu.add(tooltipSettingsMenu);
1787 viewMenu.addSeparator();
1788 viewMenu.add(alignmentProperties);
1789 viewMenu.addSeparator();
1790 viewMenu.add(overviewMenuItem);
1792 annotationsMenu.add(annotationPanelMenuItem);
1793 annotationsMenu.addSeparator();
1794 annotationsMenu.add(showAllAlAnnotations);
1795 annotationsMenu.add(hideAllAlAnnotations);
1796 annotationsMenu.addSeparator();
1797 annotationsMenu.add(showAllSeqAnnotations);
1798 annotationsMenu.add(hideAllSeqAnnotations);
1799 annotationsMenu.add(sortAnnBySequence);
1800 annotationsMenu.add(sortAnnByLabel);
1801 annotationsMenu.addSeparator();
1802 autoAnnMenu.add(showAutoFirst);
1803 autoAnnMenu.add(showAutoLast);
1804 autoAnnMenu.addSeparator();
1805 autoAnnMenu.add(applyAutoAnnotationSettings);
1806 autoAnnMenu.add(showConsensusHistogram);
1807 autoAnnMenu.add(showSequenceLogo);
1808 autoAnnMenu.add(normaliseSequenceLogo);
1809 autoAnnMenu.addSeparator();
1810 autoAnnMenu.add(showGroupConservation);
1811 autoAnnMenu.add(showGroupConsensus);
1812 annotationsMenu.add(autoAnnMenu);
1814 sort.add(sortIDMenuItem);
1815 sort.add(sortLengthMenuItem);
1816 sort.add(sortGroupMenuItem);
1817 sort.add(sortPairwiseMenuItem);
1818 sort.add(sortByTreeMenu);
1819 calculateMenu.add(sort);
1820 calculateMenu.add(calculateTree);
1821 calculateMenu.addSeparator();
1822 calculateMenu.add(pairwiseAlignmentMenuItem);
1823 calculateMenu.addSeparator();
1824 calculateMenu.add(showTranslation);
1825 calculateMenu.add(showReverse);
1826 calculateMenu.add(showReverseComplement);
1827 calculateMenu.add(showProducts);
1828 calculateMenu.add(autoCalculate);
1829 calculateMenu.add(sortByTree);
1830 calculateMenu.addSeparator();
1831 calculateMenu.add(expandAlignment);
1832 calculateMenu.add(extractScores);
1833 if (!Jalview.isJS())
1835 calculateMenu.addSeparator();
1836 calculateMenu.add(runGroovy);
1839 webServiceNoServices = new JMenuItem(
1840 MessageManager.getString("label.no_services"));
1841 webService.add(webServiceNoServices);
1842 if (!Jalview.isJS())
1844 exportImageMenu.add(htmlMenuItem);
1846 exportImageMenu.add(epsFile);
1847 exportImageMenu.add(createPNG);
1848 exportImageMenu.add(createBioJS);
1849 if (!Jalview.isJS())
1851 exportImageMenu.add(createSVG);
1853 addSequenceMenu.add(addFromFile);
1854 addSequenceMenu.add(addFromText);
1855 addSequenceMenu.add(addFromURL);
1856 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1857 statusPanel.add(statusBar, null);
1858 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1860 formatMenu.add(font);
1861 formatMenu.addSeparator();
1862 formatMenu.add(wrapMenuItem);
1863 formatMenu.add(scaleAbove);
1864 formatMenu.add(scaleLeft);
1865 formatMenu.add(scaleRight);
1866 formatMenu.add(seqLimits);
1867 formatMenu.add(idRightAlign);
1868 formatMenu.add(hiddenMarkers);
1869 formatMenu.add(viewBoxesMenuItem);
1870 formatMenu.add(viewTextMenuItem);
1871 formatMenu.add(colourTextMenuItem);
1872 formatMenu.add(renderGapsMenuItem);
1873 formatMenu.add(centreColumnLabelsMenuItem);
1874 formatMenu.add(showNonconservedMenuItem);
1875 selectMenu.add(findMenuItem);
1876 selectMenu.addSeparator();
1877 selectMenu.add(selectAllSequenceMenuItem);
1878 selectMenu.add(deselectAllSequenceMenuItem);
1879 selectMenu.add(invertSequenceMenuItem);
1880 selectMenu.add(invertColSel);
1881 selectMenu.add(createGroup);
1882 selectMenu.add(unGroup);
1883 selectMenu.add(grpsFromSelection);
1884 selectMenu.add(deleteGroups);
1885 selectMenu.add(annotationColumn);
1886 selectMenu.add(selectHighlighted);
1887 // TODO - determine if the listenToViewSelections button is needed : see bug
1889 // selectMenu.addSeparator();
1890 // selectMenu.add(listenToViewSelections);
1893 protected void loadVcf_actionPerformed()
1898 * Constructs the entries on the Colour menu (but does not add them to the
1901 protected void initColourMenu()
1903 applyToAllGroups = new JCheckBoxMenuItem(
1904 MessageManager.getString("label.apply_colour_to_all_groups"));
1905 applyToAllGroups.addActionListener(new ActionListener()
1908 public void actionPerformed(ActionEvent e)
1910 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1914 textColour = new JMenuItem(
1915 MessageManager.getString("label.text_colour"));
1916 textColour.addActionListener(new ActionListener()
1919 public void actionPerformed(ActionEvent e)
1921 textColour_actionPerformed();
1925 conservationMenuItem = new JCheckBoxMenuItem(
1926 MessageManager.getString("action.by_conservation"));
1927 conservationMenuItem.addActionListener(new ActionListener()
1930 public void actionPerformed(ActionEvent e)
1932 conservationMenuItem_actionPerformed(
1933 conservationMenuItem.isSelected());
1937 abovePIDThreshold = new JCheckBoxMenuItem(
1938 MessageManager.getString("label.above_identity_threshold"));
1939 abovePIDThreshold.addActionListener(new ActionListener()
1942 public void actionPerformed(ActionEvent e)
1944 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
1947 modifyPID = new JMenuItem(
1948 MessageManager.getString("label.modify_identity_threshold"));
1949 modifyPID.addActionListener(new ActionListener()
1952 public void actionPerformed(ActionEvent e)
1954 modifyPID_actionPerformed();
1957 modifyConservation = new JMenuItem(MessageManager
1958 .getString("label.modify_conservation_threshold"));
1959 modifyConservation.addActionListener(new ActionListener()
1962 public void actionPerformed(ActionEvent e)
1964 modifyConservation_actionPerformed();
1968 annotationColour = new JMenuItem(
1969 MessageManager.getString("action.by_annotation"));
1970 annotationColour.addActionListener(new ActionListener()
1973 public void actionPerformed(ActionEvent e)
1975 annotationColour_actionPerformed();
1980 protected void selectHighlightedColumns_actionPerformed(
1981 ActionEvent actionEvent)
1983 // TODO Auto-generated method stub
1988 * Generate the reverse sequence (or reverse complement if the flag is true)
1989 * and add it to the alignment
1993 protected void showReverse_actionPerformed(boolean complement)
1998 * Try to run script in a Groovy console, having first ensured that this
1999 * alignframe is set as currentAlignFrame in Desktop
2001 protected void runGroovy_actionPerformed()
2007 * Adds the given action listener and key accelerator to the given menu item.
2008 * Also saves in a lookup table to support lookup of action by key stroke.
2012 * @param actionListener
2014 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2015 JMenuItem menuItem, ActionListener actionListener)
2017 menuItem.setAccelerator(keyStroke);
2018 accelerators.put(keyStroke, menuItem);
2019 menuItem.addActionListener(actionListener);
2023 * Action on clicking sort annotations by type.
2027 protected void sortAnnotations_actionPerformed()
2032 * Action on clicking Show all annotations.
2034 * @param forSequences
2035 * update sequence-related annotations
2036 * @param forAlignment
2037 * update non-sequence-related annotations
2039 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2040 boolean forAlignment)
2042 setAnnotationsVisibility(true, forSequences, forAlignment);
2046 * Action on clicking Hide all annotations.
2048 * @param forSequences
2049 * update sequence-related annotations
2050 * @param forAlignment
2051 * update non-sequence-related annotations
2053 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2054 boolean forAlignment)
2056 setAnnotationsVisibility(false, forSequences, forAlignment);
2060 * Set the visibility of annotations to true or false. Can act on
2061 * sequence-related annotations, or alignment-related, or both.
2064 * @param forSequences
2065 * update sequence-related annotations
2066 * @param forAlignment
2067 * update non-sequence-related annotations
2069 protected void setAnnotationsVisibility(boolean visible,
2070 boolean forSequences, boolean forAlignment)
2075 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2077 // TODO Auto-generated method stub
2081 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2083 // TODO Auto-generated method stub
2087 protected void showAllhidden_actionPerformed(ActionEvent e)
2089 // TODO Auto-generated method stub
2093 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2095 // TODO Auto-generated method stub
2099 protected void hideAllSelection_actionPerformed(ActionEvent e)
2101 // TODO Auto-generated method stub
2105 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2107 // TODO Auto-generated method stub
2111 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2113 // TODO Auto-generated method stub
2117 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2119 // TODO Auto-generated method stub
2123 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2125 // TODO Auto-generated method stub
2129 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2131 // TODO Auto-generated method stub
2135 protected void showGroupConservation_actionPerformed(ActionEvent e)
2137 // TODO Auto-generated method stub
2141 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2143 // TODO Auto-generated method stub
2147 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2149 // TODO Auto-generated method stub
2153 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2155 // TODO Auto-generated method stub
2159 protected void followHighlight_actionPerformed()
2161 // TODO Auto-generated method stub
2165 protected void showNpFeats_actionPerformed(ActionEvent e)
2167 // TODO Auto-generated method stub
2171 protected void showDbRefs_actionPerformed(ActionEvent e)
2173 // TODO Auto-generated method stub
2177 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2181 protected void buildSortByAnnotationScoresMenu()
2185 protected void extractScores_actionPerformed(ActionEvent e)
2189 protected void outputText_actionPerformed(String formatName)
2193 public void addFromFile_actionPerformed(ActionEvent e)
2198 public void addFromText_actionPerformed(ActionEvent e)
2203 public void addFromURL_actionPerformed(ActionEvent e)
2208 public void exportFeatures_actionPerformed(ActionEvent e)
2213 public void exportAnnotations_actionPerformed(ActionEvent e)
2218 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2222 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2227 protected void closeMenuItem_actionPerformed(boolean b)
2231 protected void redoMenuItem_actionPerformed(ActionEvent e)
2235 protected void undoMenuItem_actionPerformed(ActionEvent e)
2239 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2243 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2247 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2251 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2255 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2259 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2263 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2267 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2271 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2275 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2279 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2283 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2287 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2291 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2295 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2299 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2303 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2307 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2311 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2315 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2319 protected void conservationMenuItem_actionPerformed(boolean selected)
2323 protected void printMenuItem_actionPerformed(ActionEvent e)
2327 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2331 protected void findMenuItem_actionPerformed(ActionEvent e)
2335 protected void abovePIDThreshold_actionPerformed(boolean selected)
2339 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2343 protected void deleteGroups_actionPerformed(ActionEvent e)
2347 protected void createGroup_actionPerformed(ActionEvent e)
2351 protected void unGroup_actionPerformed(ActionEvent e)
2355 protected void copy_actionPerformed(ActionEvent e)
2359 protected void cut_actionPerformed(ActionEvent e)
2363 protected void delete_actionPerformed(ActionEvent e)
2367 protected void pasteNew_actionPerformed(ActionEvent e)
2371 protected void pasteThis_actionPerformed(ActionEvent e)
2375 protected void applyToAllGroups_actionPerformed(boolean selected)
2379 public void createPNG(java.io.File f)
2383 protected void font_actionPerformed(ActionEvent e)
2387 protected void seqLimit_actionPerformed(ActionEvent e)
2391 public void seqDBRef_actionPerformed(ActionEvent e)
2396 public void createEPS(java.io.File f)
2400 public void createSVG(java.io.File f)
2405 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2411 * Template method to handle the 'load T-Coffee scores' menu event.
2413 * Subclasses override this method to provide a custom action.
2418 protected void loadScores_actionPerformed(ActionEvent event)
2423 protected void jpred_actionPerformed(ActionEvent e)
2427 protected void scaleAbove_actionPerformed(ActionEvent e)
2431 protected void scaleLeft_actionPerformed(ActionEvent e)
2435 protected void scaleRight_actionPerformed(ActionEvent e)
2439 protected void modifyPID_actionPerformed()
2443 protected void modifyConservation_actionPerformed()
2447 protected void saveAs_actionPerformed()
2451 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2455 public void vamsasStore_actionPerformed(ActionEvent e)
2460 public void vamsasLoad_actionPerformed(ActionEvent e)
2465 public void showTranslation_actionPerformed(ActionEvent e)
2470 public void featureSettings_actionPerformed(ActionEvent e)
2475 public void fetchSequence_actionPerformed(ActionEvent e)
2480 public void smoothFont_actionPerformed(ActionEvent e)
2485 public void annotationColour_actionPerformed()
2489 public void annotationColumn_actionPerformed(ActionEvent e)
2493 public void associatedData_actionPerformed(ActionEvent e)
2498 public void autoCalculate_actionPerformed(ActionEvent e)
2503 public void sortByTreeOption_actionPerformed(ActionEvent e)
2508 public void showAllSeqs_actionPerformed(ActionEvent e)
2513 public void showAllColumns_actionPerformed(ActionEvent e)
2518 public void hideSelSequences_actionPerformed(ActionEvent e)
2523 public void hideSelColumns_actionPerformed(ActionEvent e)
2528 public void hiddenMarkers_actionPerformed(ActionEvent e)
2533 public void findPdbId_actionPerformed(ActionEvent e)
2538 public void enterPdbId_actionPerformed(ActionEvent e)
2543 public void pdbFile_actionPerformed(ActionEvent e)
2548 public void invertColSel_actionPerformed(ActionEvent e)
2553 public void tabSelectionChanged(int sel)
2558 public void tabbedPane_mousePressed(MouseEvent e)
2563 public void tabbedPane_focusGained(FocusEvent e)
2568 public void save_actionPerformed(ActionEvent e)
2573 public void reload_actionPerformed(ActionEvent e)
2578 public void newView_actionPerformed(ActionEvent e)
2583 public void textColour_actionPerformed()
2588 public void idRightAlign_actionPerformed(ActionEvent e)
2593 public void expandViews_actionPerformed(ActionEvent e)
2598 public void gatherViews_actionPerformed(ActionEvent e)
2603 public void buildTreeSortMenu()
2608 public void pageSetup_actionPerformed(ActionEvent e)
2613 public void alignmentProperties()
2618 protected void expand_newalign(ActionEvent e)
2620 // TODO Auto-generated method stub
2624 protected boolean isShowAutoCalculatedAbove()
2626 return showAutoCalculatedAbove;
2629 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2631 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2634 protected SequenceAnnotationOrder getAnnotationSortOrder()
2636 return annotationSortOrder;
2639 protected void setAnnotationSortOrder(
2640 SequenceAnnotationOrder annotationSortOrder)
2642 this.annotationSortOrder = annotationSortOrder;
2645 public Map<KeyStroke, JMenuItem> getAccelerators()
2647 return this.accelerators;
2651 * Returns the selected index of the tabbed pane, or -1 if none selected
2652 * (including the case where the tabbed pane has not been made visible).
2656 public int getTabIndex()
2658 return tabbedPane.getSelectedIndex();
2661 public JPanel getStatusPanel()
2667 * Sets a reference to the containing split frame. Also makes the 'toggle
2668 * split view' menu item visible and checked.
2672 public void setSplitFrame(SplitContainerI sf)
2674 this.splitFrame = sf;
2677 this.showComplementMenuItem.setVisible(true);
2678 this.showComplementMenuItem.setState(true);
2682 public SplitContainerI getSplitViewContainer()
2684 return this.splitFrame;
2687 protected void showComplement_actionPerformed(boolean complement)