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.util.HashMap;
46 import javax.swing.BorderFactory;
47 import javax.swing.ButtonGroup;
48 import javax.swing.JCheckBoxMenuItem;
49 import javax.swing.JInternalFrame;
50 import javax.swing.JLabel;
51 import javax.swing.JMenu;
52 import javax.swing.JMenuBar;
53 import javax.swing.JMenuItem;
54 import javax.swing.JPanel;
55 import javax.swing.JRadioButtonMenuItem;
56 import javax.swing.JTabbedPane;
57 import javax.swing.KeyStroke;
58 import javax.swing.event.ChangeEvent;
59 import javax.swing.event.MenuEvent;
60 import javax.swing.event.MenuListener;
62 public class GAlignFrame extends JInternalFrame
64 protected JMenuBar alignFrameMenuBar = new JMenuBar();
66 protected JMenuItem closeMenuItem = new JMenuItem();
68 protected JMenu webService = new JMenu();
70 protected JMenuItem webServiceNoServices;
72 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
74 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
76 protected JMenu sortByAnnotScore = new JMenu();
78 public JLabel statusBar = new JLabel();
80 protected JMenu outputTextboxMenu = new JMenu();
82 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
84 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
86 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
88 protected JMenuItem undoMenuItem = new JMenuItem();
90 protected JMenuItem redoMenuItem = new JMenuItem();
92 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
94 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
96 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
98 JMenuItem copy = new JMenuItem();
100 JMenuItem cut = new JMenuItem();
102 JMenu pasteMenu = new JMenu();
104 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
106 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
108 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
110 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
112 protected JCheckBoxMenuItem applyToAllGroups;
114 protected JMenu colourMenu = new JMenu();
116 protected JMenuItem textColour;
118 protected JCheckBoxMenuItem conservationMenuItem;
120 protected JMenuItem modifyConservation;
122 protected JCheckBoxMenuItem abovePIDThreshold;
124 protected JMenuItem modifyPID;
126 protected JMenuItem annotationColour;
128 protected JMenu sortByTreeMenu = new JMenu();
130 protected JMenu sort = new JMenu();
132 protected JMenuItem calculateTree = new JMenuItem();
134 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
136 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
138 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
140 protected JMenuItem showTranslation = new JMenuItem();
142 protected JMenuItem showReverse = new JMenuItem();
144 protected JMenuItem showReverseComplement = new JMenuItem();
146 protected JMenu showProducts = new JMenu();
148 protected JMenuItem runGroovy = new JMenuItem();
150 protected JMenuItem loadVcf;
152 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
154 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
156 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
158 protected JPanel statusPanel = new JPanel();
160 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
162 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
164 protected JMenuItem showAllAlAnnotations = new JMenuItem();
166 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
168 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
170 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
172 protected JTabbedPane tabbedPane = jalview.jbgui.GDesktop.createTabbedPane();
174 protected JMenuItem reload = new JMenuItem();
176 protected JMenu formatMenu = new JMenu();
178 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
180 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
182 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
184 protected JMenuItem gatherViews = new JMenuItem();
186 protected JMenuItem expandViews = new JMenuItem();
188 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
190 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
192 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
194 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
196 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
198 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
200 protected JMenuItem openFeatureSettings;
202 private SequenceAnnotationOrder annotationSortOrder;
204 private boolean showAutoCalculatedAbove = false;
206 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<KeyStroke, JMenuItem>();
208 private SplitContainerI splitFrame;
215 setJMenuBar(alignFrameMenuBar);
217 // dynamically fill save as menu with available formats
218 for (String ff : FileFormats.getInstance().getWritableFormats(true))
220 JMenuItem item = new JMenuItem(ff);
222 item.addActionListener(new ActionListener()
225 public void actionPerformed(ActionEvent e)
227 outputText_actionPerformed(e.getActionCommand());
231 outputTextboxMenu.add(item);
233 } catch (Exception e)
235 System.err.println(e.toString());
238 if (Platform.allowMnemonics()) // was "not mac and not JS"
240 closeMenuItem.setMnemonic('C');
241 outputTextboxMenu.setMnemonic('T');
242 undoMenuItem.setMnemonic('Z');
243 redoMenuItem.setMnemonic('0');
244 copy.setMnemonic('C');
245 cut.setMnemonic('U');
246 pasteMenu.setMnemonic('P');
247 reload.setMnemonic('R');
251 private void jbInit() throws Exception
255 JMenuItem saveAs = new JMenuItem(
256 MessageManager.getString("action.save_as"));
257 ActionListener al = new ActionListener()
260 public void actionPerformed(ActionEvent e)
262 saveAs_actionPerformed();
266 // FIXME getDefaultToolkit throws an exception in Headless mode
267 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
268 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
269 | KeyEvent.SHIFT_MASK,
271 addMenuActionAndAccelerator(keyStroke, saveAs, al);
273 closeMenuItem.setText(MessageManager.getString("action.close"));
274 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
275 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
276 al = new ActionListener()
279 public void actionPerformed(ActionEvent e)
281 closeMenuItem_actionPerformed(false);
284 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
286 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
287 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
288 JMenu annotationsMenu = new JMenu(
289 MessageManager.getString("action.annotations"));
290 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
291 colourMenu.setText(MessageManager.getString("action.colour"));
292 JMenu calculateMenu = new JMenu(
293 MessageManager.getString("action.calculate"));
294 webService.setText(MessageManager.getString("action.web_service"));
295 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
296 MessageManager.getString("action.select_all"));
297 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
298 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
299 al = new ActionListener()
302 public void actionPerformed(ActionEvent e)
304 selectAllSequenceMenuItem_actionPerformed(e);
307 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
309 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
310 MessageManager.getString("action.deselect_all"));
311 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
312 al = new ActionListener()
315 public void actionPerformed(ActionEvent e)
317 deselectAllSequenceMenuItem_actionPerformed(e);
320 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
322 JMenuItem invertSequenceMenuItem = new JMenuItem(
323 MessageManager.getString("action.invert_sequence_selection"));
324 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
325 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
326 al = new ActionListener()
329 public void actionPerformed(ActionEvent e)
331 invertSequenceMenuItem_actionPerformed(e);
334 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
336 JMenuItem grpsFromSelection = new JMenuItem(
337 MessageManager.getString("action.make_groups_selection"));
338 grpsFromSelection.addActionListener(new ActionListener()
341 public void actionPerformed(ActionEvent e)
343 makeGrpsFromSelection_actionPerformed(e);
346 JMenuItem expandAlignment = new JMenuItem(
347 MessageManager.getString("action.view_flanking_regions"));
348 expandAlignment.setToolTipText(
349 MessageManager.getString("label.view_flanking_regions"));
350 expandAlignment.addActionListener(new ActionListener()
353 public void actionPerformed(ActionEvent e)
358 JMenuItem remove2LeftMenuItem = new JMenuItem(
359 MessageManager.getString("action.remove_left"));
360 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
361 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
362 al = new ActionListener()
365 public void actionPerformed(ActionEvent e)
367 remove2LeftMenuItem_actionPerformed(e);
370 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
372 JMenuItem remove2RightMenuItem = new JMenuItem(
373 MessageManager.getString("action.remove_right"));
374 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
375 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
376 al = new ActionListener()
379 public void actionPerformed(ActionEvent e)
381 remove2RightMenuItem_actionPerformed(e);
384 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
386 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
387 MessageManager.getString("action.remove_empty_columns"));
388 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
389 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
390 al = new ActionListener()
393 public void actionPerformed(ActionEvent e)
395 removeGappedColumnMenuItem_actionPerformed(e);
398 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
400 JMenuItem removeAllGapsMenuItem = new JMenuItem(
401 MessageManager.getString("action.remove_all_gaps"));
402 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
403 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
404 | KeyEvent.SHIFT_MASK,
406 al = new ActionListener()
409 public void actionPerformed(ActionEvent e)
411 removeAllGapsMenuItem_actionPerformed(e);
414 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
416 JMenuItem justifyLeftMenuItem = new JMenuItem(
417 MessageManager.getString("action.left_justify_alignment"));
418 justifyLeftMenuItem.addActionListener(new ActionListener()
421 public void actionPerformed(ActionEvent e)
423 justifyLeftMenuItem_actionPerformed(e);
426 JMenuItem justifyRightMenuItem = new JMenuItem(
427 MessageManager.getString("action.right_justify_alignment"));
428 justifyRightMenuItem.addActionListener(new ActionListener()
431 public void actionPerformed(ActionEvent e)
433 justifyRightMenuItem_actionPerformed(e);
436 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
437 viewBoxesMenuItem.setState(true);
438 viewBoxesMenuItem.addActionListener(new ActionListener()
441 public void actionPerformed(ActionEvent e)
443 viewBoxesMenuItem_actionPerformed(e);
446 viewTextMenuItem.setText(MessageManager.getString("action.text"));
447 viewTextMenuItem.setState(true);
448 viewTextMenuItem.addActionListener(new ActionListener()
451 public void actionPerformed(ActionEvent e)
453 viewTextMenuItem_actionPerformed(e);
456 showNonconservedMenuItem
457 .setText(MessageManager.getString("label.show_non_conserved"));
458 showNonconservedMenuItem.setState(false);
459 showNonconservedMenuItem.addActionListener(new ActionListener()
462 public void actionPerformed(ActionEvent e)
464 showUnconservedMenuItem_actionPerformed(e);
467 JMenuItem sortPairwiseMenuItem = new JMenuItem(
468 MessageManager.getString("action.by_pairwise_id"));
469 sortPairwiseMenuItem.addActionListener(new ActionListener()
472 public void actionPerformed(ActionEvent e)
474 sortPairwiseMenuItem_actionPerformed(e);
477 JMenuItem sortIDMenuItem = new JMenuItem(
478 MessageManager.getString("action.by_id"));
479 sortIDMenuItem.addActionListener(new ActionListener()
482 public void actionPerformed(ActionEvent e)
484 sortIDMenuItem_actionPerformed(e);
487 JMenuItem sortLengthMenuItem = new JMenuItem(
488 MessageManager.getString("action.by_length"));
489 sortLengthMenuItem.addActionListener(new ActionListener()
492 public void actionPerformed(ActionEvent e)
494 sortLengthMenuItem_actionPerformed(e);
497 JMenuItem sortGroupMenuItem = new JMenuItem(
498 MessageManager.getString("action.by_group"));
499 sortGroupMenuItem.addActionListener(new ActionListener()
502 public void actionPerformed(ActionEvent e)
504 sortGroupMenuItem_actionPerformed(e);
508 JMenuItem removeRedundancyMenuItem = new JMenuItem(
509 MessageManager.getString("action.remove_redundancy"));
510 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
511 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
512 al = new ActionListener()
515 public void actionPerformed(ActionEvent e)
517 removeRedundancyMenuItem_actionPerformed(e);
520 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
522 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
523 MessageManager.getString("action.pairwise_alignment"));
524 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
527 public void actionPerformed(ActionEvent e)
529 pairwiseAlignmentMenuItem_actionPerformed(e);
533 this.getContentPane().setLayout(new BorderLayout());
534 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
535 statusBar.setBackground(Color.white);
536 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
537 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
538 statusBar.setText(MessageManager.getString("label.status_bar"));
540 .setText(MessageManager.getString("label.out_to_textbox"));
542 annotationPanelMenuItem.setActionCommand("");
543 annotationPanelMenuItem
544 .setText(MessageManager.getString("label.show_annotations"));
545 annotationPanelMenuItem
546 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
547 annotationPanelMenuItem.addActionListener(new ActionListener()
550 public void actionPerformed(ActionEvent e)
552 annotationPanelMenuItem_actionPerformed(e);
555 showAllAlAnnotations.setText(
556 MessageManager.getString("label.show_all_al_annotations"));
557 final boolean isAnnotationPanelShown = annotationPanelMenuItem
559 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
560 showAllAlAnnotations.addActionListener(new ActionListener()
563 public void actionPerformed(ActionEvent e)
565 showAllAnnotations_actionPerformed(false, true);
568 hideAllAlAnnotations.setText(
569 MessageManager.getString("label.hide_all_al_annotations"));
570 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
571 hideAllAlAnnotations.addActionListener(new ActionListener()
574 public void actionPerformed(ActionEvent e)
576 hideAllAnnotations_actionPerformed(false, true);
579 showAllSeqAnnotations.setText(
580 MessageManager.getString("label.show_all_seq_annotations"));
581 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
582 showAllSeqAnnotations.addActionListener(new ActionListener()
585 public void actionPerformed(ActionEvent e)
587 showAllAnnotations_actionPerformed(true, false);
590 hideAllSeqAnnotations.setText(
591 MessageManager.getString("label.hide_all_seq_annotations"));
592 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
593 hideAllSeqAnnotations.addActionListener(new ActionListener()
596 public void actionPerformed(ActionEvent e)
598 hideAllAnnotations_actionPerformed(true, false);
601 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
602 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
603 SequenceAnnotationOrder.NONE.name()));
604 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
605 MessageManager.getString("label.sort_annotations_by_sequence"));
606 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
607 MessageManager.getString("label.sort_annotations_by_label"));
609 sortAnnBySequence.setSelected(
610 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
611 sortAnnBySequence.addActionListener(new ActionListener()
614 public void actionPerformed(ActionEvent e)
616 boolean newState = sortAnnBySequence.getState();
617 sortAnnByLabel.setSelected(false);
618 setAnnotationSortOrder(
619 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
620 : SequenceAnnotationOrder.NONE);
621 sortAnnotations_actionPerformed();
624 sortAnnByLabel.setSelected(
625 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
626 sortAnnByLabel.addActionListener(new ActionListener()
629 public void actionPerformed(ActionEvent e)
631 boolean newState = sortAnnByLabel.getState();
632 sortAnnBySequence.setSelected(false);
633 setAnnotationSortOrder(
634 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
635 : SequenceAnnotationOrder.NONE);
636 sortAnnotations_actionPerformed();
639 colourTextMenuItem = new JCheckBoxMenuItem(
640 MessageManager.getString("label.colour_text"));
641 colourTextMenuItem.addActionListener(new ActionListener()
644 public void actionPerformed(ActionEvent e)
646 colourTextMenuItem_actionPerformed(e);
650 JMenuItem htmlMenuItem = new JMenuItem(
651 MessageManager.getString("label.html"));
652 htmlMenuItem.addActionListener(new ActionListener()
655 public void actionPerformed(ActionEvent e)
657 htmlMenuItem_actionPerformed(e);
661 JMenuItem createBioJS = new JMenuItem(
662 MessageManager.getString("label.biojs_html_export"));
663 createBioJS.addActionListener(new java.awt.event.ActionListener()
666 public void actionPerformed(ActionEvent e)
668 bioJSMenuItem_actionPerformed(e);
672 JMenuItem overviewMenuItem = new JMenuItem(
673 MessageManager.getString("label.overview_window"));
674 overviewMenuItem.addActionListener(new ActionListener()
677 public void actionPerformed(ActionEvent e)
679 overviewMenuItem_actionPerformed(e);
683 undoMenuItem.setEnabled(false);
684 undoMenuItem.setText(MessageManager.getString("action.undo"));
685 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
686 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
687 al = new ActionListener()
690 public void actionPerformed(ActionEvent e)
692 undoMenuItem_actionPerformed(e);
695 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
697 redoMenuItem.setEnabled(false);
698 redoMenuItem.setText(MessageManager.getString("action.redo"));
699 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
700 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
701 al = new ActionListener()
704 public void actionPerformed(ActionEvent e)
706 redoMenuItem_actionPerformed(e);
709 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
711 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
712 wrapMenuItem.addActionListener(new ActionListener()
715 public void actionPerformed(ActionEvent e)
717 wrapMenuItem_actionPerformed(e);
721 JMenuItem printMenuItem = new JMenuItem(
722 MessageManager.getString("action.print"));
723 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
724 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
725 al = new ActionListener()
728 public void actionPerformed(ActionEvent e)
730 printMenuItem_actionPerformed(e);
733 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
736 .setText(MessageManager.getString("action.show_gaps"));
737 renderGapsMenuItem.setState(true);
738 renderGapsMenuItem.addActionListener(new ActionListener()
741 public void actionPerformed(ActionEvent e)
743 renderGapsMenuItem_actionPerformed(e);
747 JMenuItem findMenuItem = new JMenuItem(
748 MessageManager.getString("action.find"));
749 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
750 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
751 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
752 MessageManager.getString("label.find_tip")));
753 al = new ActionListener()
756 public void actionPerformed(ActionEvent e)
758 findMenuItem_actionPerformed(e);
761 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
763 showSeqFeatures.setText(
764 MessageManager.getString("label.show_sequence_features"));
765 showSeqFeatures.addActionListener(new ActionListener()
768 public void actionPerformed(ActionEvent actionEvent)
770 showSeqFeatures_actionPerformed(actionEvent);
774 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
775 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
776 * void actionPerformed(ActionEvent actionEvent) {
777 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
780 .setText(MessageManager.getString("label.show_database_refs"));
781 showDbRefsMenuitem.addActionListener(new ActionListener()
785 public void actionPerformed(ActionEvent e)
787 showDbRefs_actionPerformed(e);
791 showNpFeatsMenuitem.setText(
792 MessageManager.getString("label.show_non_positional_features"));
793 showNpFeatsMenuitem.addActionListener(new ActionListener()
797 public void actionPerformed(ActionEvent e)
799 showNpFeats_actionPerformed(e);
803 showGroupConservation
804 .setText(MessageManager.getString("label.group_conservation"));
805 showGroupConservation.addActionListener(new ActionListener()
809 public void actionPerformed(ActionEvent e)
811 showGroupConservation_actionPerformed(e);
817 .setText(MessageManager.getString("label.group_consensus"));
818 showGroupConsensus.addActionListener(new ActionListener()
822 public void actionPerformed(ActionEvent e)
824 showGroupConsensus_actionPerformed(e);
828 showConsensusHistogram.setText(
829 MessageManager.getString("label.show_consensus_histogram"));
830 showConsensusHistogram.addActionListener(new ActionListener()
834 public void actionPerformed(ActionEvent e)
836 showConsensusHistogram_actionPerformed(e);
841 .setText(MessageManager.getString("label.show_consensus_logo"));
842 showSequenceLogo.addActionListener(new ActionListener()
846 public void actionPerformed(ActionEvent e)
848 showSequenceLogo_actionPerformed(e);
852 normaliseSequenceLogo
853 .setText(MessageManager.getString("label.norm_consensus_logo"));
854 normaliseSequenceLogo.addActionListener(new ActionListener()
858 public void actionPerformed(ActionEvent e)
860 normaliseSequenceLogo_actionPerformed(e);
864 applyAutoAnnotationSettings
865 .setText(MessageManager.getString("label.apply_all_groups"));
866 applyAutoAnnotationSettings.setState(false);
867 applyAutoAnnotationSettings.setVisible(true);
868 applyAutoAnnotationSettings.addActionListener(new ActionListener()
871 public void actionPerformed(ActionEvent e)
873 applyAutoAnnotationSettings_actionPerformed(e);
877 ButtonGroup buttonGroup = new ButtonGroup();
878 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
879 MessageManager.getString("label.show_first"));
880 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
881 MessageManager.getString("label.show_last"));
882 buttonGroup.add(showAutoFirst);
883 buttonGroup.add(showAutoLast);
884 final boolean autoFirst = Cache
885 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
886 showAutoFirst.setSelected(autoFirst);
887 setShowAutoCalculatedAbove(autoFirst);
888 showAutoFirst.addActionListener(new ActionListener()
891 public void actionPerformed(ActionEvent e)
893 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
894 sortAnnotations_actionPerformed();
897 showAutoLast.setSelected(!showAutoFirst.isSelected());
898 showAutoLast.addActionListener(new ActionListener()
901 public void actionPerformed(ActionEvent e)
903 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
904 sortAnnotations_actionPerformed();
908 JMenuItem deleteGroups = new JMenuItem(
909 MessageManager.getString("action.undefine_groups"));
910 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
911 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
912 al = new ActionListener()
915 public void actionPerformed(ActionEvent e)
917 deleteGroups_actionPerformed(e);
920 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
922 JMenuItem annotationColumn = new JMenuItem(
923 MessageManager.getString("action.select_by_annotation"));
924 annotationColumn.addActionListener(new ActionListener()
927 public void actionPerformed(ActionEvent e)
929 annotationColumn_actionPerformed(e);
933 JMenuItem createGroup = new JMenuItem(
934 MessageManager.getString("action.create_group"));
935 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
936 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
937 al = new ActionListener()
940 public void actionPerformed(ActionEvent e)
942 createGroup_actionPerformed(e);
945 addMenuActionAndAccelerator(keyStroke, createGroup, al);
947 JMenuItem unGroup = new JMenuItem(
948 MessageManager.getString("action.remove_group"));
949 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
950 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
951 | KeyEvent.SHIFT_MASK,
953 al = new ActionListener()
956 public void actionPerformed(ActionEvent e)
958 unGroup_actionPerformed(e);
961 addMenuActionAndAccelerator(keyStroke, unGroup, al);
963 copy.setText(MessageManager.getString("action.copy"));
964 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
965 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
967 al = new ActionListener()
970 public void actionPerformed(ActionEvent e)
972 copy_actionPerformed(e);
975 addMenuActionAndAccelerator(keyStroke, copy, al);
977 cut.setText(MessageManager.getString("action.cut"));
978 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
979 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
980 al = new ActionListener()
983 public void actionPerformed(ActionEvent e)
985 cut_actionPerformed(e);
988 addMenuActionAndAccelerator(keyStroke, cut, al);
990 JMenuItem delete = new JMenuItem(
991 MessageManager.getString("action.delete"));
992 delete.addActionListener(new ActionListener()
995 public void actionPerformed(ActionEvent e)
997 delete_actionPerformed(e);
1001 pasteMenu.setText(MessageManager.getString("action.paste"));
1002 JMenuItem pasteNew = new JMenuItem(
1003 MessageManager.getString("label.to_new_alignment"));
1004 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1005 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1006 | KeyEvent.SHIFT_MASK,
1008 al = new ActionListener()
1011 public void actionPerformed(ActionEvent e)
1013 pasteNew_actionPerformed(e);
1016 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1018 JMenuItem pasteThis = new JMenuItem(
1019 MessageManager.getString("label.to_this_alignment"));
1020 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1021 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1022 al = new ActionListener()
1025 public void actionPerformed(ActionEvent e)
1027 pasteThis_actionPerformed(e);
1030 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1032 JMenuItem createPNG = new JMenuItem("PNG");
1033 createPNG.addActionListener(new ActionListener()
1036 public void actionPerformed(ActionEvent e)
1041 createPNG.setActionCommand(
1042 MessageManager.getString("label.save_png_image"));
1044 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1045 font.addActionListener(new ActionListener()
1048 public void actionPerformed(ActionEvent e)
1050 font_actionPerformed(e);
1054 MessageManager.getString("label.show_sequence_limits"));
1055 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1056 seqLimits.addActionListener(new ActionListener()
1059 public void actionPerformed(ActionEvent e)
1061 seqLimit_actionPerformed(e);
1064 JMenuItem epsFile = new JMenuItem("EPS");
1065 epsFile.addActionListener(new ActionListener()
1068 public void actionPerformed(ActionEvent e)
1074 JMenuItem createSVG = new JMenuItem("SVG");
1075 createSVG.addActionListener(new ActionListener()
1078 public void actionPerformed(ActionEvent e)
1084 JMenuItem loadTreeMenuItem = new JMenuItem(
1085 MessageManager.getString("label.load_associated_tree"));
1086 loadTreeMenuItem.setActionCommand(
1087 MessageManager.getString("label.load_tree_for_sequence_set"));
1088 loadTreeMenuItem.addActionListener(new ActionListener()
1091 public void actionPerformed(ActionEvent e)
1093 loadTreeMenuItem_actionPerformed(e);
1097 scaleAbove.setVisible(false);
1098 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1099 scaleAbove.addActionListener(new ActionListener()
1102 public void actionPerformed(ActionEvent e)
1104 scaleAbove_actionPerformed(e);
1107 scaleLeft.setVisible(false);
1108 scaleLeft.setSelected(true);
1109 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1110 scaleLeft.addActionListener(new ActionListener()
1113 public void actionPerformed(ActionEvent e)
1115 scaleLeft_actionPerformed(e);
1118 scaleRight.setVisible(false);
1119 scaleRight.setSelected(true);
1120 scaleRight.setText(MessageManager.getString("action.scale_right"));
1121 scaleRight.addActionListener(new ActionListener()
1124 public void actionPerformed(ActionEvent e)
1126 scaleRight_actionPerformed(e);
1129 centreColumnLabelsMenuItem.setVisible(true);
1130 centreColumnLabelsMenuItem.setState(false);
1131 centreColumnLabelsMenuItem.setText(
1132 MessageManager.getString("label.centre_column_labels"));
1133 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1136 public void actionPerformed(ActionEvent e)
1138 centreColumnLabels_actionPerformed(e);
1141 followHighlightMenuItem.setVisible(true);
1142 followHighlightMenuItem.setState(true);
1143 followHighlightMenuItem
1144 .setText(MessageManager.getString("label.automatic_scrolling"));
1145 followHighlightMenuItem.addActionListener(new ActionListener()
1149 public void actionPerformed(ActionEvent e)
1151 followHighlight_actionPerformed();
1157 .setText(MessageManager.getString("action.by_tree_order"));
1158 sort.setText(MessageManager.getString("action.sort"));
1159 sort.addMenuListener(new MenuListener()
1162 public void menuSelected(MenuEvent e)
1164 buildTreeSortMenu();
1168 public void menuDeselected(MenuEvent e)
1173 public void menuCanceled(MenuEvent e)
1178 .setText(MessageManager.getString("label.sort_by_score"));
1179 sort.add(sortByAnnotScore);
1180 sort.addMenuListener(new javax.swing.event.MenuListener()
1184 public void menuCanceled(MenuEvent e)
1189 public void menuDeselected(MenuEvent e)
1194 public void menuSelected(MenuEvent e)
1196 buildSortByAnnotationScoresMenu();
1199 sortByAnnotScore.setVisible(false);
1202 .setText(MessageManager.getString("action.calculate_tree_pca"));
1204 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1206 .setState(jalview.bin.Cache.getDefault("PAD_GAPS", false));
1207 padGapsMenuitem.addActionListener(new ActionListener()
1210 public void actionPerformed(ActionEvent e)
1212 padGapsMenuitem_actionPerformed(e);
1215 JMenuItem vamsasStore = new JMenuItem(
1216 MessageManager.getString("label.vamsas_store"));
1217 vamsasStore.setVisible(false);
1218 vamsasStore.addActionListener(new ActionListener()
1221 public void actionPerformed(ActionEvent e)
1223 vamsasStore_actionPerformed(e);
1227 .setText(MessageManager.getString("label.translate_cDNA"));
1228 showTranslation.addActionListener(new ActionListener()
1231 public void actionPerformed(ActionEvent e)
1233 showTranslation_actionPerformed(e);
1236 showReverse.setText(MessageManager.getString("label.reverse"));
1237 showReverse.addActionListener(new ActionListener()
1240 public void actionPerformed(ActionEvent e)
1242 showReverse_actionPerformed(false);
1245 showReverseComplement
1246 .setText(MessageManager.getString("label.reverse_complement"));
1247 showReverseComplement.addActionListener(new ActionListener()
1250 public void actionPerformed(ActionEvent e)
1252 showReverse_actionPerformed(true);
1256 JMenuItem extractScores = new JMenuItem(
1257 MessageManager.getString("label.extract_scores"));
1258 extractScores.addActionListener(new ActionListener()
1261 public void actionPerformed(ActionEvent e)
1263 extractScores_actionPerformed(e);
1266 extractScores.setVisible(true);
1267 // JBPNote: TODO: make gui for regex based score extraction
1269 // for show products actions see AlignFrame.canShowProducts
1270 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1272 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1273 runGroovy.setToolTipText(
1274 MessageManager.getString("label.run_groovy_tip"));
1275 runGroovy.addActionListener(new ActionListener()
1278 public void actionPerformed(ActionEvent e)
1280 runGroovy_actionPerformed();
1284 openFeatureSettings = new JMenuItem(
1285 MessageManager.getString("action.feature_settings"));
1286 openFeatureSettings.addActionListener(new ActionListener()
1289 public void actionPerformed(ActionEvent e)
1291 featureSettings_actionPerformed(e);
1296 * add sub-menu of database we can fetch from
1298 JMenuItem fetchSequence = new JMenuItem(
1299 MessageManager.getString("label.fetch_sequences"));
1300 fetchSequence.addActionListener(new ActionListener()
1303 public void actionPerformed(ActionEvent e)
1305 fetchSequence_actionPerformed();
1309 JMenuItem associatedData = new JMenuItem(
1310 MessageManager.getString("label.load_features_annotations"));
1311 associatedData.addActionListener(new ActionListener()
1314 public void actionPerformed(ActionEvent e)
1316 associatedData_actionPerformed(e);
1319 loadVcf = new JMenuItem(MessageManager.getString("label.load_vcf_file"));
1320 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1321 loadVcf.addActionListener(new ActionListener()
1324 public void actionPerformed(ActionEvent e)
1326 loadVcf_actionPerformed();
1329 autoCalculate.setText(
1330 MessageManager.getString("label.autocalculate_consensus"));
1331 autoCalculate.setState(
1332 jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1333 autoCalculate.addActionListener(new ActionListener()
1336 public void actionPerformed(ActionEvent e)
1338 autoCalculate_actionPerformed(e);
1342 MessageManager.getString("label.sort_alignment_new_tree"));
1343 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1344 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1346 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1347 sortByTree.addActionListener(new ActionListener()
1350 public void actionPerformed(ActionEvent e)
1352 sortByTreeOption_actionPerformed(e);
1356 listenToViewSelections.setText(
1357 MessageManager.getString("label.listen_for_selections"));
1358 listenToViewSelections
1359 .setToolTipText("<html>" + MessageManager.getString(
1360 "label.selections_mirror_selections_made_same_sequences_other_views"));
1361 listenToViewSelections.setState(false);
1362 listenToViewSelections.addActionListener(new ActionListener()
1365 public void actionPerformed(ActionEvent e)
1367 listenToViewSelections_actionPerformed(e);
1371 JMenu addSequenceMenu = new JMenu(
1372 MessageManager.getString("label.add_sequences"));
1373 JMenuItem addFromFile = new JMenuItem(
1374 MessageManager.getString("label.from_file"));
1375 addFromFile.addActionListener(new ActionListener()
1378 public void actionPerformed(ActionEvent e)
1380 addFromFile_actionPerformed(e);
1383 JMenuItem addFromText = new JMenuItem(
1384 MessageManager.getString("label.from_textbox"));
1385 addFromText.addActionListener(new ActionListener()
1388 public void actionPerformed(ActionEvent e)
1390 addFromText_actionPerformed(e);
1393 JMenuItem addFromURL = new JMenuItem(
1394 MessageManager.getString("label.from_url"));
1395 addFromURL.addActionListener(new ActionListener()
1398 public void actionPerformed(ActionEvent e)
1400 addFromURL_actionPerformed(e);
1403 JMenuItem exportFeatures = new JMenuItem(
1404 MessageManager.getString("label.export_features"));
1405 exportFeatures.addActionListener(new ActionListener()
1408 public void actionPerformed(ActionEvent e)
1410 exportFeatures_actionPerformed(e);
1413 JMenuItem exportAnnotations = new JMenuItem(
1414 MessageManager.getString("label.export_annotations"));
1415 exportAnnotations.addActionListener(new ActionListener()
1418 public void actionPerformed(ActionEvent e)
1420 exportAnnotations_actionPerformed(e);
1423 statusPanel.setLayout(new GridLayout());
1424 JMenuItem showAllSeqs = new JMenuItem(
1425 MessageManager.getString("label.all_sequences"));
1426 showAllSeqs.setToolTipText(
1427 MessageManager.getString("label.toggle_sequence_visibility"));
1428 showAllSeqs.addActionListener(new ActionListener()
1431 public void actionPerformed(ActionEvent e)
1433 showAllSeqs_actionPerformed(e);
1436 JMenuItem showAllColumns = new JMenuItem(
1437 MessageManager.getString("label.all_columns"));
1438 showAllColumns.setToolTipText(
1439 MessageManager.getString("label.toggle_columns_visibility"));
1440 showAllColumns.addActionListener(new ActionListener()
1443 public void actionPerformed(ActionEvent e)
1445 showAllColumns_actionPerformed(e);
1448 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1449 JMenuItem hideSelSequences = new JMenuItem(
1450 MessageManager.getString("label.selected_sequences"));
1451 hideSelSequences.setToolTipText(
1452 MessageManager.getString("label.toggle_sequence_visibility"));
1453 hideSelSequences.addActionListener(new ActionListener()
1456 public void actionPerformed(ActionEvent e)
1458 hideSelSequences_actionPerformed(e);
1461 JMenuItem hideSelColumns = new JMenuItem(
1462 MessageManager.getString("label.selected_columns"));
1463 hideSelColumns.setToolTipText(
1464 MessageManager.getString("label.toggle_columns_visibility"));
1465 hideSelColumns.addActionListener(new ActionListener()
1468 public void actionPerformed(ActionEvent e)
1470 hideSelColumns_actionPerformed(e);
1473 JMenuItem hideAllSelection = new JMenuItem(
1474 MessageManager.getString("label.selected_region"));
1475 hideAllSelection.addActionListener(new ActionListener()
1478 public void actionPerformed(ActionEvent e)
1480 hideAllSelection_actionPerformed(e);
1483 // TODO: should be hidden if no selection exists.
1484 JMenuItem hideAllButSelection = new JMenuItem(
1485 MessageManager.getString("label.all_but_selected_region"));
1486 hideAllButSelection.addActionListener(new ActionListener()
1489 public void actionPerformed(ActionEvent e)
1491 hideAllButSelection_actionPerformed(e);
1494 JMenuItem showAllhidden = new JMenuItem(
1495 MessageManager.getString("label.all_sequences_columns"));
1496 showAllhidden.setToolTipText(MessageManager
1497 .getString("label.toggles_visibility_hidden_selected_regions"));
1498 showAllhidden.addActionListener(new ActionListener()
1501 public void actionPerformed(ActionEvent e)
1503 showAllhidden_actionPerformed(e);
1506 hiddenMarkers.setText(
1507 MessageManager.getString("action.show_hidden_markers"));
1508 hiddenMarkers.addActionListener(new ActionListener()
1511 public void actionPerformed(ActionEvent e)
1513 hiddenMarkers_actionPerformed(e);
1517 JMenuItem invertColSel = new JMenuItem(
1518 MessageManager.getString("action.invert_column_selection"));
1519 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1520 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1521 | KeyEvent.ALT_MASK,
1523 al = new ActionListener()
1526 public void actionPerformed(ActionEvent e)
1528 invertColSel_actionPerformed(e);
1531 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1533 showComplementMenuItem.setVisible(false);
1534 showComplementMenuItem.addActionListener(new ActionListener()
1537 public void actionPerformed(ActionEvent e)
1539 showComplement_actionPerformed(showComplementMenuItem.getState());
1543 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1546 public void stateChanged(ChangeEvent evt)
1548 JTabbedPane pane = (JTabbedPane) evt.getSource();
1549 int sel = pane.getSelectedIndex();
1550 tabSelectionChanged(sel);
1553 tabbedPane.addMouseListener(new MouseAdapter()
1556 public void mousePressed(MouseEvent e)
1558 if (e.isPopupTrigger()) // Mac
1560 tabbedPane_mousePressed(e);
1565 public void mouseReleased(MouseEvent e)
1567 if (e.isPopupTrigger()) // Windows
1569 tabbedPane_mousePressed(e);
1573 tabbedPane.addFocusListener(new FocusAdapter()
1576 public void focusGained(FocusEvent e)
1578 tabbedPane_focusGained(e);
1582 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1583 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1584 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1585 al = new ActionListener()
1588 public void actionPerformed(ActionEvent e)
1590 save_actionPerformed(e);
1593 addMenuActionAndAccelerator(keyStroke, save, al);
1595 reload.setEnabled(false);
1596 reload.setText(MessageManager.getString("action.reload"));
1597 reload.addActionListener(new ActionListener()
1600 public void actionPerformed(ActionEvent e)
1602 reload_actionPerformed(e);
1606 JMenuItem newView = new JMenuItem(
1607 MessageManager.getString("action.new_view"));
1608 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1609 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1610 al = new ActionListener()
1613 public void actionPerformed(ActionEvent e)
1615 newView_actionPerformed(e);
1618 addMenuActionAndAccelerator(keyStroke, newView, al);
1620 tabbedPane.setToolTipText("<html><i>"
1621 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1624 formatMenu.setText(MessageManager.getString("action.format"));
1625 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1627 idRightAlign.setText(
1628 MessageManager.getString("label.right_align_sequence_id"));
1629 idRightAlign.addActionListener(new ActionListener()
1632 public void actionPerformed(ActionEvent e)
1634 idRightAlign_actionPerformed(e);
1638 gatherViews.setEnabled(false);
1639 gatherViews.setText(MessageManager.getString("action.gather_views"));
1640 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1641 al = new ActionListener()
1644 public void actionPerformed(ActionEvent e)
1646 gatherViews_actionPerformed(e);
1649 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1651 expandViews.setEnabled(false);
1652 expandViews.setText(MessageManager.getString("action.expand_views"));
1653 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1654 al = new ActionListener()
1657 public void actionPerformed(ActionEvent e)
1659 expandViews_actionPerformed(e);
1662 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1664 JMenuItem pageSetup = new JMenuItem(
1665 MessageManager.getString("action.page_setup"));
1666 pageSetup.addActionListener(new ActionListener()
1669 public void actionPerformed(ActionEvent e)
1671 pageSetup_actionPerformed(e);
1674 JMenuItem alignmentProperties = new JMenuItem(
1675 MessageManager.getString("label.alignment_props"));
1676 alignmentProperties.addActionListener(new ActionListener()
1679 public void actionPerformed(ActionEvent actionEvent)
1681 alignmentProperties();
1684 JMenuItem selectHighlighted = new JMenuItem(
1685 MessageManager.getString("action.select_highlighted_columns"));
1686 selectHighlighted.setToolTipText(
1687 MessageManager.getString("tooltip.select_highlighted_columns"));
1688 al = new ActionListener()
1691 public void actionPerformed(ActionEvent actionEvent)
1693 selectHighlightedColumns_actionPerformed(actionEvent);
1696 selectHighlighted.addActionListener(al);
1697 JMenu tooltipSettingsMenu = new JMenu(
1698 MessageManager.getString("label.sequence_id_tooltip"));
1699 JMenu autoAnnMenu = new JMenu(
1700 MessageManager.getString("label.autocalculated_annotation"));
1702 JMenu exportImageMenu = new JMenu(
1703 MessageManager.getString("label.export_image"));
1704 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1705 alignFrameMenuBar.add(fileMenu);
1706 alignFrameMenuBar.add(editMenu);
1707 alignFrameMenuBar.add(selectMenu);
1708 alignFrameMenuBar.add(viewMenu);
1709 alignFrameMenuBar.add(annotationsMenu);
1710 alignFrameMenuBar.add(formatMenu);
1711 alignFrameMenuBar.add(colourMenu);
1712 alignFrameMenuBar.add(calculateMenu);
1713 if (!Platform.isJS())
1715 alignFrameMenuBar.add(webService);
1718 fileMenu.add(fetchSequence);
1719 fileMenu.add(addSequenceMenu);
1720 fileMenu.add(reload);
1721 fileMenu.addSeparator();
1722 fileMenu.add(vamsasStore);
1724 fileMenu.add(saveAs);
1725 fileMenu.add(outputTextboxMenu);
1726 fileMenu.add(pageSetup);
1727 fileMenu.add(printMenuItem);
1728 fileMenu.addSeparator();
1729 fileMenu.add(exportImageMenu);
1730 fileMenu.add(exportFeatures);
1731 fileMenu.add(exportAnnotations);
1732 fileMenu.add(loadTreeMenuItem);
1733 fileMenu.add(associatedData);
1734 if (!Platform.isJS())
1736 fileMenu.add(loadVcf);
1738 fileMenu.addSeparator();
1739 fileMenu.add(closeMenuItem);
1741 pasteMenu.add(pasteNew);
1742 pasteMenu.add(pasteThis);
1743 editMenu.add(undoMenuItem);
1744 editMenu.add(redoMenuItem);
1747 editMenu.add(pasteMenu);
1748 editMenu.add(delete);
1749 editMenu.addSeparator();
1750 editMenu.add(remove2LeftMenuItem);
1751 editMenu.add(remove2RightMenuItem);
1752 editMenu.add(removeGappedColumnMenuItem);
1753 editMenu.add(removeAllGapsMenuItem);
1754 editMenu.add(removeRedundancyMenuItem);
1755 editMenu.addSeparator();
1756 // dont add these yet in the CVS build - they cannot be undone!
1757 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1758 // editMenu.add(justifyLeftMenuItem);
1759 // editMenu.add(justifyRightMenuItem);
1760 // editMenu.addSeparator();
1761 editMenu.add(padGapsMenuitem);
1763 showMenu.add(showAllColumns);
1764 showMenu.add(showAllSeqs);
1765 showMenu.add(showAllhidden);
1766 hideMenu.add(hideSelColumns);
1767 hideMenu.add(hideSelSequences);
1768 hideMenu.add(hideAllSelection);
1769 hideMenu.add(hideAllButSelection);
1770 viewMenu.add(newView);
1771 viewMenu.add(expandViews);
1772 viewMenu.add(gatherViews);
1773 viewMenu.addSeparator();
1774 viewMenu.add(showMenu);
1775 viewMenu.add(hideMenu);
1776 viewMenu.add(showComplementMenuItem);
1777 viewMenu.addSeparator();
1778 viewMenu.add(followHighlightMenuItem);
1779 viewMenu.addSeparator();
1780 viewMenu.add(showSeqFeatures);
1781 // viewMenu.add(showSeqFeaturesHeight);
1782 viewMenu.add(openFeatureSettings);
1783 tooltipSettingsMenu.add(showDbRefsMenuitem);
1784 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1785 viewMenu.add(tooltipSettingsMenu);
1786 viewMenu.addSeparator();
1787 viewMenu.add(alignmentProperties);
1788 viewMenu.addSeparator();
1789 viewMenu.add(overviewMenuItem);
1791 annotationsMenu.add(annotationPanelMenuItem);
1792 annotationsMenu.addSeparator();
1793 annotationsMenu.add(showAllAlAnnotations);
1794 annotationsMenu.add(hideAllAlAnnotations);
1795 annotationsMenu.addSeparator();
1796 annotationsMenu.add(showAllSeqAnnotations);
1797 annotationsMenu.add(hideAllSeqAnnotations);
1798 annotationsMenu.add(sortAnnBySequence);
1799 annotationsMenu.add(sortAnnByLabel);
1800 annotationsMenu.addSeparator();
1801 autoAnnMenu.add(showAutoFirst);
1802 autoAnnMenu.add(showAutoLast);
1803 autoAnnMenu.addSeparator();
1804 autoAnnMenu.add(applyAutoAnnotationSettings);
1805 autoAnnMenu.add(showConsensusHistogram);
1806 autoAnnMenu.add(showSequenceLogo);
1807 autoAnnMenu.add(normaliseSequenceLogo);
1808 autoAnnMenu.addSeparator();
1809 autoAnnMenu.add(showGroupConservation);
1810 autoAnnMenu.add(showGroupConsensus);
1811 annotationsMenu.add(autoAnnMenu);
1813 sort.add(sortIDMenuItem);
1814 sort.add(sortLengthMenuItem);
1815 sort.add(sortGroupMenuItem);
1816 sort.add(sortPairwiseMenuItem);
1817 sort.add(sortByTreeMenu);
1818 calculateMenu.add(sort);
1819 calculateMenu.add(calculateTree);
1820 calculateMenu.addSeparator();
1821 calculateMenu.add(pairwiseAlignmentMenuItem);
1822 calculateMenu.addSeparator();
1823 calculateMenu.add(showTranslation);
1824 calculateMenu.add(showReverse);
1825 calculateMenu.add(showReverseComplement);
1826 calculateMenu.add(showProducts);
1827 calculateMenu.add(autoCalculate);
1828 calculateMenu.add(sortByTree);
1829 calculateMenu.addSeparator();
1830 calculateMenu.add(expandAlignment);
1831 calculateMenu.add(extractScores);
1832 if (!Platform.isJS())
1834 calculateMenu.addSeparator();
1835 calculateMenu.add(runGroovy);
1838 webServiceNoServices = new JMenuItem(
1839 MessageManager.getString("label.no_services"));
1840 webService.add(webServiceNoServices);
1841 if (!Platform.isJS())
1843 exportImageMenu.add(htmlMenuItem);
1845 exportImageMenu.add(epsFile);
1846 exportImageMenu.add(createPNG);
1847 if (!Platform.isJS())
1849 exportImageMenu.add(createBioJS);
1850 exportImageMenu.add(createSVG);
1852 addSequenceMenu.add(addFromFile);
1853 addSequenceMenu.add(addFromText);
1854 addSequenceMenu.add(addFromURL);
1855 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1856 statusPanel.add(statusBar, null);
1857 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1859 formatMenu.add(font);
1860 formatMenu.addSeparator();
1861 formatMenu.add(wrapMenuItem);
1862 formatMenu.add(scaleAbove);
1863 formatMenu.add(scaleLeft);
1864 formatMenu.add(scaleRight);
1865 formatMenu.add(seqLimits);
1866 formatMenu.add(idRightAlign);
1867 formatMenu.add(hiddenMarkers);
1868 formatMenu.add(viewBoxesMenuItem);
1869 formatMenu.add(viewTextMenuItem);
1870 formatMenu.add(colourTextMenuItem);
1871 formatMenu.add(renderGapsMenuItem);
1872 formatMenu.add(centreColumnLabelsMenuItem);
1873 formatMenu.add(showNonconservedMenuItem);
1874 selectMenu.add(findMenuItem);
1875 selectMenu.addSeparator();
1876 selectMenu.add(selectAllSequenceMenuItem);
1877 selectMenu.add(deselectAllSequenceMenuItem);
1878 selectMenu.add(invertSequenceMenuItem);
1879 selectMenu.add(invertColSel);
1880 selectMenu.add(createGroup);
1881 selectMenu.add(unGroup);
1882 selectMenu.add(grpsFromSelection);
1883 selectMenu.add(deleteGroups);
1884 selectMenu.add(annotationColumn);
1885 selectMenu.add(selectHighlighted);
1886 // TODO - determine if the listenToViewSelections button is needed : see bug
1888 // selectMenu.addSeparator();
1889 // selectMenu.add(listenToViewSelections);
1892 protected void loadVcf_actionPerformed()
1897 * Constructs the entries on the Colour menu (but does not add them to the
1900 protected void initColourMenu()
1902 applyToAllGroups = new JCheckBoxMenuItem(
1903 MessageManager.getString("label.apply_colour_to_all_groups"));
1904 applyToAllGroups.addActionListener(new ActionListener()
1907 public void actionPerformed(ActionEvent e)
1909 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1913 textColour = new JMenuItem(
1914 MessageManager.getString("label.text_colour"));
1915 textColour.addActionListener(new ActionListener()
1918 public void actionPerformed(ActionEvent e)
1920 textColour_actionPerformed();
1924 conservationMenuItem = new JCheckBoxMenuItem(
1925 MessageManager.getString("action.by_conservation"));
1926 conservationMenuItem.addActionListener(new ActionListener()
1929 public void actionPerformed(ActionEvent e)
1931 conservationMenuItem_actionPerformed(
1932 conservationMenuItem.isSelected());
1936 abovePIDThreshold = new JCheckBoxMenuItem(
1937 MessageManager.getString("label.above_identity_threshold"));
1938 abovePIDThreshold.addActionListener(new ActionListener()
1941 public void actionPerformed(ActionEvent e)
1943 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
1946 modifyPID = new JMenuItem(
1947 MessageManager.getString("label.modify_identity_threshold"));
1948 modifyPID.addActionListener(new ActionListener()
1951 public void actionPerformed(ActionEvent e)
1953 modifyPID_actionPerformed();
1956 modifyConservation = new JMenuItem(MessageManager
1957 .getString("label.modify_conservation_threshold"));
1958 modifyConservation.addActionListener(new ActionListener()
1961 public void actionPerformed(ActionEvent e)
1963 modifyConservation_actionPerformed();
1967 annotationColour = new JMenuItem(
1968 MessageManager.getString("action.by_annotation"));
1969 annotationColour.addActionListener(new ActionListener()
1972 public void actionPerformed(ActionEvent e)
1974 annotationColour_actionPerformed();
1979 protected void selectHighlightedColumns_actionPerformed(
1980 ActionEvent actionEvent)
1982 // TODO Auto-generated method stub
1987 * Generate the reverse sequence (or reverse complement if the flag is true)
1988 * and add it to the alignment
1992 protected void showReverse_actionPerformed(boolean complement)
1997 * Try to run script in a Groovy console, having first ensured that this
1998 * alignframe is set as currentAlignFrame in Desktop
2000 protected void runGroovy_actionPerformed()
2006 * Adds the given action listener and key accelerator to the given menu item.
2007 * Also saves in a lookup table to support lookup of action by key stroke.
2011 * @param actionListener
2013 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2014 JMenuItem menuItem, ActionListener actionListener)
2016 menuItem.setAccelerator(keyStroke);
2017 accelerators.put(keyStroke, menuItem);
2018 menuItem.addActionListener(actionListener);
2022 * Action on clicking sort annotations by type.
2026 protected void sortAnnotations_actionPerformed()
2031 * Action on clicking Show all annotations.
2033 * @param forSequences
2034 * update sequence-related annotations
2035 * @param forAlignment
2036 * update non-sequence-related annotations
2038 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2039 boolean forAlignment)
2041 setAnnotationsVisibility(true, forSequences, forAlignment);
2045 * Action on clicking Hide all annotations.
2047 * @param forSequences
2048 * update sequence-related annotations
2049 * @param forAlignment
2050 * update non-sequence-related annotations
2052 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2053 boolean forAlignment)
2055 setAnnotationsVisibility(false, forSequences, forAlignment);
2059 * Set the visibility of annotations to true or false. Can act on
2060 * sequence-related annotations, or alignment-related, or both.
2063 * @param forSequences
2064 * update sequence-related annotations
2065 * @param forAlignment
2066 * update non-sequence-related annotations
2068 protected void setAnnotationsVisibility(boolean visible,
2069 boolean forSequences, boolean forAlignment)
2074 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2076 // TODO Auto-generated method stub
2080 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2082 // TODO Auto-generated method stub
2086 protected void showAllhidden_actionPerformed(ActionEvent e)
2088 // TODO Auto-generated method stub
2092 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2094 // TODO Auto-generated method stub
2098 protected void hideAllSelection_actionPerformed(ActionEvent e)
2100 // TODO Auto-generated method stub
2104 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2106 // TODO Auto-generated method stub
2110 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2112 // TODO Auto-generated method stub
2116 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2118 // TODO Auto-generated method stub
2122 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2124 // TODO Auto-generated method stub
2128 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2130 // TODO Auto-generated method stub
2134 protected void showGroupConservation_actionPerformed(ActionEvent e)
2136 // TODO Auto-generated method stub
2140 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2142 // TODO Auto-generated method stub
2146 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2148 // TODO Auto-generated method stub
2152 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2154 // TODO Auto-generated method stub
2158 protected void followHighlight_actionPerformed()
2160 // TODO Auto-generated method stub
2164 protected void showNpFeats_actionPerformed(ActionEvent e)
2166 // TODO Auto-generated method stub
2170 protected void showDbRefs_actionPerformed(ActionEvent e)
2172 // TODO Auto-generated method stub
2176 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2180 protected void buildSortByAnnotationScoresMenu()
2184 protected void extractScores_actionPerformed(ActionEvent e)
2188 protected void outputText_actionPerformed(String formatName)
2192 public void addFromFile_actionPerformed(ActionEvent e)
2197 public void addFromText_actionPerformed(ActionEvent e)
2202 public void addFromURL_actionPerformed(ActionEvent e)
2207 public void exportFeatures_actionPerformed(ActionEvent e)
2212 public void exportAnnotations_actionPerformed(ActionEvent e)
2217 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2221 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2226 protected void closeMenuItem_actionPerformed(boolean b)
2230 protected void redoMenuItem_actionPerformed(ActionEvent e)
2234 protected void undoMenuItem_actionPerformed(ActionEvent e)
2238 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2242 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2246 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2250 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2254 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2258 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2262 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2266 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2270 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2274 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2278 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2282 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2286 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2290 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2294 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2298 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2302 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2306 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2310 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2314 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2318 protected void conservationMenuItem_actionPerformed(boolean selected)
2322 protected void printMenuItem_actionPerformed(ActionEvent e)
2326 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2330 protected void findMenuItem_actionPerformed(ActionEvent e)
2334 protected void abovePIDThreshold_actionPerformed(boolean selected)
2338 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2342 protected void deleteGroups_actionPerformed(ActionEvent e)
2346 protected void createGroup_actionPerformed(ActionEvent e)
2350 protected void unGroup_actionPerformed(ActionEvent e)
2354 protected void copy_actionPerformed(ActionEvent e)
2358 protected void cut_actionPerformed(ActionEvent e)
2362 protected void delete_actionPerformed(ActionEvent e)
2366 protected void pasteNew_actionPerformed(ActionEvent e)
2370 protected void pasteThis_actionPerformed(ActionEvent e)
2374 protected void applyToAllGroups_actionPerformed(boolean selected)
2378 public void createPNG(java.io.File f)
2382 protected void font_actionPerformed(ActionEvent e)
2386 protected void seqLimit_actionPerformed(ActionEvent e)
2390 public void seqDBRef_actionPerformed(ActionEvent e)
2395 public void createEPS(java.io.File f)
2399 public void createSVG(java.io.File f)
2404 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2410 * Template method to handle the 'load T-Coffee scores' menu event.
2412 * Subclasses override this method to provide a custom action.
2417 protected void loadScores_actionPerformed(ActionEvent event)
2422 protected void jpred_actionPerformed(ActionEvent e)
2426 protected void scaleAbove_actionPerformed(ActionEvent e)
2430 protected void scaleLeft_actionPerformed(ActionEvent e)
2434 protected void scaleRight_actionPerformed(ActionEvent e)
2438 protected void modifyPID_actionPerformed()
2442 protected void modifyConservation_actionPerformed()
2446 protected void saveAs_actionPerformed()
2450 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2454 public void vamsasStore_actionPerformed(ActionEvent e)
2459 public void vamsasLoad_actionPerformed(ActionEvent e)
2464 public void showTranslation_actionPerformed(ActionEvent e)
2469 public void featureSettings_actionPerformed(ActionEvent e)
2474 public void fetchSequence_actionPerformed()
2479 public void smoothFont_actionPerformed(ActionEvent e)
2484 public void annotationColour_actionPerformed()
2488 public void annotationColumn_actionPerformed(ActionEvent e)
2492 public void associatedData_actionPerformed(ActionEvent e)
2497 public void autoCalculate_actionPerformed(ActionEvent e)
2502 public void sortByTreeOption_actionPerformed(ActionEvent e)
2507 public void showAllSeqs_actionPerformed(ActionEvent e)
2512 public void showAllColumns_actionPerformed(ActionEvent e)
2517 public void hideSelSequences_actionPerformed(ActionEvent e)
2522 public void hideSelColumns_actionPerformed(ActionEvent e)
2527 public void hiddenMarkers_actionPerformed(ActionEvent e)
2532 public void findPdbId_actionPerformed(ActionEvent e)
2537 public void enterPdbId_actionPerformed(ActionEvent e)
2542 public void pdbFile_actionPerformed(ActionEvent e)
2547 public void invertColSel_actionPerformed(ActionEvent e)
2552 public void tabSelectionChanged(int sel)
2557 public void tabbedPane_mousePressed(MouseEvent e)
2562 public void tabbedPane_focusGained(FocusEvent e)
2567 public void save_actionPerformed(ActionEvent e)
2572 public void reload_actionPerformed(ActionEvent e)
2577 public void newView_actionPerformed(ActionEvent e)
2582 public void textColour_actionPerformed()
2587 public void idRightAlign_actionPerformed(ActionEvent e)
2592 public void expandViews_actionPerformed(ActionEvent e)
2597 public void gatherViews_actionPerformed(ActionEvent e)
2602 public void buildTreeSortMenu()
2607 public void pageSetup_actionPerformed(ActionEvent e)
2612 public void alignmentProperties()
2617 protected void expand_newalign(ActionEvent e)
2619 // TODO Auto-generated method stub
2623 protected boolean isShowAutoCalculatedAbove()
2625 return showAutoCalculatedAbove;
2628 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2630 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2633 protected SequenceAnnotationOrder getAnnotationSortOrder()
2635 return annotationSortOrder;
2638 protected void setAnnotationSortOrder(
2639 SequenceAnnotationOrder annotationSortOrder)
2641 this.annotationSortOrder = annotationSortOrder;
2644 public Map<KeyStroke, JMenuItem> getAccelerators()
2646 return this.accelerators;
2650 * Returns the selected index of the tabbed pane, or -1 if none selected
2651 * (including the case where the tabbed pane has not been made visible).
2655 public int getTabIndex()
2657 return tabbedPane.getSelectedIndex();
2660 public JPanel getStatusPanel()
2666 * Sets a reference to the containing split frame. Also makes the 'toggle
2667 * split view' menu item visible and checked.
2671 public void setSplitFrame(SplitContainerI sf)
2673 this.splitFrame = sf;
2676 this.showComplementMenuItem.setVisible(true);
2677 this.showComplementMenuItem.setState(true);
2681 public SplitContainerI getSplitViewContainer()
2683 return this.splitFrame;
2686 protected void showComplement_actionPerformed(boolean complement)