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.swing.JTabbedPane.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);
231 outputTextboxMenu.add(item);
233 } catch (Exception e)
235 System.err.println(e.toString());
238 if (!Platform.isAMac())
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(e);
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")) {
289 public void setPopupMenuVisible(boolean b) {
291 openFeatureSettings.setEnabled(haveAlignmentFeatures());
293 super.setPopupMenuVisible(b);
297 JMenu annotationsMenu = new JMenu(
298 MessageManager.getString("action.annotations"));
299 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
300 colourMenu.setText(MessageManager.getString("action.colour"));
301 JMenu calculateMenu = new JMenu(
302 MessageManager.getString("action.calculate"));
303 webService.setText(MessageManager.getString("action.web_service"));
304 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
305 MessageManager.getString("action.select_all"));
306 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
307 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
308 al = new ActionListener()
311 public void actionPerformed(ActionEvent e)
313 selectAllSequenceMenuItem_actionPerformed(e);
316 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
318 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
319 MessageManager.getString("action.deselect_all"));
320 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
321 al = new ActionListener()
324 public void actionPerformed(ActionEvent e)
326 deselectAllSequenceMenuItem_actionPerformed(e);
329 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
331 JMenuItem invertSequenceMenuItem = new JMenuItem(
332 MessageManager.getString("action.invert_sequence_selection"));
333 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
334 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
335 al = new ActionListener()
338 public void actionPerformed(ActionEvent e)
340 invertSequenceMenuItem_actionPerformed(e);
343 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
345 JMenuItem grpsFromSelection = new JMenuItem(
346 MessageManager.getString("action.make_groups_selection"));
347 grpsFromSelection.addActionListener(new ActionListener()
350 public void actionPerformed(ActionEvent e)
352 makeGrpsFromSelection_actionPerformed(e);
355 JMenuItem expandAlignment = new JMenuItem(
356 MessageManager.getString("action.view_flanking_regions"));
357 expandAlignment.setToolTipText(
358 MessageManager.getString("label.view_flanking_regions"));
359 expandAlignment.addActionListener(new ActionListener()
362 public void actionPerformed(ActionEvent e)
367 JMenuItem remove2LeftMenuItem = new JMenuItem(
368 MessageManager.getString("action.remove_left"));
369 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
370 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
371 al = new ActionListener()
374 public void actionPerformed(ActionEvent e)
376 remove2LeftMenuItem_actionPerformed(e);
379 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
381 JMenuItem remove2RightMenuItem = new JMenuItem(
382 MessageManager.getString("action.remove_right"));
383 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
384 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
385 al = new ActionListener()
388 public void actionPerformed(ActionEvent e)
390 remove2RightMenuItem_actionPerformed(e);
393 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
395 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
396 MessageManager.getString("action.remove_empty_columns"));
397 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
398 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
399 al = new ActionListener()
402 public void actionPerformed(ActionEvent e)
404 removeGappedColumnMenuItem_actionPerformed(e);
407 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
409 JMenuItem removeAllGapsMenuItem = new JMenuItem(
410 MessageManager.getString("action.remove_all_gaps"));
411 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
412 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
413 | KeyEvent.SHIFT_MASK,
415 al = new ActionListener()
418 public void actionPerformed(ActionEvent e)
420 removeAllGapsMenuItem_actionPerformed(e);
423 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
425 JMenuItem justifyLeftMenuItem = new JMenuItem(
426 MessageManager.getString("action.left_justify_alignment"));
427 justifyLeftMenuItem.addActionListener(new ActionListener()
430 public void actionPerformed(ActionEvent e)
432 justifyLeftMenuItem_actionPerformed(e);
435 JMenuItem justifyRightMenuItem = new JMenuItem(
436 MessageManager.getString("action.right_justify_alignment"));
437 justifyRightMenuItem.addActionListener(new ActionListener()
440 public void actionPerformed(ActionEvent e)
442 justifyRightMenuItem_actionPerformed(e);
445 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
446 viewBoxesMenuItem.setState(true);
447 viewBoxesMenuItem.addActionListener(new ActionListener()
450 public void actionPerformed(ActionEvent e)
452 viewBoxesMenuItem_actionPerformed(e);
455 viewTextMenuItem.setText(MessageManager.getString("action.text"));
456 viewTextMenuItem.setState(true);
457 viewTextMenuItem.addActionListener(new ActionListener()
460 public void actionPerformed(ActionEvent e)
462 viewTextMenuItem_actionPerformed(e);
465 showNonconservedMenuItem
466 .setText(MessageManager.getString("label.show_non_conserved"));
467 showNonconservedMenuItem.setState(false);
468 showNonconservedMenuItem.addActionListener(new ActionListener()
471 public void actionPerformed(ActionEvent e)
473 showUnconservedMenuItem_actionPerformed(e);
476 JMenuItem sortPairwiseMenuItem = new JMenuItem(
477 MessageManager.getString("action.by_pairwise_id"));
478 sortPairwiseMenuItem.addActionListener(new ActionListener()
481 public void actionPerformed(ActionEvent e)
483 sortPairwiseMenuItem_actionPerformed(e);
486 JMenuItem sortIDMenuItem = new JMenuItem(
487 MessageManager.getString("action.by_id"));
488 sortIDMenuItem.addActionListener(new ActionListener()
491 public void actionPerformed(ActionEvent e)
493 sortIDMenuItem_actionPerformed(e);
496 JMenuItem sortLengthMenuItem = new JMenuItem(
497 MessageManager.getString("action.by_length"));
498 sortLengthMenuItem.addActionListener(new ActionListener()
501 public void actionPerformed(ActionEvent e)
503 sortLengthMenuItem_actionPerformed(e);
506 JMenuItem sortGroupMenuItem = new JMenuItem(
507 MessageManager.getString("action.by_group"));
508 sortGroupMenuItem.addActionListener(new ActionListener()
511 public void actionPerformed(ActionEvent e)
513 sortGroupMenuItem_actionPerformed(e);
517 JMenuItem removeRedundancyMenuItem = new JMenuItem(
518 MessageManager.getString("action.remove_redundancy"));
519 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
520 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
521 al = new ActionListener()
524 public void actionPerformed(ActionEvent e)
526 removeRedundancyMenuItem_actionPerformed(e);
529 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
531 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
532 MessageManager.getString("action.pairwise_alignment"));
533 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
536 public void actionPerformed(ActionEvent e)
538 pairwiseAlignmentMenuItem_actionPerformed(e);
542 this.getContentPane().setLayout(new BorderLayout());
543 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
544 statusBar.setBackground(Color.white);
545 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
546 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
547 statusBar.setText(MessageManager.getString("label.status_bar"));
549 .setText(MessageManager.getString("label.out_to_textbox"));
551 annotationPanelMenuItem.setActionCommand("");
552 annotationPanelMenuItem
553 .setText(MessageManager.getString("label.show_annotations"));
554 annotationPanelMenuItem
555 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
556 annotationPanelMenuItem.addActionListener(new ActionListener()
559 public void actionPerformed(ActionEvent e)
561 annotationPanelMenuItem_actionPerformed(e);
564 showAllAlAnnotations.setText(
565 MessageManager.getString("label.show_all_al_annotations"));
566 final boolean isAnnotationPanelShown = annotationPanelMenuItem
568 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
569 showAllAlAnnotations.addActionListener(new ActionListener()
572 public void actionPerformed(ActionEvent e)
574 showAllAnnotations_actionPerformed(false, true);
577 hideAllAlAnnotations.setText(
578 MessageManager.getString("label.hide_all_al_annotations"));
579 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
580 hideAllAlAnnotations.addActionListener(new ActionListener()
583 public void actionPerformed(ActionEvent e)
585 hideAllAnnotations_actionPerformed(false, true);
588 showAllSeqAnnotations.setText(
589 MessageManager.getString("label.show_all_seq_annotations"));
590 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
591 showAllSeqAnnotations.addActionListener(new ActionListener()
594 public void actionPerformed(ActionEvent e)
596 showAllAnnotations_actionPerformed(true, false);
599 hideAllSeqAnnotations.setText(
600 MessageManager.getString("label.hide_all_seq_annotations"));
601 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
602 hideAllSeqAnnotations.addActionListener(new ActionListener()
605 public void actionPerformed(ActionEvent e)
607 hideAllAnnotations_actionPerformed(true, false);
610 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
611 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
612 SequenceAnnotationOrder.NONE.name()));
613 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
614 MessageManager.getString("label.sort_annotations_by_sequence"));
615 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
616 MessageManager.getString("label.sort_annotations_by_label"));
618 sortAnnBySequence.setSelected(
619 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
620 sortAnnBySequence.addActionListener(new ActionListener()
623 public void actionPerformed(ActionEvent e)
625 boolean newState = sortAnnBySequence.getState();
626 sortAnnByLabel.setSelected(false);
627 setAnnotationSortOrder(
628 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
629 : SequenceAnnotationOrder.NONE);
630 sortAnnotations_actionPerformed();
633 sortAnnByLabel.setSelected(
634 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
635 sortAnnByLabel.addActionListener(new ActionListener()
638 public void actionPerformed(ActionEvent e)
640 boolean newState = sortAnnByLabel.getState();
641 sortAnnBySequence.setSelected(false);
642 setAnnotationSortOrder(
643 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
644 : SequenceAnnotationOrder.NONE);
645 sortAnnotations_actionPerformed();
648 colourTextMenuItem = new JCheckBoxMenuItem(
649 MessageManager.getString("label.colour_text"));
650 colourTextMenuItem.addActionListener(new ActionListener()
653 public void actionPerformed(ActionEvent e)
655 colourTextMenuItem_actionPerformed(e);
659 JMenuItem htmlMenuItem = new JMenuItem(
660 MessageManager.getString("label.html"));
661 htmlMenuItem.addActionListener(new ActionListener()
664 public void actionPerformed(ActionEvent e)
666 htmlMenuItem_actionPerformed(e);
670 JMenuItem createBioJS = new JMenuItem(
671 MessageManager.getString("label.biojs_html_export"));
672 createBioJS.addActionListener(new java.awt.event.ActionListener()
675 public void actionPerformed(ActionEvent e)
677 bioJSMenuItem_actionPerformed(e);
681 JMenuItem overviewMenuItem = new JMenuItem(
682 MessageManager.getString("label.overview_window"));
683 overviewMenuItem.addActionListener(new ActionListener()
686 public void actionPerformed(ActionEvent e)
688 overviewMenuItem_actionPerformed(e);
692 undoMenuItem.setEnabled(false);
693 undoMenuItem.setText(MessageManager.getString("action.undo"));
694 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
695 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
696 al = new ActionListener()
699 public void actionPerformed(ActionEvent e)
701 undoMenuItem_actionPerformed(e);
704 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
706 redoMenuItem.setEnabled(false);
707 redoMenuItem.setText(MessageManager.getString("action.redo"));
708 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
709 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
710 al = new ActionListener()
713 public void actionPerformed(ActionEvent e)
715 redoMenuItem_actionPerformed(e);
718 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
720 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
721 wrapMenuItem.addActionListener(new ActionListener()
724 public void actionPerformed(ActionEvent e)
726 wrapMenuItem_actionPerformed(e);
730 JMenuItem printMenuItem = new JMenuItem(
731 MessageManager.getString("action.print"));
732 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
733 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
734 al = new ActionListener()
737 public void actionPerformed(ActionEvent e)
739 printMenuItem_actionPerformed(e);
742 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
745 .setText(MessageManager.getString("action.show_gaps"));
746 renderGapsMenuItem.setState(true);
747 renderGapsMenuItem.addActionListener(new ActionListener()
750 public void actionPerformed(ActionEvent e)
752 renderGapsMenuItem_actionPerformed(e);
756 JMenuItem findMenuItem = new JMenuItem(
757 MessageManager.getString("action.find"));
758 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
759 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
760 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
761 MessageManager.getString("label.find_tip")));
762 al = new ActionListener()
765 public void actionPerformed(ActionEvent e)
767 findMenuItem_actionPerformed(e);
770 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
772 showSeqFeatures.setText(
773 MessageManager.getString("label.show_sequence_features"));
774 showSeqFeatures.addActionListener(new ActionListener()
777 public void actionPerformed(ActionEvent actionEvent)
779 showSeqFeatures_actionPerformed(actionEvent);
783 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
784 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
785 * void actionPerformed(ActionEvent actionEvent) {
786 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
789 .setText(MessageManager.getString("label.show_database_refs"));
790 showDbRefsMenuitem.addActionListener(new ActionListener()
794 public void actionPerformed(ActionEvent e)
796 showDbRefs_actionPerformed(e);
800 showNpFeatsMenuitem.setText(
801 MessageManager.getString("label.show_non_positional_features"));
802 showNpFeatsMenuitem.addActionListener(new ActionListener()
806 public void actionPerformed(ActionEvent e)
808 showNpFeats_actionPerformed(e);
812 showGroupConservation
813 .setText(MessageManager.getString("label.group_conservation"));
814 showGroupConservation.addActionListener(new ActionListener()
818 public void actionPerformed(ActionEvent e)
820 showGroupConservation_actionPerformed(e);
826 .setText(MessageManager.getString("label.group_consensus"));
827 showGroupConsensus.addActionListener(new ActionListener()
831 public void actionPerformed(ActionEvent e)
833 showGroupConsensus_actionPerformed(e);
837 showConsensusHistogram.setText(
838 MessageManager.getString("label.show_consensus_histogram"));
839 showConsensusHistogram.addActionListener(new ActionListener()
843 public void actionPerformed(ActionEvent e)
845 showConsensusHistogram_actionPerformed(e);
850 .setText(MessageManager.getString("label.show_consensus_logo"));
851 showSequenceLogo.addActionListener(new ActionListener()
855 public void actionPerformed(ActionEvent e)
857 showSequenceLogo_actionPerformed(e);
861 normaliseSequenceLogo
862 .setText(MessageManager.getString("label.norm_consensus_logo"));
863 normaliseSequenceLogo.addActionListener(new ActionListener()
867 public void actionPerformed(ActionEvent e)
869 normaliseSequenceLogo_actionPerformed(e);
873 applyAutoAnnotationSettings
874 .setText(MessageManager.getString("label.apply_all_groups"));
875 applyAutoAnnotationSettings.setState(false);
876 applyAutoAnnotationSettings.setVisible(true);
877 applyAutoAnnotationSettings.addActionListener(new ActionListener()
880 public void actionPerformed(ActionEvent e)
882 applyAutoAnnotationSettings_actionPerformed(e);
886 ButtonGroup buttonGroup = new ButtonGroup();
887 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
888 MessageManager.getString("label.show_first"));
889 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
890 MessageManager.getString("label.show_last"));
891 buttonGroup.add(showAutoFirst);
892 buttonGroup.add(showAutoLast);
893 final boolean autoFirst = Cache
894 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
895 showAutoFirst.setSelected(autoFirst);
896 setShowAutoCalculatedAbove(autoFirst);
897 showAutoFirst.addActionListener(new ActionListener()
900 public void actionPerformed(ActionEvent e)
902 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
903 sortAnnotations_actionPerformed();
906 showAutoLast.setSelected(!showAutoFirst.isSelected());
907 showAutoLast.addActionListener(new ActionListener()
910 public void actionPerformed(ActionEvent e)
912 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
913 sortAnnotations_actionPerformed();
917 JMenuItem deleteGroups = new JMenuItem(
918 MessageManager.getString("action.undefine_groups"));
919 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
920 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
921 al = new ActionListener()
924 public void actionPerformed(ActionEvent e)
926 deleteGroups_actionPerformed(e);
929 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
931 JMenuItem annotationColumn = new JMenuItem(
932 MessageManager.getString("action.select_by_annotation"));
933 annotationColumn.addActionListener(new ActionListener()
936 public void actionPerformed(ActionEvent e)
938 annotationColumn_actionPerformed(e);
942 JMenuItem createGroup = new JMenuItem(
943 MessageManager.getString("action.create_group"));
944 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
945 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
946 al = new ActionListener()
949 public void actionPerformed(ActionEvent e)
951 createGroup_actionPerformed(e);
954 addMenuActionAndAccelerator(keyStroke, createGroup, al);
956 JMenuItem unGroup = new JMenuItem(
957 MessageManager.getString("action.remove_group"));
958 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
959 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
960 | KeyEvent.SHIFT_MASK,
962 al = new ActionListener()
965 public void actionPerformed(ActionEvent e)
967 unGroup_actionPerformed(e);
970 addMenuActionAndAccelerator(keyStroke, unGroup, al);
972 copy.setText(MessageManager.getString("action.copy"));
973 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
974 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
976 al = new ActionListener()
979 public void actionPerformed(ActionEvent e)
981 copy_actionPerformed(e);
984 addMenuActionAndAccelerator(keyStroke, copy, al);
986 cut.setText(MessageManager.getString("action.cut"));
987 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
988 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
989 al = new ActionListener()
992 public void actionPerformed(ActionEvent e)
994 cut_actionPerformed(e);
997 addMenuActionAndAccelerator(keyStroke, cut, al);
999 JMenuItem delete = new JMenuItem(
1000 MessageManager.getString("action.delete"));
1001 delete.addActionListener(new ActionListener()
1004 public void actionPerformed(ActionEvent e)
1006 delete_actionPerformed(e);
1010 pasteMenu.setText(MessageManager.getString("action.paste"));
1011 JMenuItem pasteNew = new JMenuItem(
1012 MessageManager.getString("label.to_new_alignment"));
1013 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1014 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1015 | KeyEvent.SHIFT_MASK,
1017 al = new ActionListener()
1020 public void actionPerformed(ActionEvent e)
1022 pasteNew_actionPerformed(e);
1025 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1027 JMenuItem pasteThis = new JMenuItem(
1028 MessageManager.getString("label.to_this_alignment"));
1029 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1030 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1031 al = new ActionListener()
1034 public void actionPerformed(ActionEvent e)
1036 pasteThis_actionPerformed(e);
1039 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1041 JMenuItem createPNG = new JMenuItem("PNG");
1042 createPNG.addActionListener(new ActionListener()
1045 public void actionPerformed(ActionEvent e)
1050 createPNG.setActionCommand(
1051 MessageManager.getString("label.save_png_image"));
1053 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1054 font.addActionListener(new ActionListener()
1057 public void actionPerformed(ActionEvent e)
1059 font_actionPerformed(e);
1063 MessageManager.getString("label.show_sequence_limits"));
1064 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1065 seqLimits.addActionListener(new ActionListener()
1068 public void actionPerformed(ActionEvent e)
1070 seqLimit_actionPerformed(e);
1073 JMenuItem epsFile = new JMenuItem("EPS");
1074 epsFile.addActionListener(new ActionListener()
1077 public void actionPerformed(ActionEvent e)
1083 JMenuItem createSVG = new JMenuItem("SVG");
1084 createSVG.addActionListener(new ActionListener()
1087 public void actionPerformed(ActionEvent e)
1093 JMenuItem loadTreeMenuItem = new JMenuItem(
1094 MessageManager.getString("label.load_associated_tree"));
1095 loadTreeMenuItem.setActionCommand(
1096 MessageManager.getString("label.load_tree_for_sequence_set"));
1097 loadTreeMenuItem.addActionListener(new ActionListener()
1100 public void actionPerformed(ActionEvent e)
1102 loadTreeMenuItem_actionPerformed(e);
1106 scaleAbove.setVisible(false);
1107 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1108 scaleAbove.addActionListener(new ActionListener()
1111 public void actionPerformed(ActionEvent e)
1113 scaleAbove_actionPerformed(e);
1116 scaleLeft.setVisible(false);
1117 scaleLeft.setSelected(true);
1118 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1119 scaleLeft.addActionListener(new ActionListener()
1122 public void actionPerformed(ActionEvent e)
1124 scaleLeft_actionPerformed(e);
1127 scaleRight.setVisible(false);
1128 scaleRight.setSelected(true);
1129 scaleRight.setText(MessageManager.getString("action.scale_right"));
1130 scaleRight.addActionListener(new ActionListener()
1133 public void actionPerformed(ActionEvent e)
1135 scaleRight_actionPerformed(e);
1138 centreColumnLabelsMenuItem.setVisible(true);
1139 centreColumnLabelsMenuItem.setState(false);
1140 centreColumnLabelsMenuItem.setText(
1141 MessageManager.getString("label.centre_column_labels"));
1142 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1145 public void actionPerformed(ActionEvent e)
1147 centreColumnLabels_actionPerformed(e);
1150 followHighlightMenuItem.setVisible(true);
1151 followHighlightMenuItem.setState(true);
1152 followHighlightMenuItem
1153 .setText(MessageManager.getString("label.automatic_scrolling"));
1154 followHighlightMenuItem.addActionListener(new ActionListener()
1158 public void actionPerformed(ActionEvent e)
1160 followHighlight_actionPerformed();
1166 .setText(MessageManager.getString("action.by_tree_order"));
1167 sort.setText(MessageManager.getString("action.sort"));
1168 sort.addMenuListener(new MenuListener()
1171 public void menuSelected(MenuEvent e)
1173 buildTreeSortMenu();
1177 public void menuDeselected(MenuEvent e)
1182 public void menuCanceled(MenuEvent e)
1187 .setText(MessageManager.getString("label.sort_by_score"));
1188 sort.add(sortByAnnotScore);
1189 sort.addMenuListener(new javax.swing.event.MenuListener()
1193 public void menuCanceled(MenuEvent e)
1198 public void menuDeselected(MenuEvent e)
1203 public void menuSelected(MenuEvent e)
1205 buildSortByAnnotationScoresMenu();
1208 sortByAnnotScore.setVisible(false);
1211 .setText(MessageManager.getString("action.calculate_tree_pca"));
1213 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1215 .setState(jalview.bin.Cache.getDefault("PAD_GAPS", false));
1216 padGapsMenuitem.addActionListener(new ActionListener()
1219 public void actionPerformed(ActionEvent e)
1221 padGapsMenuitem_actionPerformed(e);
1224 JMenuItem vamsasStore = new JMenuItem(
1225 MessageManager.getString("label.vamsas_store"));
1226 vamsasStore.setVisible(false);
1227 vamsasStore.addActionListener(new ActionListener()
1230 public void actionPerformed(ActionEvent e)
1232 vamsasStore_actionPerformed(e);
1236 .setText(MessageManager.getString("label.translate_cDNA"));
1237 showTranslation.addActionListener(new ActionListener()
1240 public void actionPerformed(ActionEvent e)
1242 showTranslation_actionPerformed(e);
1245 showReverse.setText(MessageManager.getString("label.reverse"));
1246 showReverse.addActionListener(new ActionListener()
1249 public void actionPerformed(ActionEvent e)
1251 showReverse_actionPerformed(false);
1254 showReverseComplement
1255 .setText(MessageManager.getString("label.reverse_complement"));
1256 showReverseComplement.addActionListener(new ActionListener()
1259 public void actionPerformed(ActionEvent e)
1261 showReverse_actionPerformed(true);
1265 JMenuItem extractScores = new JMenuItem(
1266 MessageManager.getString("label.extract_scores"));
1267 extractScores.addActionListener(new ActionListener()
1270 public void actionPerformed(ActionEvent e)
1272 extractScores_actionPerformed(e);
1275 extractScores.setVisible(true);
1276 // JBPNote: TODO: make gui for regex based score extraction
1278 // for show products actions see AlignFrame.canShowProducts
1279 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1281 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1282 runGroovy.setToolTipText(
1283 MessageManager.getString("label.run_groovy_tip"));
1284 runGroovy.addActionListener(new ActionListener()
1287 public void actionPerformed(ActionEvent e)
1289 runGroovy_actionPerformed();
1293 openFeatureSettings = new JMenuItem(
1294 MessageManager.getString("action.feature_settings"));
1295 openFeatureSettings.setEnabled(false);
1296 openFeatureSettings.addActionListener(new ActionListener()
1299 public void actionPerformed(ActionEvent e)
1301 featureSettings_actionPerformed(e);
1304 JMenuItem fetchSequence = new JMenuItem(
1305 MessageManager.getString("label.fetch_sequences"));
1306 fetchSequence.addActionListener(new ActionListener()
1309 public void actionPerformed(ActionEvent e)
1311 fetchSequence_actionPerformed(e);
1315 JMenuItem associatedData = new JMenuItem(
1316 MessageManager.getString("label.load_features_annotations"));
1317 associatedData.addActionListener(new ActionListener()
1320 public void actionPerformed(ActionEvent e)
1322 associatedData_actionPerformed(e);
1325 loadVcf = new JMenuItem(MessageManager.getString("label.load_vcf_file"));
1326 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1327 loadVcf.addActionListener(new ActionListener()
1330 public void actionPerformed(ActionEvent e)
1332 loadVcf_actionPerformed();
1335 autoCalculate.setText(
1336 MessageManager.getString("label.autocalculate_consensus"));
1337 autoCalculate.setState(
1338 jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1339 autoCalculate.addActionListener(new ActionListener()
1342 public void actionPerformed(ActionEvent e)
1344 autoCalculate_actionPerformed(e);
1348 MessageManager.getString("label.sort_alignment_new_tree"));
1349 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1350 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1352 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1353 sortByTree.addActionListener(new ActionListener()
1356 public void actionPerformed(ActionEvent e)
1358 sortByTreeOption_actionPerformed(e);
1362 listenToViewSelections.setText(
1363 MessageManager.getString("label.listen_for_selections"));
1364 listenToViewSelections
1365 .setToolTipText("<html>" + MessageManager.getString(
1366 "label.selections_mirror_selections_made_same_sequences_other_views"));
1367 listenToViewSelections.setState(false);
1368 listenToViewSelections.addActionListener(new ActionListener()
1371 public void actionPerformed(ActionEvent e)
1373 listenToViewSelections_actionPerformed(e);
1377 JMenu addSequenceMenu = new JMenu(
1378 MessageManager.getString("label.add_sequences"));
1379 JMenuItem addFromFile = new JMenuItem(
1380 MessageManager.getString("label.from_file"));
1381 addFromFile.addActionListener(new ActionListener()
1384 public void actionPerformed(ActionEvent e)
1386 addFromFile_actionPerformed(e);
1389 JMenuItem addFromText = new JMenuItem(
1390 MessageManager.getString("label.from_textbox"));
1391 addFromText.addActionListener(new ActionListener()
1394 public void actionPerformed(ActionEvent e)
1396 addFromText_actionPerformed(e);
1399 JMenuItem addFromURL = new JMenuItem(
1400 MessageManager.getString("label.from_url"));
1401 addFromURL.addActionListener(new ActionListener()
1404 public void actionPerformed(ActionEvent e)
1406 addFromURL_actionPerformed(e);
1409 JMenuItem exportFeatures = new JMenuItem(
1410 MessageManager.getString("label.export_features"));
1411 exportFeatures.addActionListener(new ActionListener()
1414 public void actionPerformed(ActionEvent e)
1416 exportFeatures_actionPerformed(e);
1419 JMenuItem exportAnnotations = new JMenuItem(
1420 MessageManager.getString("label.export_annotations"));
1421 exportAnnotations.addActionListener(new ActionListener()
1424 public void actionPerformed(ActionEvent e)
1426 exportAnnotations_actionPerformed(e);
1429 statusPanel.setLayout(new GridLayout());
1430 JMenuItem showAllSeqs = new JMenuItem(
1431 MessageManager.getString("label.all_sequences"));
1432 showAllSeqs.setToolTipText(
1433 MessageManager.getString("label.toggle_sequence_visibility"));
1434 showAllSeqs.addActionListener(new ActionListener()
1437 public void actionPerformed(ActionEvent e)
1439 showAllSeqs_actionPerformed(e);
1442 JMenuItem showAllColumns = new JMenuItem(
1443 MessageManager.getString("label.all_columns"));
1444 showAllColumns.setToolTipText(
1445 MessageManager.getString("label.toggle_columns_visibility"));
1446 showAllColumns.addActionListener(new ActionListener()
1449 public void actionPerformed(ActionEvent e)
1451 showAllColumns_actionPerformed(e);
1454 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1455 JMenuItem hideSelSequences = new JMenuItem(
1456 MessageManager.getString("label.selected_sequences"));
1457 hideSelSequences.setToolTipText(
1458 MessageManager.getString("label.toggle_sequence_visibility"));
1459 hideSelSequences.addActionListener(new ActionListener()
1462 public void actionPerformed(ActionEvent e)
1464 hideSelSequences_actionPerformed(e);
1467 JMenuItem hideSelColumns = new JMenuItem(
1468 MessageManager.getString("label.selected_columns"));
1469 hideSelColumns.setToolTipText(
1470 MessageManager.getString("label.toggle_columns_visibility"));
1471 hideSelColumns.addActionListener(new ActionListener()
1474 public void actionPerformed(ActionEvent e)
1476 hideSelColumns_actionPerformed(e);
1479 JMenuItem hideAllSelection = new JMenuItem(
1480 MessageManager.getString("label.selected_region"));
1481 hideAllSelection.addActionListener(new ActionListener()
1484 public void actionPerformed(ActionEvent e)
1486 hideAllSelection_actionPerformed(e);
1489 // TODO: should be hidden if no selection exists.
1490 JMenuItem hideAllButSelection = new JMenuItem(
1491 MessageManager.getString("label.all_but_selected_region"));
1492 hideAllButSelection.addActionListener(new ActionListener()
1495 public void actionPerformed(ActionEvent e)
1497 hideAllButSelection_actionPerformed(e);
1500 JMenuItem showAllhidden = new JMenuItem(
1501 MessageManager.getString("label.all_sequences_columns"));
1502 showAllhidden.setToolTipText(MessageManager
1503 .getString("label.toggles_visibility_hidden_selected_regions"));
1504 showAllhidden.addActionListener(new ActionListener()
1507 public void actionPerformed(ActionEvent e)
1509 showAllhidden_actionPerformed(e);
1512 hiddenMarkers.setText(
1513 MessageManager.getString("action.show_hidden_markers"));
1514 hiddenMarkers.addActionListener(new ActionListener()
1517 public void actionPerformed(ActionEvent e)
1519 hiddenMarkers_actionPerformed(e);
1523 JMenuItem invertColSel = new JMenuItem(
1524 MessageManager.getString("action.invert_column_selection"));
1525 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1526 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
1527 | KeyEvent.ALT_MASK,
1529 al = new ActionListener()
1532 public void actionPerformed(ActionEvent e)
1534 invertColSel_actionPerformed(e);
1537 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1539 showComplementMenuItem.setVisible(false);
1540 showComplementMenuItem.addActionListener(new ActionListener()
1543 public void actionPerformed(ActionEvent e)
1545 showComplement_actionPerformed(showComplementMenuItem.getState());
1549 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1552 public void stateChanged(ChangeEvent evt)
1554 JTabbedPane pane = (JTabbedPane) evt.getSource();
1555 int sel = pane.getSelectedIndex();
1556 tabSelectionChanged(sel);
1559 tabbedPane.addMouseListener(new MouseAdapter()
1562 public void mousePressed(MouseEvent e)
1564 if (e.isPopupTrigger()) // Mac
1566 tabbedPane_mousePressed(e);
1571 public void mouseReleased(MouseEvent e)
1573 if (e.isPopupTrigger()) // Windows
1575 tabbedPane_mousePressed(e);
1579 tabbedPane.addFocusListener(new FocusAdapter()
1582 public void focusGained(FocusEvent e)
1584 tabbedPane_focusGained(e);
1588 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1589 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1590 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1591 al = new ActionListener()
1594 public void actionPerformed(ActionEvent e)
1596 save_actionPerformed(e);
1599 addMenuActionAndAccelerator(keyStroke, save, al);
1601 reload.setEnabled(false);
1602 reload.setText(MessageManager.getString("action.reload"));
1603 reload.addActionListener(new ActionListener()
1606 public void actionPerformed(ActionEvent e)
1608 reload_actionPerformed(e);
1612 JMenuItem newView = new JMenuItem(
1613 MessageManager.getString("action.new_view"));
1614 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1615 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
1616 al = new ActionListener()
1619 public void actionPerformed(ActionEvent e)
1621 newView_actionPerformed(e);
1624 addMenuActionAndAccelerator(keyStroke, newView, al);
1626 tabbedPane.setToolTipText("<html><i>"
1627 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1630 formatMenu.setText(MessageManager.getString("action.format"));
1631 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1633 idRightAlign.setText(
1634 MessageManager.getString("label.right_align_sequence_id"));
1635 idRightAlign.addActionListener(new ActionListener()
1638 public void actionPerformed(ActionEvent e)
1640 idRightAlign_actionPerformed(e);
1644 gatherViews.setEnabled(false);
1645 gatherViews.setText(MessageManager.getString("action.gather_views"));
1646 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1647 al = new ActionListener()
1650 public void actionPerformed(ActionEvent e)
1652 gatherViews_actionPerformed(e);
1655 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1657 expandViews.setEnabled(false);
1658 expandViews.setText(MessageManager.getString("action.expand_views"));
1659 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1660 al = new ActionListener()
1663 public void actionPerformed(ActionEvent e)
1665 expandViews_actionPerformed(e);
1668 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1670 JMenuItem pageSetup = new JMenuItem(
1671 MessageManager.getString("action.page_setup"));
1672 pageSetup.addActionListener(new ActionListener()
1675 public void actionPerformed(ActionEvent e)
1677 pageSetup_actionPerformed(e);
1680 JMenuItem alignmentProperties = new JMenuItem(
1681 MessageManager.getString("label.alignment_props"));
1682 alignmentProperties.addActionListener(new ActionListener()
1685 public void actionPerformed(ActionEvent actionEvent)
1687 alignmentProperties();
1690 JMenuItem selectHighlighted = new JMenuItem(
1691 MessageManager.getString("action.select_highlighted_columns"));
1692 selectHighlighted.setToolTipText(
1693 MessageManager.getString("tooltip.select_highlighted_columns"));
1694 al = new ActionListener()
1697 public void actionPerformed(ActionEvent actionEvent)
1699 selectHighlightedColumns_actionPerformed(actionEvent);
1702 selectHighlighted.addActionListener(al);
1703 JMenu tooltipSettingsMenu = new JMenu(
1704 MessageManager.getString("label.sequence_id_tooltip"));
1705 JMenu autoAnnMenu = new JMenu(
1706 MessageManager.getString("label.autocalculated_annotation"));
1708 JMenu exportImageMenu = new JMenu(
1709 MessageManager.getString("label.export_image"));
1710 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1711 alignFrameMenuBar.add(fileMenu);
1712 alignFrameMenuBar.add(editMenu);
1713 alignFrameMenuBar.add(selectMenu);
1714 alignFrameMenuBar.add(viewMenu);
1715 alignFrameMenuBar.add(annotationsMenu);
1716 alignFrameMenuBar.add(formatMenu);
1717 alignFrameMenuBar.add(colourMenu);
1718 alignFrameMenuBar.add(calculateMenu);
1719 alignFrameMenuBar.add(webService);
1721 fileMenu.add(fetchSequence);
1722 fileMenu.add(addSequenceMenu);
1723 fileMenu.add(reload);
1724 fileMenu.addSeparator();
1725 fileMenu.add(vamsasStore);
1727 fileMenu.add(saveAs);
1728 fileMenu.add(outputTextboxMenu);
1729 fileMenu.add(pageSetup);
1730 fileMenu.add(printMenuItem);
1731 fileMenu.addSeparator();
1732 fileMenu.add(exportImageMenu);
1733 fileMenu.add(exportFeatures);
1734 fileMenu.add(exportAnnotations);
1735 fileMenu.add(loadTreeMenuItem);
1736 fileMenu.add(associatedData);
1738 * No VCF import in Jalview-JS
1742 fileMenu.add(loadVcf);
1744 fileMenu.addSeparator();
1745 fileMenu.add(closeMenuItem);
1747 pasteMenu.add(pasteNew);
1748 pasteMenu.add(pasteThis);
1749 editMenu.add(undoMenuItem);
1750 editMenu.add(redoMenuItem);
1753 editMenu.add(pasteMenu);
1754 editMenu.add(delete);
1755 editMenu.addSeparator();
1756 editMenu.add(remove2LeftMenuItem);
1757 editMenu.add(remove2RightMenuItem);
1758 editMenu.add(removeGappedColumnMenuItem);
1759 editMenu.add(removeAllGapsMenuItem);
1760 editMenu.add(removeRedundancyMenuItem);
1761 editMenu.addSeparator();
1762 // dont add these yet in the CVS build - they cannot be undone!
1763 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1764 // editMenu.add(justifyLeftMenuItem);
1765 // editMenu.add(justifyRightMenuItem);
1766 // editMenu.addSeparator();
1767 editMenu.add(padGapsMenuitem);
1769 showMenu.add(showAllColumns);
1770 showMenu.add(showAllSeqs);
1771 showMenu.add(showAllhidden);
1772 hideMenu.add(hideSelColumns);
1773 hideMenu.add(hideSelSequences);
1774 hideMenu.add(hideAllSelection);
1775 hideMenu.add(hideAllButSelection);
1776 viewMenu.add(newView);
1777 viewMenu.add(expandViews);
1778 viewMenu.add(gatherViews);
1779 viewMenu.addSeparator();
1780 viewMenu.add(showMenu);
1781 viewMenu.add(hideMenu);
1782 viewMenu.add(showComplementMenuItem);
1783 viewMenu.addSeparator();
1784 viewMenu.add(followHighlightMenuItem);
1785 viewMenu.addSeparator();
1786 viewMenu.add(showSeqFeatures);
1787 // viewMenu.add(showSeqFeaturesHeight);
1788 viewMenu.add(openFeatureSettings);
1789 tooltipSettingsMenu.add(showDbRefsMenuitem);
1790 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1791 viewMenu.add(tooltipSettingsMenu);
1792 viewMenu.addSeparator();
1793 viewMenu.add(alignmentProperties);
1794 viewMenu.addSeparator();
1795 viewMenu.add(overviewMenuItem);
1797 annotationsMenu.add(annotationPanelMenuItem);
1798 annotationsMenu.addSeparator();
1799 annotationsMenu.add(showAllAlAnnotations);
1800 annotationsMenu.add(hideAllAlAnnotations);
1801 annotationsMenu.addSeparator();
1802 annotationsMenu.add(showAllSeqAnnotations);
1803 annotationsMenu.add(hideAllSeqAnnotations);
1804 annotationsMenu.add(sortAnnBySequence);
1805 annotationsMenu.add(sortAnnByLabel);
1806 annotationsMenu.addSeparator();
1807 autoAnnMenu.add(showAutoFirst);
1808 autoAnnMenu.add(showAutoLast);
1809 autoAnnMenu.addSeparator();
1810 autoAnnMenu.add(applyAutoAnnotationSettings);
1811 autoAnnMenu.add(showConsensusHistogram);
1812 autoAnnMenu.add(showSequenceLogo);
1813 autoAnnMenu.add(normaliseSequenceLogo);
1814 autoAnnMenu.addSeparator();
1815 autoAnnMenu.add(showGroupConservation);
1816 autoAnnMenu.add(showGroupConsensus);
1817 annotationsMenu.add(autoAnnMenu);
1819 sort.add(sortIDMenuItem);
1820 sort.add(sortLengthMenuItem);
1821 sort.add(sortGroupMenuItem);
1822 sort.add(sortPairwiseMenuItem);
1823 sort.add(sortByTreeMenu);
1824 calculateMenu.add(sort);
1825 calculateMenu.add(calculateTree);
1826 calculateMenu.addSeparator();
1827 calculateMenu.add(pairwiseAlignmentMenuItem);
1828 calculateMenu.addSeparator();
1829 calculateMenu.add(showTranslation);
1830 calculateMenu.add(showReverse);
1831 calculateMenu.add(showReverseComplement);
1832 calculateMenu.add(showProducts);
1833 calculateMenu.add(autoCalculate);
1834 calculateMenu.add(sortByTree);
1835 calculateMenu.addSeparator();
1836 calculateMenu.add(expandAlignment);
1837 calculateMenu.add(extractScores);
1838 calculateMenu.addSeparator();
1839 calculateMenu.add(runGroovy);
1841 webServiceNoServices = new JMenuItem(
1842 MessageManager.getString("label.no_services"));
1843 webService.add(webServiceNoServices);
1844 exportImageMenu.add(htmlMenuItem);
1845 exportImageMenu.add(epsFile);
1846 exportImageMenu.add(createPNG);
1847 exportImageMenu.add(createBioJS);
1848 exportImageMenu.add(createSVG);
1849 addSequenceMenu.add(addFromFile);
1850 addSequenceMenu.add(addFromText);
1851 addSequenceMenu.add(addFromURL);
1852 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1853 statusPanel.add(statusBar, null);
1854 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1856 formatMenu.add(font);
1857 formatMenu.addSeparator();
1858 formatMenu.add(wrapMenuItem);
1859 formatMenu.add(scaleAbove);
1860 formatMenu.add(scaleLeft);
1861 formatMenu.add(scaleRight);
1862 formatMenu.add(seqLimits);
1863 formatMenu.add(idRightAlign);
1864 formatMenu.add(hiddenMarkers);
1865 formatMenu.add(viewBoxesMenuItem);
1866 formatMenu.add(viewTextMenuItem);
1867 formatMenu.add(colourTextMenuItem);
1868 formatMenu.add(renderGapsMenuItem);
1869 formatMenu.add(centreColumnLabelsMenuItem);
1870 formatMenu.add(showNonconservedMenuItem);
1871 selectMenu.add(findMenuItem);
1872 selectMenu.addSeparator();
1873 selectMenu.add(selectAllSequenceMenuItem);
1874 selectMenu.add(deselectAllSequenceMenuItem);
1875 selectMenu.add(invertSequenceMenuItem);
1876 selectMenu.add(invertColSel);
1877 selectMenu.add(createGroup);
1878 selectMenu.add(unGroup);
1879 selectMenu.add(grpsFromSelection);
1880 selectMenu.add(deleteGroups);
1881 selectMenu.add(annotationColumn);
1882 selectMenu.add(selectHighlighted);
1883 // TODO - determine if the listenToViewSelections button is needed : see bug
1885 // selectMenu.addSeparator();
1886 // selectMenu.add(listenToViewSelections);
1889 protected boolean haveAlignmentFeatures()
1891 // because gAlignFrame is not an abstract class -- see AlignFrame
1895 protected void loadVcf_actionPerformed()
1900 * Constructs the entries on the Colour menu (but does not add them to the
1903 protected void initColourMenu()
1905 applyToAllGroups = new JCheckBoxMenuItem(
1906 MessageManager.getString("label.apply_colour_to_all_groups"));
1907 applyToAllGroups.addActionListener(new ActionListener()
1910 public void actionPerformed(ActionEvent e)
1912 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1916 textColour = new JMenuItem(
1917 MessageManager.getString("label.text_colour"));
1918 textColour.addActionListener(new ActionListener()
1921 public void actionPerformed(ActionEvent e)
1923 textColour_actionPerformed();
1927 conservationMenuItem = new JCheckBoxMenuItem(
1928 MessageManager.getString("action.by_conservation"));
1929 conservationMenuItem.addActionListener(new ActionListener()
1932 public void actionPerformed(ActionEvent e)
1934 conservationMenuItem_actionPerformed(
1935 conservationMenuItem.isSelected());
1939 abovePIDThreshold = new JCheckBoxMenuItem(
1940 MessageManager.getString("label.above_identity_threshold"));
1941 abovePIDThreshold.addActionListener(new ActionListener()
1944 public void actionPerformed(ActionEvent e)
1946 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
1949 modifyPID = new JMenuItem(
1950 MessageManager.getString("label.modify_identity_threshold"));
1951 modifyPID.addActionListener(new ActionListener()
1954 public void actionPerformed(ActionEvent e)
1956 modifyPID_actionPerformed();
1959 modifyConservation = new JMenuItem(MessageManager
1960 .getString("label.modify_conservation_threshold"));
1961 modifyConservation.addActionListener(new ActionListener()
1964 public void actionPerformed(ActionEvent e)
1966 modifyConservation_actionPerformed();
1970 annotationColour = new JMenuItem(
1971 MessageManager.getString("action.by_annotation"));
1972 annotationColour.addActionListener(new ActionListener()
1975 public void actionPerformed(ActionEvent e)
1977 annotationColour_actionPerformed();
1982 protected void selectHighlightedColumns_actionPerformed(
1983 ActionEvent actionEvent)
1985 // TODO Auto-generated method stub
1990 * Generate the reverse sequence (or reverse complement if the flag is true)
1991 * and add it to the alignment
1995 protected void showReverse_actionPerformed(boolean complement)
2000 * Try to run script in a Groovy console, having first ensured that this
2001 * alignframe is set as currentAlignFrame in Desktop
2003 protected void runGroovy_actionPerformed()
2009 * Adds the given action listener and key accelerator to the given menu item.
2010 * Also saves in a lookup table to support lookup of action by key stroke.
2014 * @param actionListener
2016 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2017 JMenuItem menuItem, ActionListener actionListener)
2019 menuItem.setAccelerator(keyStroke);
2020 accelerators.put(keyStroke, menuItem);
2021 menuItem.addActionListener(actionListener);
2025 * Action on clicking sort annotations by type.
2029 protected void sortAnnotations_actionPerformed()
2034 * Action on clicking Show all annotations.
2036 * @param forSequences
2037 * update sequence-related annotations
2038 * @param forAlignment
2039 * update non-sequence-related annotations
2041 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2042 boolean forAlignment)
2044 setAnnotationsVisibility(true, forSequences, forAlignment);
2048 * Action on clicking Hide all annotations.
2050 * @param forSequences
2051 * update sequence-related annotations
2052 * @param forAlignment
2053 * update non-sequence-related annotations
2055 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2056 boolean forAlignment)
2058 setAnnotationsVisibility(false, forSequences, forAlignment);
2062 * Set the visibility of annotations to true or false. Can act on
2063 * sequence-related annotations, or alignment-related, or both.
2066 * @param forSequences
2067 * update sequence-related annotations
2068 * @param forAlignment
2069 * update non-sequence-related annotations
2071 protected void setAnnotationsVisibility(boolean visible,
2072 boolean forSequences, boolean forAlignment)
2077 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2079 // TODO Auto-generated method stub
2083 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2085 // TODO Auto-generated method stub
2089 protected void showAllhidden_actionPerformed(ActionEvent e)
2091 // TODO Auto-generated method stub
2095 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2097 // TODO Auto-generated method stub
2101 protected void hideAllSelection_actionPerformed(ActionEvent e)
2103 // TODO Auto-generated method stub
2107 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2109 // TODO Auto-generated method stub
2113 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2115 // TODO Auto-generated method stub
2119 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2121 // TODO Auto-generated method stub
2125 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2127 // TODO Auto-generated method stub
2131 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2133 // TODO Auto-generated method stub
2137 protected void showGroupConservation_actionPerformed(ActionEvent e)
2139 // TODO Auto-generated method stub
2143 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2145 // TODO Auto-generated method stub
2149 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2151 // TODO Auto-generated method stub
2155 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2157 // TODO Auto-generated method stub
2161 protected void followHighlight_actionPerformed()
2163 // TODO Auto-generated method stub
2167 protected void showNpFeats_actionPerformed(ActionEvent e)
2169 // TODO Auto-generated method stub
2173 protected void showDbRefs_actionPerformed(ActionEvent e)
2175 // TODO Auto-generated method stub
2179 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2183 protected void buildSortByAnnotationScoresMenu()
2187 protected void extractScores_actionPerformed(ActionEvent e)
2191 protected void outputText_actionPerformed(ActionEvent e)
2195 public void addFromFile_actionPerformed(ActionEvent e)
2200 public void addFromText_actionPerformed(ActionEvent e)
2205 public void addFromURL_actionPerformed(ActionEvent e)
2210 public void exportFeatures_actionPerformed(ActionEvent e)
2215 public void exportAnnotations_actionPerformed(ActionEvent e)
2220 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2224 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2229 protected void closeMenuItem_actionPerformed(boolean b)
2233 protected void redoMenuItem_actionPerformed(ActionEvent e)
2237 protected void undoMenuItem_actionPerformed(ActionEvent e)
2241 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2245 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2249 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2253 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2257 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2261 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2265 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2269 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2273 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2277 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2281 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2285 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2289 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2293 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2297 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2301 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2305 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2309 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2313 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2317 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2321 protected void conservationMenuItem_actionPerformed(boolean selected)
2325 protected void printMenuItem_actionPerformed(ActionEvent e)
2329 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2333 protected void findMenuItem_actionPerformed(ActionEvent e)
2337 protected void abovePIDThreshold_actionPerformed(boolean selected)
2341 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2345 protected void deleteGroups_actionPerformed(ActionEvent e)
2349 protected void createGroup_actionPerformed(ActionEvent e)
2353 protected void unGroup_actionPerformed(ActionEvent e)
2357 protected void copy_actionPerformed(ActionEvent e)
2361 protected void cut_actionPerformed(ActionEvent e)
2365 protected void delete_actionPerformed(ActionEvent e)
2369 protected void pasteNew_actionPerformed(ActionEvent e)
2373 protected void pasteThis_actionPerformed(ActionEvent e)
2377 protected void applyToAllGroups_actionPerformed(boolean selected)
2381 public void createPNG(java.io.File f)
2385 protected void font_actionPerformed(ActionEvent e)
2389 protected void seqLimit_actionPerformed(ActionEvent e)
2393 public void seqDBRef_actionPerformed(ActionEvent e)
2398 public void createEPS(java.io.File f)
2402 public void createSVG(java.io.File f)
2407 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2413 * Template method to handle the 'load T-Coffee scores' menu event.
2415 * Subclasses override this method to provide a custom action.
2420 protected void loadScores_actionPerformed(ActionEvent event)
2425 protected void jpred_actionPerformed(ActionEvent e)
2429 protected void scaleAbove_actionPerformed(ActionEvent e)
2433 protected void scaleLeft_actionPerformed(ActionEvent e)
2437 protected void scaleRight_actionPerformed(ActionEvent e)
2441 protected void modifyPID_actionPerformed()
2445 protected void modifyConservation_actionPerformed()
2449 protected void saveAs_actionPerformed(ActionEvent e)
2453 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2457 public void vamsasStore_actionPerformed(ActionEvent e)
2462 public void vamsasLoad_actionPerformed(ActionEvent e)
2467 public void showTranslation_actionPerformed(ActionEvent e)
2472 public void featureSettings_actionPerformed(ActionEvent e)
2477 public void fetchSequence_actionPerformed(ActionEvent e)
2482 public void smoothFont_actionPerformed(ActionEvent e)
2487 public void annotationColour_actionPerformed()
2491 public void annotationColumn_actionPerformed(ActionEvent e)
2495 public void associatedData_actionPerformed(ActionEvent e)
2500 public void autoCalculate_actionPerformed(ActionEvent e)
2505 public void sortByTreeOption_actionPerformed(ActionEvent e)
2510 public void showAllSeqs_actionPerformed(ActionEvent e)
2515 public void showAllColumns_actionPerformed(ActionEvent e)
2520 public void hideSelSequences_actionPerformed(ActionEvent e)
2525 public void hideSelColumns_actionPerformed(ActionEvent e)
2530 public void hiddenMarkers_actionPerformed(ActionEvent e)
2535 public void findPdbId_actionPerformed(ActionEvent e)
2540 public void enterPdbId_actionPerformed(ActionEvent e)
2545 public void pdbFile_actionPerformed(ActionEvent e)
2550 public void invertColSel_actionPerformed(ActionEvent e)
2555 public void tabSelectionChanged(int sel)
2560 public void tabbedPane_mousePressed(MouseEvent e)
2565 public void tabbedPane_focusGained(FocusEvent e)
2570 public void save_actionPerformed(ActionEvent e)
2575 public void reload_actionPerformed(ActionEvent e)
2580 public void newView_actionPerformed(ActionEvent e)
2585 public void textColour_actionPerformed()
2590 public void idRightAlign_actionPerformed(ActionEvent e)
2595 public void expandViews_actionPerformed(ActionEvent e)
2600 public void gatherViews_actionPerformed(ActionEvent e)
2605 public void buildTreeSortMenu()
2610 public void pageSetup_actionPerformed(ActionEvent e)
2615 public void alignmentProperties()
2620 protected void expand_newalign(ActionEvent e)
2622 // TODO Auto-generated method stub
2626 protected boolean isShowAutoCalculatedAbove()
2628 return showAutoCalculatedAbove;
2631 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2633 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2636 protected SequenceAnnotationOrder getAnnotationSortOrder()
2638 return annotationSortOrder;
2641 protected void setAnnotationSortOrder(
2642 SequenceAnnotationOrder annotationSortOrder)
2644 this.annotationSortOrder = annotationSortOrder;
2647 public Map<KeyStroke, JMenuItem> getAccelerators()
2649 return this.accelerators;
2653 * Returns the selected index of the tabbed pane, or -1 if none selected
2654 * (including the case where the tabbed pane has not been made visible).
2658 public int getTabIndex()
2660 return tabbedPane.getSelectedIndex();
2663 public JPanel getStatusPanel()
2669 * Sets a reference to the containing split frame. Also makes the 'toggle
2670 * split view' menu item visible and checked.
2674 public void setSplitFrame(SplitContainerI sf)
2676 this.splitFrame = sf;
2679 this.showComplementMenuItem.setVisible(true);
2680 this.showComplementMenuItem.setState(true);
2684 public SplitContainerI getSplitViewContainer()
2686 return this.splitFrame;
2689 protected void showComplement_actionPerformed(boolean complement)