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 JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
152 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
154 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
156 protected JPanel statusPanel = new JPanel();
158 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
160 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
162 protected JMenuItem showAllAlAnnotations = new JMenuItem();
164 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
166 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
168 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
170 protected JTabbedPane tabbedPane = new JTabbedPane();
172 protected JMenuItem reload = new JMenuItem();
174 protected JMenu formatMenu = new JMenu();
176 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
178 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
180 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
182 protected JMenuItem gatherViews = new JMenuItem();
184 protected JMenuItem expandViews = new JMenuItem();
186 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
188 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
190 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
192 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
194 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
196 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
198 private SequenceAnnotationOrder annotationSortOrder;
200 private boolean showAutoCalculatedAbove = false;
202 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<KeyStroke, JMenuItem>();
204 private SplitContainerI splitFrame;
211 setJMenuBar(alignFrameMenuBar);
213 // dynamically fill save as menu with available formats
214 for (String ff : FileFormats.getInstance().getWritableFormats(true))
216 JMenuItem item = new JMenuItem(ff);
218 item.addActionListener(new ActionListener()
221 public void actionPerformed(ActionEvent e)
223 outputText_actionPerformed(e);
227 outputTextboxMenu.add(item);
229 } catch (Exception e)
231 System.err.println(e.toString());
234 if (!Platform.isAMac())
236 closeMenuItem.setMnemonic('C');
237 outputTextboxMenu.setMnemonic('T');
238 undoMenuItem.setMnemonic('Z');
239 redoMenuItem.setMnemonic('0');
240 copy.setMnemonic('C');
241 cut.setMnemonic('U');
242 pasteMenu.setMnemonic('P');
243 reload.setMnemonic('R');
247 private void jbInit() throws Exception
251 JMenuItem saveAs = new JMenuItem(
252 MessageManager.getString("action.save_as"));
253 ActionListener al = new ActionListener()
256 public void actionPerformed(ActionEvent e)
258 saveAs_actionPerformed(e);
262 // FIXME getDefaultToolkit throws an exception in Headless mode
263 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, Toolkit
264 .getDefaultToolkit().getMenuShortcutKeyMask()
265 | KeyEvent.SHIFT_MASK, false);
266 addMenuActionAndAccelerator(keyStroke, saveAs, al);
268 closeMenuItem.setText(MessageManager.getString("action.close"));
269 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W, Toolkit
270 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
271 al = new ActionListener()
274 public void actionPerformed(ActionEvent e)
276 closeMenuItem_actionPerformed(false);
279 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
281 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
282 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
283 JMenu annotationsMenu = new JMenu(
284 MessageManager.getString("action.annotations"));
285 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
286 colourMenu.setText(MessageManager.getString("action.colour"));
287 JMenu calculateMenu = new JMenu(
288 MessageManager.getString("action.calculate"));
289 webService.setText(MessageManager.getString("action.web_service"));
290 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
291 MessageManager.getString("action.select_all"));
292 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A, Toolkit
293 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
294 al = new ActionListener()
297 public void actionPerformed(ActionEvent e)
299 selectAllSequenceMenuItem_actionPerformed(e);
302 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
304 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
305 MessageManager.getString("action.deselect_all"));
306 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
307 al = new ActionListener()
310 public void actionPerformed(ActionEvent e)
312 deselectAllSequenceMenuItem_actionPerformed(e);
315 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
317 JMenuItem invertSequenceMenuItem = new JMenuItem(
318 MessageManager.getString("action.invert_sequence_selection"));
319 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I, Toolkit
320 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
321 al = new ActionListener()
324 public void actionPerformed(ActionEvent e)
326 invertSequenceMenuItem_actionPerformed(e);
329 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
331 JMenuItem grpsFromSelection = new JMenuItem(
332 MessageManager.getString("action.make_groups_selection"));
333 grpsFromSelection.addActionListener(new ActionListener()
336 public void actionPerformed(ActionEvent e)
338 makeGrpsFromSelection_actionPerformed(e);
341 JMenuItem expandAlignment = new JMenuItem(
342 MessageManager.getString("action.view_flanking_regions"));
343 expandAlignment.setToolTipText(MessageManager
344 .getString("label.view_flanking_regions"));
345 expandAlignment.addActionListener(new ActionListener()
348 public void actionPerformed(ActionEvent e)
353 JMenuItem remove2LeftMenuItem = new JMenuItem(
354 MessageManager.getString("action.remove_left"));
355 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L, Toolkit
356 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
357 al = new ActionListener()
360 public void actionPerformed(ActionEvent e)
362 remove2LeftMenuItem_actionPerformed(e);
365 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
367 JMenuItem remove2RightMenuItem = new JMenuItem(
368 MessageManager.getString("action.remove_right"));
369 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R, Toolkit
370 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
371 al = new ActionListener()
374 public void actionPerformed(ActionEvent e)
376 remove2RightMenuItem_actionPerformed(e);
379 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
381 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
382 MessageManager.getString("action.remove_empty_columns"));
383 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E, Toolkit
384 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
385 al = new ActionListener()
388 public void actionPerformed(ActionEvent e)
390 removeGappedColumnMenuItem_actionPerformed(e);
393 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
395 JMenuItem removeAllGapsMenuItem = new JMenuItem(
396 MessageManager.getString("action.remove_all_gaps"));
397 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E, Toolkit
398 .getDefaultToolkit().getMenuShortcutKeyMask()
399 | KeyEvent.SHIFT_MASK, false);
400 al = new ActionListener()
403 public void actionPerformed(ActionEvent e)
405 removeAllGapsMenuItem_actionPerformed(e);
408 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
410 JMenuItem justifyLeftMenuItem = new JMenuItem(
411 MessageManager.getString("action.left_justify_alignment"));
412 justifyLeftMenuItem.addActionListener(new ActionListener()
415 public void actionPerformed(ActionEvent e)
417 justifyLeftMenuItem_actionPerformed(e);
420 JMenuItem justifyRightMenuItem = new JMenuItem(
421 MessageManager.getString("action.right_justify_alignment"));
422 justifyRightMenuItem.addActionListener(new ActionListener()
425 public void actionPerformed(ActionEvent e)
427 justifyRightMenuItem_actionPerformed(e);
430 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
431 viewBoxesMenuItem.setState(true);
432 viewBoxesMenuItem.addActionListener(new ActionListener()
435 public void actionPerformed(ActionEvent e)
437 viewBoxesMenuItem_actionPerformed(e);
440 viewTextMenuItem.setText(MessageManager.getString("action.text"));
441 viewTextMenuItem.setState(true);
442 viewTextMenuItem.addActionListener(new ActionListener()
445 public void actionPerformed(ActionEvent e)
447 viewTextMenuItem_actionPerformed(e);
450 showNonconservedMenuItem.setText(MessageManager
451 .getString("label.show_non_conserved"));
452 showNonconservedMenuItem.setState(false);
453 showNonconservedMenuItem.addActionListener(new ActionListener()
456 public void actionPerformed(ActionEvent e)
458 showUnconservedMenuItem_actionPerformed(e);
461 JMenuItem sortPairwiseMenuItem = new JMenuItem(
462 MessageManager.getString("action.by_pairwise_id"));
463 sortPairwiseMenuItem.addActionListener(new ActionListener()
466 public void actionPerformed(ActionEvent e)
468 sortPairwiseMenuItem_actionPerformed(e);
471 JMenuItem sortIDMenuItem = new JMenuItem(
472 MessageManager.getString("action.by_id"));
473 sortIDMenuItem.addActionListener(new ActionListener()
476 public void actionPerformed(ActionEvent e)
478 sortIDMenuItem_actionPerformed(e);
481 JMenuItem sortLengthMenuItem = new JMenuItem(
482 MessageManager.getString("action.by_length"));
483 sortLengthMenuItem.addActionListener(new ActionListener()
486 public void actionPerformed(ActionEvent e)
488 sortLengthMenuItem_actionPerformed(e);
491 JMenuItem sortGroupMenuItem = new JMenuItem(
492 MessageManager.getString("action.by_group"));
493 sortGroupMenuItem.addActionListener(new ActionListener()
496 public void actionPerformed(ActionEvent e)
498 sortGroupMenuItem_actionPerformed(e);
502 JMenuItem removeRedundancyMenuItem = new JMenuItem(
503 MessageManager.getString("action.remove_redundancy"));
504 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D, Toolkit
505 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
506 al = new ActionListener()
509 public void actionPerformed(ActionEvent e)
511 removeRedundancyMenuItem_actionPerformed(e);
514 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
516 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
517 MessageManager.getString("action.pairwise_alignment"));
518 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
521 public void actionPerformed(ActionEvent e)
523 pairwiseAlignmentMenuItem_actionPerformed(e);
527 this.getContentPane().setLayout(new BorderLayout());
528 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
529 statusBar.setBackground(Color.white);
530 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
531 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
532 statusBar.setText(MessageManager.getString("label.status_bar"));
533 outputTextboxMenu.setText(MessageManager
534 .getString("label.out_to_textbox"));
536 annotationPanelMenuItem.setActionCommand("");
537 annotationPanelMenuItem.setText(MessageManager
538 .getString("label.show_annotations"));
539 annotationPanelMenuItem.setState(Cache.getDefault("SHOW_ANNOTATIONS",
541 annotationPanelMenuItem.addActionListener(new ActionListener()
544 public void actionPerformed(ActionEvent e)
546 annotationPanelMenuItem_actionPerformed(e);
549 showAllAlAnnotations.setText(MessageManager
550 .getString("label.show_all_al_annotations"));
551 final boolean isAnnotationPanelShown = annotationPanelMenuItem
553 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
554 showAllAlAnnotations.addActionListener(new ActionListener()
557 public void actionPerformed(ActionEvent e)
559 showAllAnnotations_actionPerformed(false, true);
562 hideAllAlAnnotations.setText(MessageManager
563 .getString("label.hide_all_al_annotations"));
564 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
565 hideAllAlAnnotations.addActionListener(new ActionListener()
568 public void actionPerformed(ActionEvent e)
570 hideAllAnnotations_actionPerformed(false, true);
573 showAllSeqAnnotations.setText(MessageManager
574 .getString("label.show_all_seq_annotations"));
575 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
576 showAllSeqAnnotations.addActionListener(new ActionListener()
579 public void actionPerformed(ActionEvent e)
581 showAllAnnotations_actionPerformed(true, false);
584 hideAllSeqAnnotations.setText(MessageManager
585 .getString("label.hide_all_seq_annotations"));
586 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
587 hideAllSeqAnnotations.addActionListener(new ActionListener()
590 public void actionPerformed(ActionEvent e)
592 hideAllAnnotations_actionPerformed(true, false);
595 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
596 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
597 SequenceAnnotationOrder.NONE.name()));
598 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
599 MessageManager.getString("label.sort_annotations_by_sequence"));
600 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
601 MessageManager.getString("label.sort_annotations_by_label"));
604 .setSelected(sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
605 sortAnnBySequence.addActionListener(new ActionListener()
608 public void actionPerformed(ActionEvent e)
610 boolean newState = sortAnnBySequence.getState();
611 sortAnnByLabel.setSelected(false);
612 setAnnotationSortOrder(newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
613 : SequenceAnnotationOrder.NONE);
614 sortAnnotations_actionPerformed();
618 .setSelected(sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
619 sortAnnByLabel.addActionListener(new ActionListener()
622 public void actionPerformed(ActionEvent e)
624 boolean newState = sortAnnByLabel.getState();
625 sortAnnBySequence.setSelected(false);
626 setAnnotationSortOrder(newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
627 : SequenceAnnotationOrder.NONE);
628 sortAnnotations_actionPerformed();
631 colourTextMenuItem = new JCheckBoxMenuItem(
633 .getString("label.colour_text"));
634 colourTextMenuItem.addActionListener(new ActionListener()
637 public void actionPerformed(ActionEvent e)
639 colourTextMenuItem_actionPerformed(e);
643 JMenuItem htmlMenuItem = new JMenuItem(
644 MessageManager.getString("label.html"));
645 htmlMenuItem.addActionListener(new ActionListener()
648 public void actionPerformed(ActionEvent e)
650 htmlMenuItem_actionPerformed(e);
654 JMenuItem createBioJS = new JMenuItem(
655 MessageManager.getString("label.biojs_html_export"));
656 createBioJS.addActionListener(new java.awt.event.ActionListener()
659 public void actionPerformed(ActionEvent e)
661 bioJSMenuItem_actionPerformed(e);
665 JMenuItem overviewMenuItem = new JMenuItem(
666 MessageManager.getString("label.overview_window"));
667 overviewMenuItem.addActionListener(new ActionListener()
670 public void actionPerformed(ActionEvent e)
672 overviewMenuItem_actionPerformed(e);
676 undoMenuItem.setEnabled(false);
677 undoMenuItem.setText(MessageManager.getString("action.undo"));
678 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z, Toolkit
679 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
680 al = new ActionListener()
683 public void actionPerformed(ActionEvent e)
685 undoMenuItem_actionPerformed(e);
688 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
690 redoMenuItem.setEnabled(false);
691 redoMenuItem.setText(MessageManager.getString("action.redo"));
692 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y, Toolkit
693 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
694 al = new ActionListener()
697 public void actionPerformed(ActionEvent e)
699 redoMenuItem_actionPerformed(e);
702 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
704 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
705 wrapMenuItem.addActionListener(new ActionListener()
708 public void actionPerformed(ActionEvent e)
710 wrapMenuItem_actionPerformed(e);
714 JMenuItem printMenuItem = new JMenuItem(
715 MessageManager.getString("action.print"));
716 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P, Toolkit
717 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
718 al = new ActionListener()
721 public void actionPerformed(ActionEvent e)
723 printMenuItem_actionPerformed(e);
726 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
729 .setText(MessageManager.getString("action.show_gaps"));
730 renderGapsMenuItem.setState(true);
731 renderGapsMenuItem.addActionListener(new ActionListener()
734 public void actionPerformed(ActionEvent e)
736 renderGapsMenuItem_actionPerformed(e);
740 JMenuItem findMenuItem = new JMenuItem(
741 MessageManager.getString("action.find"));
742 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F, Toolkit
743 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
744 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
745 MessageManager.getString("label.find_tip")));
746 al = new ActionListener()
749 public void actionPerformed(ActionEvent e)
751 findMenuItem_actionPerformed(e);
754 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
756 showSeqFeatures.setText(MessageManager
757 .getString("label.show_sequence_features"));
758 showSeqFeatures.addActionListener(new ActionListener()
761 public void actionPerformed(ActionEvent actionEvent)
763 showSeqFeatures_actionPerformed(actionEvent);
767 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
768 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
769 * void actionPerformed(ActionEvent actionEvent) {
770 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
772 showDbRefsMenuitem.setText(MessageManager
773 .getString("label.show_database_refs"));
774 showDbRefsMenuitem.addActionListener(new ActionListener()
778 public void actionPerformed(ActionEvent e)
780 showDbRefs_actionPerformed(e);
784 showNpFeatsMenuitem.setText(MessageManager
785 .getString("label.show_non_positional_features"));
786 showNpFeatsMenuitem.addActionListener(new ActionListener()
790 public void actionPerformed(ActionEvent e)
792 showNpFeats_actionPerformed(e);
796 showGroupConservation.setText(MessageManager
797 .getString("label.group_conservation"));
798 showGroupConservation.addActionListener(new ActionListener()
802 public void actionPerformed(ActionEvent e)
804 showGroupConservation_actionPerformed(e);
809 showGroupConsensus.setText(MessageManager
810 .getString("label.group_consensus"));
811 showGroupConsensus.addActionListener(new ActionListener()
815 public void actionPerformed(ActionEvent e)
817 showGroupConsensus_actionPerformed(e);
821 showConsensusHistogram.setText(MessageManager
822 .getString("label.show_consensus_histogram"));
823 showConsensusHistogram.addActionListener(new ActionListener()
827 public void actionPerformed(ActionEvent e)
829 showConsensusHistogram_actionPerformed(e);
833 showSequenceLogo.setText(MessageManager
834 .getString("label.show_consensus_logo"));
835 showSequenceLogo.addActionListener(new ActionListener()
839 public void actionPerformed(ActionEvent e)
841 showSequenceLogo_actionPerformed(e);
845 normaliseSequenceLogo.setText(MessageManager
846 .getString("label.norm_consensus_logo"));
847 normaliseSequenceLogo.addActionListener(new ActionListener()
851 public void actionPerformed(ActionEvent e)
853 normaliseSequenceLogo_actionPerformed(e);
857 applyAutoAnnotationSettings.setText(MessageManager
858 .getString("label.apply_all_groups"));
859 applyAutoAnnotationSettings.setState(false);
860 applyAutoAnnotationSettings.setVisible(true);
861 applyAutoAnnotationSettings.addActionListener(new ActionListener()
864 public void actionPerformed(ActionEvent e)
866 applyAutoAnnotationSettings_actionPerformed(e);
870 ButtonGroup buttonGroup = new ButtonGroup();
871 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
872 MessageManager.getString("label.show_first"));
873 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
874 MessageManager.getString("label.show_last"));
875 buttonGroup.add(showAutoFirst);
876 buttonGroup.add(showAutoLast);
877 final boolean autoFirst = Cache.getDefault(
878 Preferences.SHOW_AUTOCALC_ABOVE, false);
879 showAutoFirst.setSelected(autoFirst);
880 setShowAutoCalculatedAbove(autoFirst);
881 showAutoFirst.addActionListener(new ActionListener()
884 public void actionPerformed(ActionEvent e)
886 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
887 sortAnnotations_actionPerformed();
890 showAutoLast.setSelected(!showAutoFirst.isSelected());
891 showAutoLast.addActionListener(new ActionListener()
894 public void actionPerformed(ActionEvent e)
896 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
897 sortAnnotations_actionPerformed();
901 JMenuItem deleteGroups = new JMenuItem(
902 MessageManager.getString("action.undefine_groups"));
903 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U, Toolkit
904 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
905 al = new ActionListener()
908 public void actionPerformed(ActionEvent e)
910 deleteGroups_actionPerformed(e);
913 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
915 JMenuItem annotationColumn = new JMenuItem(
916 MessageManager.getString("action.select_by_annotation"));
917 annotationColumn.addActionListener(new ActionListener()
920 public void actionPerformed(ActionEvent e)
922 annotationColumn_actionPerformed(e);
926 JMenuItem createGroup = new JMenuItem(
927 MessageManager.getString("action.create_group"));
928 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, Toolkit
929 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
930 al = new ActionListener()
933 public void actionPerformed(ActionEvent e)
935 createGroup_actionPerformed(e);
938 addMenuActionAndAccelerator(keyStroke, createGroup, al);
940 JMenuItem unGroup = new JMenuItem(
941 MessageManager.getString("action.remove_group"));
942 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, Toolkit
943 .getDefaultToolkit().getMenuShortcutKeyMask()
944 | KeyEvent.SHIFT_MASK, false);
945 al = new ActionListener()
948 public void actionPerformed(ActionEvent e)
950 unGroup_actionPerformed(e);
953 addMenuActionAndAccelerator(keyStroke, unGroup, al);
955 copy.setText(MessageManager.getString("action.copy"));
956 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C, Toolkit
957 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
959 al = new ActionListener()
962 public void actionPerformed(ActionEvent e)
964 copy_actionPerformed(e);
967 addMenuActionAndAccelerator(keyStroke, copy, al);
969 cut.setText(MessageManager.getString("action.cut"));
970 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, Toolkit
971 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
972 al = new ActionListener()
975 public void actionPerformed(ActionEvent e)
977 cut_actionPerformed(e);
980 addMenuActionAndAccelerator(keyStroke, cut, al);
982 JMenuItem delete = new JMenuItem(
983 MessageManager.getString("action.delete"));
984 delete.addActionListener(new ActionListener()
987 public void actionPerformed(ActionEvent e)
989 delete_actionPerformed(e);
993 pasteMenu.setText(MessageManager.getString("action.paste"));
994 JMenuItem pasteNew = new JMenuItem(
995 MessageManager.getString("label.to_new_alignment"));
996 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V, Toolkit
997 .getDefaultToolkit().getMenuShortcutKeyMask()
998 | KeyEvent.SHIFT_MASK, false);
999 al = new ActionListener()
1002 public void actionPerformed(ActionEvent e)
1004 pasteNew_actionPerformed(e);
1007 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1009 JMenuItem pasteThis = new JMenuItem(
1010 MessageManager.getString("label.to_this_alignment"));
1011 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V, Toolkit
1012 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1013 al = new ActionListener()
1016 public void actionPerformed(ActionEvent e)
1018 pasteThis_actionPerformed(e);
1021 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1023 JMenuItem createPNG = new JMenuItem("PNG");
1024 createPNG.addActionListener(new ActionListener()
1027 public void actionPerformed(ActionEvent e)
1032 createPNG.setActionCommand(MessageManager
1033 .getString("label.save_png_image"));
1035 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1036 font.addActionListener(new ActionListener()
1039 public void actionPerformed(ActionEvent e)
1041 font_actionPerformed(e);
1044 seqLimits.setText(MessageManager
1045 .getString("label.show_sequence_limits"));
1046 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1047 seqLimits.addActionListener(new ActionListener()
1050 public void actionPerformed(ActionEvent e)
1052 seqLimit_actionPerformed(e);
1055 JMenuItem epsFile = new JMenuItem("EPS");
1056 epsFile.addActionListener(new ActionListener()
1059 public void actionPerformed(ActionEvent e)
1065 JMenuItem createSVG = new JMenuItem("SVG");
1066 createSVG.addActionListener(new ActionListener()
1069 public void actionPerformed(ActionEvent e)
1075 JMenuItem loadTreeMenuItem = new JMenuItem(
1076 MessageManager.getString("label.load_associated_tree"));
1077 loadTreeMenuItem.setActionCommand(MessageManager
1078 .getString("label.load_tree_for_sequence_set"));
1079 loadTreeMenuItem.addActionListener(new ActionListener()
1082 public void actionPerformed(ActionEvent e)
1084 loadTreeMenuItem_actionPerformed(e);
1088 scaleAbove.setVisible(false);
1089 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1090 scaleAbove.addActionListener(new ActionListener()
1093 public void actionPerformed(ActionEvent e)
1095 scaleAbove_actionPerformed(e);
1098 scaleLeft.setVisible(false);
1099 scaleLeft.setSelected(true);
1100 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1101 scaleLeft.addActionListener(new ActionListener()
1104 public void actionPerformed(ActionEvent e)
1106 scaleLeft_actionPerformed(e);
1109 scaleRight.setVisible(false);
1110 scaleRight.setSelected(true);
1111 scaleRight.setText(MessageManager.getString("action.scale_right"));
1112 scaleRight.addActionListener(new ActionListener()
1115 public void actionPerformed(ActionEvent e)
1117 scaleRight_actionPerformed(e);
1120 centreColumnLabelsMenuItem.setVisible(true);
1121 centreColumnLabelsMenuItem.setState(false);
1122 centreColumnLabelsMenuItem.setText(MessageManager
1123 .getString("label.centre_column_labels"));
1124 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1127 public void actionPerformed(ActionEvent e)
1129 centreColumnLabels_actionPerformed(e);
1132 followHighlightMenuItem.setVisible(true);
1133 followHighlightMenuItem.setState(true);
1134 followHighlightMenuItem.setText(MessageManager
1135 .getString("label.automatic_scrolling"));
1136 followHighlightMenuItem.addActionListener(new ActionListener()
1140 public void actionPerformed(ActionEvent e)
1142 followHighlight_actionPerformed();
1148 .setText(MessageManager.getString("action.by_tree_order"));
1149 sort.setText(MessageManager.getString("action.sort"));
1150 sort.addMenuListener(new MenuListener()
1153 public void menuSelected(MenuEvent e)
1155 buildTreeSortMenu();
1159 public void menuDeselected(MenuEvent e)
1164 public void menuCanceled(MenuEvent e)
1168 sortByAnnotScore.setText(MessageManager
1169 .getString("label.sort_by_score"));
1170 sort.add(sortByAnnotScore);
1171 sort.addMenuListener(new javax.swing.event.MenuListener()
1175 public void menuCanceled(MenuEvent e)
1180 public void menuDeselected(MenuEvent e)
1185 public void menuSelected(MenuEvent e)
1187 buildSortByAnnotationScoresMenu();
1190 sortByAnnotScore.setVisible(false);
1192 calculateTree.setText(MessageManager
1193 .getString("action.calculate_tree_pca"));
1195 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1196 padGapsMenuitem.setState(jalview.bin.Cache
1197 .getDefault("PAD_GAPS", false));
1198 padGapsMenuitem.addActionListener(new ActionListener()
1201 public void actionPerformed(ActionEvent e)
1203 padGapsMenuitem_actionPerformed(e);
1206 JMenuItem vamsasStore = new JMenuItem(
1207 MessageManager.getString("label.vamsas_store"));
1208 vamsasStore.setVisible(false);
1209 vamsasStore.addActionListener(new ActionListener()
1212 public void actionPerformed(ActionEvent e)
1214 vamsasStore_actionPerformed(e);
1217 showTranslation.setText(MessageManager
1218 .getString("label.translate_cDNA"));
1219 showTranslation.addActionListener(new ActionListener()
1222 public void actionPerformed(ActionEvent e)
1224 showTranslation_actionPerformed(e);
1227 showReverse.setText(MessageManager.getString("label.reverse"));
1228 showReverse.addActionListener(new ActionListener()
1231 public void actionPerformed(ActionEvent e)
1233 showReverse_actionPerformed(false);
1236 showReverseComplement.setText(MessageManager
1237 .getString("label.reverse_complement"));
1238 showReverseComplement.addActionListener(new ActionListener()
1241 public void actionPerformed(ActionEvent e)
1243 showReverse_actionPerformed(true);
1247 JMenuItem extractScores = new JMenuItem(
1248 MessageManager.getString("label.extract_scores"));
1249 extractScores.addActionListener(new ActionListener()
1252 public void actionPerformed(ActionEvent e)
1254 extractScores_actionPerformed(e);
1257 extractScores.setVisible(true);
1258 // JBPNote: TODO: make gui for regex based score extraction
1260 // for show products actions see AlignFrame.canShowProducts
1261 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1263 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1264 runGroovy.setToolTipText(MessageManager
1265 .getString("label.run_groovy_tip"));
1266 runGroovy.addActionListener(new ActionListener()
1269 public void actionPerformed(ActionEvent e)
1271 runGroovy_actionPerformed();
1275 JMenuItem openFeatureSettings = new JMenuItem(
1276 MessageManager.getString("action.feature_settings"));
1277 openFeatureSettings.addActionListener(new ActionListener()
1280 public void actionPerformed(ActionEvent e)
1282 featureSettings_actionPerformed(e);
1285 JMenuItem fetchSequence = new JMenuItem(
1286 MessageManager.getString("label.fetch_sequences"));
1287 fetchSequence.addActionListener(new ActionListener()
1290 public void actionPerformed(ActionEvent e)
1292 fetchSequence_actionPerformed(e);
1296 JMenuItem associatedData = new JMenuItem(
1297 MessageManager.getString("label.load_features_annotations"));
1298 associatedData.addActionListener(new ActionListener()
1301 public void actionPerformed(ActionEvent e)
1303 associatedData_actionPerformed(e);
1306 autoCalculate.setText(MessageManager
1307 .getString("label.autocalculate_consensus"));
1308 autoCalculate.setState(jalview.bin.Cache.getDefault(
1309 "AUTO_CALC_CONSENSUS", true));
1310 autoCalculate.addActionListener(new ActionListener()
1313 public void actionPerformed(ActionEvent e)
1315 autoCalculate_actionPerformed(e);
1318 sortByTree.setText(MessageManager
1319 .getString("label.sort_alignment_new_tree"));
1321 .setToolTipText("<html>"
1323 .getString("label.enable_automatically_sort_alignment_when_open_new_tree"));
1325 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1326 sortByTree.addActionListener(new ActionListener()
1329 public void actionPerformed(ActionEvent e)
1331 sortByTreeOption_actionPerformed(e);
1335 listenToViewSelections.setText(MessageManager
1336 .getString("label.listen_for_selections"));
1337 listenToViewSelections
1338 .setToolTipText("<html>"
1340 .getString("label.selections_mirror_selections_made_same_sequences_other_views"));
1341 listenToViewSelections.setState(false);
1342 listenToViewSelections.addActionListener(new ActionListener()
1345 public void actionPerformed(ActionEvent e)
1347 listenToViewSelections_actionPerformed(e);
1351 JMenu addSequenceMenu = new JMenu(
1352 MessageManager.getString("label.add_sequences"));
1353 JMenuItem addFromFile = new JMenuItem(
1354 MessageManager.getString("label.from_file"));
1355 addFromFile.addActionListener(new ActionListener()
1358 public void actionPerformed(ActionEvent e)
1360 addFromFile_actionPerformed(e);
1363 JMenuItem addFromText = new JMenuItem(
1364 MessageManager.getString("label.from_textbox"));
1365 addFromText.addActionListener(new ActionListener()
1368 public void actionPerformed(ActionEvent e)
1370 addFromText_actionPerformed(e);
1373 JMenuItem addFromURL = new JMenuItem(
1374 MessageManager.getString("label.from_url"));
1375 addFromURL.addActionListener(new ActionListener()
1378 public void actionPerformed(ActionEvent e)
1380 addFromURL_actionPerformed(e);
1383 JMenuItem exportFeatures = new JMenuItem(
1384 MessageManager.getString("label.export_features"));
1385 exportFeatures.addActionListener(new ActionListener()
1388 public void actionPerformed(ActionEvent e)
1390 exportFeatures_actionPerformed(e);
1393 JMenuItem exportAnnotations = new JMenuItem(
1394 MessageManager.getString("label.export_annotations"));
1395 exportAnnotations.addActionListener(new ActionListener()
1398 public void actionPerformed(ActionEvent e)
1400 exportAnnotations_actionPerformed(e);
1403 statusPanel.setLayout(new GridLayout());
1404 JMenuItem showAllSeqs = new JMenuItem(
1405 MessageManager.getString("label.all_sequences"));
1406 showAllSeqs.setToolTipText(MessageManager
1407 .getString("label.toggle_sequence_visibility"));
1408 showAllSeqs.addActionListener(new ActionListener()
1411 public void actionPerformed(ActionEvent e)
1413 showAllSeqs_actionPerformed(e);
1416 JMenuItem showAllColumns = new JMenuItem(
1417 MessageManager.getString("label.all_columns"));
1418 showAllColumns.setToolTipText(MessageManager
1419 .getString("label.toggle_columns_visibility"));
1420 showAllColumns.addActionListener(new ActionListener()
1423 public void actionPerformed(ActionEvent e)
1425 showAllColumns_actionPerformed(e);
1428 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1429 JMenuItem hideSelSequences = new JMenuItem(
1430 MessageManager.getString("label.selected_sequences"));
1431 hideSelSequences.setToolTipText(MessageManager
1432 .getString("label.toggle_sequence_visibility"));
1433 hideSelSequences.addActionListener(new ActionListener()
1436 public void actionPerformed(ActionEvent e)
1438 hideSelSequences_actionPerformed(e);
1441 JMenuItem hideSelColumns = new JMenuItem(
1442 MessageManager.getString("label.selected_columns"));
1443 hideSelColumns.setToolTipText(MessageManager
1444 .getString("label.toggle_columns_visibility"));
1445 hideSelColumns.addActionListener(new ActionListener()
1448 public void actionPerformed(ActionEvent e)
1450 hideSelColumns_actionPerformed(e);
1453 JMenuItem hideAllSelection = new JMenuItem(
1454 MessageManager.getString("label.selected_region"));
1455 hideAllSelection.addActionListener(new ActionListener()
1458 public void actionPerformed(ActionEvent e)
1460 hideAllSelection_actionPerformed(e);
1463 // TODO: should be hidden if no selection exists.
1464 JMenuItem hideAllButSelection = new JMenuItem(
1465 MessageManager.getString("label.all_but_selected_region"));
1466 hideAllButSelection.addActionListener(new ActionListener()
1469 public void actionPerformed(ActionEvent e)
1471 hideAllButSelection_actionPerformed(e);
1474 JMenuItem showAllhidden = new JMenuItem(
1475 MessageManager.getString("label.all_sequences_columns"));
1476 showAllhidden.setToolTipText(MessageManager
1477 .getString("label.toggles_visibility_hidden_selected_regions"));
1478 showAllhidden.addActionListener(new ActionListener()
1481 public void actionPerformed(ActionEvent e)
1483 showAllhidden_actionPerformed(e);
1486 hiddenMarkers.setText(MessageManager
1487 .getString("action.show_hidden_markers"));
1488 hiddenMarkers.addActionListener(new ActionListener()
1491 public void actionPerformed(ActionEvent e)
1493 hiddenMarkers_actionPerformed(e);
1497 JMenuItem invertColSel = new JMenuItem(
1498 MessageManager.getString("action.invert_column_selection"));
1499 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I, Toolkit
1500 .getDefaultToolkit().getMenuShortcutKeyMask()
1501 | KeyEvent.ALT_MASK, false);
1502 al = new ActionListener()
1505 public void actionPerformed(ActionEvent e)
1507 invertColSel_actionPerformed(e);
1510 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1512 showComplementMenuItem.setVisible(false);
1513 showComplementMenuItem.addActionListener(new ActionListener()
1516 public void actionPerformed(ActionEvent e)
1518 showComplement_actionPerformed(showComplementMenuItem.getState());
1522 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1525 public void stateChanged(ChangeEvent evt)
1527 JTabbedPane pane = (JTabbedPane) evt.getSource();
1528 int sel = pane.getSelectedIndex();
1529 tabSelectionChanged(sel);
1532 tabbedPane.addMouseListener(new MouseAdapter()
1535 public void mousePressed(MouseEvent e)
1537 if (e.isPopupTrigger()) // Mac
1539 tabbedPane_mousePressed(e);
1544 public void mouseReleased(MouseEvent e)
1546 if (e.isPopupTrigger()) // Windows
1548 tabbedPane_mousePressed(e);
1552 tabbedPane.addFocusListener(new FocusAdapter()
1555 public void focusGained(FocusEvent e)
1557 tabbedPane_focusGained(e);
1561 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1562 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, Toolkit
1563 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1564 al = new ActionListener()
1567 public void actionPerformed(ActionEvent e)
1569 save_actionPerformed(e);
1572 addMenuActionAndAccelerator(keyStroke, save, al);
1574 reload.setEnabled(false);
1575 reload.setText(MessageManager.getString("action.reload"));
1576 reload.addActionListener(new ActionListener()
1579 public void actionPerformed(ActionEvent e)
1581 reload_actionPerformed(e);
1585 JMenuItem newView = new JMenuItem(
1586 MessageManager.getString("action.new_view"));
1587 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T, Toolkit
1588 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1589 al = new ActionListener()
1592 public void actionPerformed(ActionEvent e)
1594 newView_actionPerformed(e);
1597 addMenuActionAndAccelerator(keyStroke, newView, al);
1599 tabbedPane.setToolTipText("<html><i>"
1600 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1603 formatMenu.setText(MessageManager.getString("action.format"));
1604 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1606 idRightAlign.setText(MessageManager
1607 .getString("label.right_align_sequence_id"));
1608 idRightAlign.addActionListener(new ActionListener()
1611 public void actionPerformed(ActionEvent e)
1613 idRightAlign_actionPerformed(e);
1617 gatherViews.setEnabled(false);
1618 gatherViews.setText(MessageManager.getString("action.gather_views"));
1619 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1620 al = new ActionListener()
1623 public void actionPerformed(ActionEvent e)
1625 gatherViews_actionPerformed(e);
1628 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1630 expandViews.setEnabled(false);
1631 expandViews.setText(MessageManager.getString("action.expand_views"));
1632 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1633 al = new ActionListener()
1636 public void actionPerformed(ActionEvent e)
1638 expandViews_actionPerformed(e);
1641 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1643 JMenuItem pageSetup = new JMenuItem(
1644 MessageManager.getString("action.page_setup"));
1645 pageSetup.addActionListener(new ActionListener()
1648 public void actionPerformed(ActionEvent e)
1650 pageSetup_actionPerformed(e);
1653 JMenuItem alignmentProperties = new JMenuItem(
1654 MessageManager.getString("label.alignment_props"));
1655 alignmentProperties.addActionListener(new ActionListener()
1658 public void actionPerformed(ActionEvent actionEvent)
1660 alignmentProperties();
1663 JMenuItem selectHighlighted = new JMenuItem(
1664 MessageManager.getString("action.select_highlighted_columns"));
1665 selectHighlighted.setToolTipText(MessageManager
1666 .getString("tooltip.select_highlighted_columns"));
1667 al = new ActionListener()
1670 public void actionPerformed(ActionEvent actionEvent)
1672 selectHighlightedColumns_actionPerformed(actionEvent);
1675 selectHighlighted.addActionListener(al);
1676 JMenu tooltipSettingsMenu = new JMenu(
1677 MessageManager.getString("label.sequence_id_tooltip"));
1678 JMenu autoAnnMenu = new JMenu(
1679 MessageManager.getString("label.autocalculated_annotation"));
1681 JMenu exportImageMenu = new JMenu(
1682 MessageManager.getString("label.export_image"));
1683 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1684 alignFrameMenuBar.add(fileMenu);
1685 alignFrameMenuBar.add(editMenu);
1686 alignFrameMenuBar.add(selectMenu);
1687 alignFrameMenuBar.add(viewMenu);
1688 alignFrameMenuBar.add(annotationsMenu);
1689 alignFrameMenuBar.add(formatMenu);
1690 alignFrameMenuBar.add(colourMenu);
1691 alignFrameMenuBar.add(calculateMenu);
1692 alignFrameMenuBar.add(webService);
1694 fileMenu.add(fetchSequence);
1695 fileMenu.add(addSequenceMenu);
1696 fileMenu.add(reload);
1697 fileMenu.addSeparator();
1698 fileMenu.add(vamsasStore);
1700 fileMenu.add(saveAs);
1701 fileMenu.add(outputTextboxMenu);
1702 fileMenu.add(pageSetup);
1703 fileMenu.add(printMenuItem);
1704 fileMenu.addSeparator();
1705 fileMenu.add(exportImageMenu);
1706 fileMenu.add(exportFeatures);
1707 fileMenu.add(exportAnnotations);
1708 fileMenu.add(loadTreeMenuItem);
1709 fileMenu.add(associatedData);
1710 fileMenu.addSeparator();
1711 fileMenu.add(closeMenuItem);
1713 pasteMenu.add(pasteNew);
1714 pasteMenu.add(pasteThis);
1715 editMenu.add(undoMenuItem);
1716 editMenu.add(redoMenuItem);
1719 editMenu.add(pasteMenu);
1720 editMenu.add(delete);
1721 editMenu.addSeparator();
1722 editMenu.add(remove2LeftMenuItem);
1723 editMenu.add(remove2RightMenuItem);
1724 editMenu.add(removeGappedColumnMenuItem);
1725 editMenu.add(removeAllGapsMenuItem);
1726 editMenu.add(removeRedundancyMenuItem);
1727 editMenu.addSeparator();
1728 // dont add these yet in the CVS build - they cannot be undone!
1729 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1730 // editMenu.add(justifyLeftMenuItem);
1731 // editMenu.add(justifyRightMenuItem);
1732 // editMenu.addSeparator();
1733 editMenu.add(padGapsMenuitem);
1735 showMenu.add(showAllColumns);
1736 showMenu.add(showAllSeqs);
1737 showMenu.add(showAllhidden);
1738 hideMenu.add(hideSelColumns);
1739 hideMenu.add(hideSelSequences);
1740 hideMenu.add(hideAllSelection);
1741 hideMenu.add(hideAllButSelection);
1742 viewMenu.add(newView);
1743 viewMenu.add(expandViews);
1744 viewMenu.add(gatherViews);
1745 viewMenu.addSeparator();
1746 viewMenu.add(showMenu);
1747 viewMenu.add(hideMenu);
1748 viewMenu.add(showComplementMenuItem);
1749 viewMenu.addSeparator();
1750 viewMenu.add(followHighlightMenuItem);
1751 viewMenu.addSeparator();
1752 viewMenu.add(showSeqFeatures);
1753 // viewMenu.add(showSeqFeaturesHeight);
1754 viewMenu.add(openFeatureSettings);
1755 tooltipSettingsMenu.add(showDbRefsMenuitem);
1756 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1757 viewMenu.add(tooltipSettingsMenu);
1758 viewMenu.addSeparator();
1759 viewMenu.add(alignmentProperties);
1760 viewMenu.addSeparator();
1761 viewMenu.add(overviewMenuItem);
1763 annotationsMenu.add(annotationPanelMenuItem);
1764 annotationsMenu.addSeparator();
1765 annotationsMenu.add(showAllAlAnnotations);
1766 annotationsMenu.add(hideAllAlAnnotations);
1767 annotationsMenu.addSeparator();
1768 annotationsMenu.add(showAllSeqAnnotations);
1769 annotationsMenu.add(hideAllSeqAnnotations);
1770 annotationsMenu.add(sortAnnBySequence);
1771 annotationsMenu.add(sortAnnByLabel);
1772 annotationsMenu.addSeparator();
1773 autoAnnMenu.add(showAutoFirst);
1774 autoAnnMenu.add(showAutoLast);
1775 autoAnnMenu.addSeparator();
1776 autoAnnMenu.add(applyAutoAnnotationSettings);
1777 autoAnnMenu.add(showConsensusHistogram);
1778 autoAnnMenu.add(showSequenceLogo);
1779 autoAnnMenu.add(normaliseSequenceLogo);
1780 autoAnnMenu.addSeparator();
1781 autoAnnMenu.add(showGroupConservation);
1782 autoAnnMenu.add(showGroupConsensus);
1783 annotationsMenu.add(autoAnnMenu);
1786 sort.add(sortIDMenuItem);
1787 sort.add(sortLengthMenuItem);
1788 sort.add(sortGroupMenuItem);
1789 sort.add(sortPairwiseMenuItem);
1790 sort.add(sortByTreeMenu);
1791 calculateMenu.add(sort);
1792 calculateMenu.add(calculateTree);
1793 calculateMenu.addSeparator();
1794 calculateMenu.add(pairwiseAlignmentMenuItem);
1795 calculateMenu.addSeparator();
1796 calculateMenu.add(showTranslation);
1797 calculateMenu.add(showReverse);
1798 calculateMenu.add(showReverseComplement);
1799 calculateMenu.add(showProducts);
1800 calculateMenu.add(autoCalculate);
1801 calculateMenu.add(sortByTree);
1802 calculateMenu.addSeparator();
1803 calculateMenu.add(expandAlignment);
1804 calculateMenu.add(extractScores);
1805 calculateMenu.addSeparator();
1806 calculateMenu.add(runGroovy);
1808 webServiceNoServices = new JMenuItem(
1809 MessageManager.getString("label.no_services"));
1810 webService.add(webServiceNoServices);
1811 exportImageMenu.add(htmlMenuItem);
1812 exportImageMenu.add(epsFile);
1813 exportImageMenu.add(createPNG);
1814 exportImageMenu.add(createBioJS);
1815 exportImageMenu.add(createSVG);
1816 addSequenceMenu.add(addFromFile);
1817 addSequenceMenu.add(addFromText);
1818 addSequenceMenu.add(addFromURL);
1819 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1820 statusPanel.add(statusBar, null);
1821 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1823 formatMenu.add(font);
1824 formatMenu.addSeparator();
1825 formatMenu.add(wrapMenuItem);
1826 formatMenu.add(scaleAbove);
1827 formatMenu.add(scaleLeft);
1828 formatMenu.add(scaleRight);
1829 formatMenu.add(seqLimits);
1830 formatMenu.add(idRightAlign);
1831 formatMenu.add(hiddenMarkers);
1832 formatMenu.add(viewBoxesMenuItem);
1833 formatMenu.add(viewTextMenuItem);
1834 formatMenu.add(colourTextMenuItem);
1835 formatMenu.add(renderGapsMenuItem);
1836 formatMenu.add(centreColumnLabelsMenuItem);
1837 formatMenu.add(showNonconservedMenuItem);
1838 selectMenu.add(findMenuItem);
1839 selectMenu.addSeparator();
1840 selectMenu.add(selectAllSequenceMenuItem);
1841 selectMenu.add(deselectAllSequenceMenuItem);
1842 selectMenu.add(invertSequenceMenuItem);
1843 selectMenu.add(invertColSel);
1844 selectMenu.add(createGroup);
1845 selectMenu.add(unGroup);
1846 selectMenu.add(grpsFromSelection);
1847 selectMenu.add(deleteGroups);
1848 selectMenu.add(annotationColumn);
1849 selectMenu.add(selectHighlighted);
1850 // TODO - determine if the listenToViewSelections button is needed : see bug
1852 // selectMenu.addSeparator();
1853 // selectMenu.add(listenToViewSelections);
1857 * Constructs the entries on the Colour menu (but does not add them to the
1860 protected void initColourMenu()
1862 applyToAllGroups = new JCheckBoxMenuItem(
1863 MessageManager.getString("label.apply_colour_to_all_groups"));
1864 applyToAllGroups.addActionListener(new ActionListener()
1867 public void actionPerformed(ActionEvent e)
1869 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1873 textColour = new JMenuItem(
1874 MessageManager.getString("label.text_colour"));
1875 textColour.addActionListener(new ActionListener()
1878 public void actionPerformed(ActionEvent e)
1880 textColour_actionPerformed();
1884 conservationMenuItem = new JCheckBoxMenuItem(
1885 MessageManager.getString("action.by_conservation"));
1886 conservationMenuItem.addActionListener(new ActionListener()
1889 public void actionPerformed(ActionEvent e)
1891 conservationMenuItem_actionPerformed(conservationMenuItem
1896 abovePIDThreshold = new JCheckBoxMenuItem(
1897 MessageManager.getString("label.above_identity_threshold"));
1898 abovePIDThreshold.addActionListener(new ActionListener()
1901 public void actionPerformed(ActionEvent e)
1903 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
1906 modifyPID = new JMenuItem(
1907 MessageManager.getString("label.modify_identity_threshold"));
1908 modifyPID.addActionListener(new ActionListener()
1911 public void actionPerformed(ActionEvent e)
1913 modifyPID_actionPerformed();
1916 modifyConservation = new JMenuItem(
1918 .getString("label.modify_conservation_threshold"));
1919 modifyConservation.addActionListener(new ActionListener()
1922 public void actionPerformed(ActionEvent e)
1924 modifyConservation_actionPerformed();
1928 annotationColour = new JMenuItem(
1929 MessageManager.getString("action.by_annotation"));
1930 annotationColour.addActionListener(new ActionListener()
1933 public void actionPerformed(ActionEvent e)
1935 annotationColour_actionPerformed();
1940 protected void selectHighlightedColumns_actionPerformed(
1941 ActionEvent actionEvent)
1943 // TODO Auto-generated method stub
1948 * Generate the reverse sequence (or reverse complement if the flag is true)
1949 * and add it to the alignment
1953 protected void showReverse_actionPerformed(boolean complement)
1958 * Try to run script in a Groovy console, having first ensured that this
1959 * alignframe is set as currentAlignFrame in Desktop
1961 protected void runGroovy_actionPerformed()
1967 * Adds the given action listener and key accelerator to the given menu item.
1968 * Also saves in a lookup table to support lookup of action by key stroke.
1972 * @param actionListener
1974 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
1975 JMenuItem menuItem, ActionListener actionListener)
1977 menuItem.setAccelerator(keyStroke);
1978 accelerators.put(keyStroke, menuItem);
1979 menuItem.addActionListener(actionListener);
1983 * Action on clicking sort annotations by type.
1987 protected void sortAnnotations_actionPerformed()
1992 * Action on clicking Show all annotations.
1994 * @param forSequences
1995 * update sequence-related annotations
1996 * @param forAlignment
1997 * update non-sequence-related annotations
1999 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2000 boolean forAlignment)
2002 setAnnotationsVisibility(true, forSequences, forAlignment);
2006 * Action on clicking Hide all annotations.
2008 * @param forSequences
2009 * update sequence-related annotations
2010 * @param forAlignment
2011 * update non-sequence-related annotations
2013 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2014 boolean forAlignment)
2016 setAnnotationsVisibility(false, forSequences, forAlignment);
2020 * Set the visibility of annotations to true or false. Can act on
2021 * sequence-related annotations, or alignment-related, or both.
2024 * @param forSequences
2025 * update sequence-related annotations
2026 * @param forAlignment
2027 * update non-sequence-related annotations
2029 protected void setAnnotationsVisibility(boolean visible,
2030 boolean forSequences, boolean forAlignment)
2035 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2037 // TODO Auto-generated method stub
2041 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2043 // TODO Auto-generated method stub
2047 protected void showAllhidden_actionPerformed(ActionEvent e)
2049 // TODO Auto-generated method stub
2053 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2055 // TODO Auto-generated method stub
2059 protected void hideAllSelection_actionPerformed(ActionEvent e)
2061 // TODO Auto-generated method stub
2065 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2067 // TODO Auto-generated method stub
2071 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2073 // TODO Auto-generated method stub
2077 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2079 // TODO Auto-generated method stub
2083 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2085 // TODO Auto-generated method stub
2089 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2091 // TODO Auto-generated method stub
2095 protected void showGroupConservation_actionPerformed(ActionEvent e)
2097 // TODO Auto-generated method stub
2101 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2103 // TODO Auto-generated method stub
2107 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2109 // TODO Auto-generated method stub
2113 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2115 // TODO Auto-generated method stub
2119 protected void followHighlight_actionPerformed()
2121 // TODO Auto-generated method stub
2125 protected void showNpFeats_actionPerformed(ActionEvent e)
2127 // TODO Auto-generated method stub
2131 protected void showDbRefs_actionPerformed(ActionEvent e)
2133 // TODO Auto-generated method stub
2137 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2141 protected void buildSortByAnnotationScoresMenu()
2145 protected void extractScores_actionPerformed(ActionEvent e)
2149 protected void outputText_actionPerformed(ActionEvent e)
2153 public void addFromFile_actionPerformed(ActionEvent e)
2158 public void addFromText_actionPerformed(ActionEvent e)
2163 public void addFromURL_actionPerformed(ActionEvent e)
2168 public void exportFeatures_actionPerformed(ActionEvent e)
2173 public void exportAnnotations_actionPerformed(ActionEvent e)
2178 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2182 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2187 protected void closeMenuItem_actionPerformed(boolean b)
2191 protected void redoMenuItem_actionPerformed(ActionEvent e)
2195 protected void undoMenuItem_actionPerformed(ActionEvent e)
2199 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2203 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2207 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2211 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2215 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2219 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2223 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2227 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2231 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2235 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2239 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2243 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2247 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2251 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2255 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2259 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2263 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2267 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2271 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2275 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2279 protected void conservationMenuItem_actionPerformed(boolean selected)
2283 protected void printMenuItem_actionPerformed(ActionEvent e)
2287 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2291 protected void findMenuItem_actionPerformed(ActionEvent e)
2295 protected void abovePIDThreshold_actionPerformed(boolean selected)
2299 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2303 protected void deleteGroups_actionPerformed(ActionEvent e)
2307 protected void createGroup_actionPerformed(ActionEvent e)
2311 protected void unGroup_actionPerformed(ActionEvent e)
2315 protected void copy_actionPerformed(ActionEvent e)
2319 protected void cut_actionPerformed(ActionEvent e)
2323 protected void delete_actionPerformed(ActionEvent e)
2327 protected void pasteNew_actionPerformed(ActionEvent e)
2331 protected void pasteThis_actionPerformed(ActionEvent e)
2335 protected void applyToAllGroups_actionPerformed(boolean selected)
2339 public void createPNG(java.io.File f)
2343 protected void font_actionPerformed(ActionEvent e)
2347 protected void seqLimit_actionPerformed(ActionEvent e)
2351 public void seqDBRef_actionPerformed(ActionEvent e)
2356 public void createEPS(java.io.File f)
2360 public void createSVG(java.io.File f)
2365 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2371 * Template method to handle the 'load T-Coffee scores' menu event.
2373 * Subclasses override this method to provide a custom action.
2378 protected void loadScores_actionPerformed(ActionEvent event)
2383 protected void jpred_actionPerformed(ActionEvent e)
2387 protected void scaleAbove_actionPerformed(ActionEvent e)
2391 protected void scaleLeft_actionPerformed(ActionEvent e)
2395 protected void scaleRight_actionPerformed(ActionEvent e)
2399 protected void modifyPID_actionPerformed()
2403 protected void modifyConservation_actionPerformed()
2407 protected void saveAs_actionPerformed(ActionEvent e)
2411 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2415 public void vamsasStore_actionPerformed(ActionEvent e)
2420 public void vamsasLoad_actionPerformed(ActionEvent e)
2425 public void showTranslation_actionPerformed(ActionEvent e)
2430 public void featureSettings_actionPerformed(ActionEvent e)
2435 public void fetchSequence_actionPerformed(ActionEvent e)
2440 public void smoothFont_actionPerformed(ActionEvent e)
2445 public void annotationColour_actionPerformed()
2449 public void annotationColumn_actionPerformed(ActionEvent e)
2453 public void associatedData_actionPerformed(ActionEvent e)
2458 public void autoCalculate_actionPerformed(ActionEvent e)
2463 public void sortByTreeOption_actionPerformed(ActionEvent e)
2468 public void showAllSeqs_actionPerformed(ActionEvent e)
2473 public void showAllColumns_actionPerformed(ActionEvent e)
2478 public void hideSelSequences_actionPerformed(ActionEvent e)
2483 public void hideSelColumns_actionPerformed(ActionEvent e)
2488 public void hiddenMarkers_actionPerformed(ActionEvent e)
2493 public void findPdbId_actionPerformed(ActionEvent e)
2498 public void enterPdbId_actionPerformed(ActionEvent e)
2503 public void pdbFile_actionPerformed(ActionEvent e)
2508 public void invertColSel_actionPerformed(ActionEvent e)
2513 public void tabSelectionChanged(int sel)
2518 public void tabbedPane_mousePressed(MouseEvent e)
2523 public void tabbedPane_focusGained(FocusEvent e)
2528 public void save_actionPerformed(ActionEvent e)
2533 public void reload_actionPerformed(ActionEvent e)
2538 public void newView_actionPerformed(ActionEvent e)
2543 public void textColour_actionPerformed()
2548 public void idRightAlign_actionPerformed(ActionEvent e)
2553 public void expandViews_actionPerformed(ActionEvent e)
2558 public void gatherViews_actionPerformed(ActionEvent e)
2563 public void buildTreeSortMenu()
2568 public void pageSetup_actionPerformed(ActionEvent e)
2573 public void alignmentProperties()
2578 protected void expand_newalign(ActionEvent e)
2580 // TODO Auto-generated method stub
2584 protected boolean isShowAutoCalculatedAbove()
2586 return showAutoCalculatedAbove;
2589 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2591 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2594 protected SequenceAnnotationOrder getAnnotationSortOrder()
2596 return annotationSortOrder;
2599 protected void setAnnotationSortOrder(
2600 SequenceAnnotationOrder annotationSortOrder)
2602 this.annotationSortOrder = annotationSortOrder;
2605 public Map<KeyStroke, JMenuItem> getAccelerators()
2607 return this.accelerators;
2611 * Returns the selected index of the tabbed pane, or -1 if none selected
2612 * (including the case where the tabbed pane has not been made visible).
2616 public int getTabIndex()
2618 return tabbedPane.getSelectedIndex();
2621 public JPanel getStatusPanel()
2627 * Sets a reference to the containing split frame. Also makes the 'toggle
2628 * split view' menu item visible and checked.
2632 public void setSplitFrame(SplitContainerI sf)
2634 this.splitFrame = sf;
2637 this.showComplementMenuItem.setVisible(true);
2638 this.showComplementMenuItem.setState(true);
2642 public SplitContainerI getSplitViewContainer()
2644 return this.splitFrame;
2647 protected void showComplement_actionPerformed(boolean complement)