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 JRadioButtonMenuItem 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);
526 JMenuItem PCAMenuItem = new JMenuItem(
527 MessageManager.getString("label.principal_component_analysis"));
528 PCAMenuItem.addActionListener(new ActionListener()
531 public void actionPerformed(ActionEvent e)
533 PCAMenuItem_actionPerformed(e);
537 this.getContentPane().setLayout(new BorderLayout());
538 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
539 statusBar.setBackground(Color.white);
540 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
541 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
542 statusBar.setText(MessageManager.getString("label.status_bar"));
543 outputTextboxMenu.setText(MessageManager
544 .getString("label.out_to_textbox"));
546 annotationPanelMenuItem.setActionCommand("");
547 annotationPanelMenuItem.setText(MessageManager
548 .getString("label.show_annotations"));
549 annotationPanelMenuItem.setState(Cache.getDefault("SHOW_ANNOTATIONS",
551 annotationPanelMenuItem.addActionListener(new ActionListener()
554 public void actionPerformed(ActionEvent e)
556 annotationPanelMenuItem_actionPerformed(e);
559 showAllAlAnnotations.setText(MessageManager
560 .getString("label.show_all_al_annotations"));
561 final boolean isAnnotationPanelShown = annotationPanelMenuItem
563 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
564 showAllAlAnnotations.addActionListener(new ActionListener()
567 public void actionPerformed(ActionEvent e)
569 showAllAnnotations_actionPerformed(false, true);
572 hideAllAlAnnotations.setText(MessageManager
573 .getString("label.hide_all_al_annotations"));
574 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
575 hideAllAlAnnotations.addActionListener(new ActionListener()
578 public void actionPerformed(ActionEvent e)
580 hideAllAnnotations_actionPerformed(false, true);
583 showAllSeqAnnotations.setText(MessageManager
584 .getString("label.show_all_seq_annotations"));
585 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
586 showAllSeqAnnotations.addActionListener(new ActionListener()
589 public void actionPerformed(ActionEvent e)
591 showAllAnnotations_actionPerformed(true, false);
594 hideAllSeqAnnotations.setText(MessageManager
595 .getString("label.hide_all_seq_annotations"));
596 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
597 hideAllSeqAnnotations.addActionListener(new ActionListener()
600 public void actionPerformed(ActionEvent e)
602 hideAllAnnotations_actionPerformed(true, false);
605 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
606 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
607 SequenceAnnotationOrder.NONE.name()));
608 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
609 MessageManager.getString("label.sort_annotations_by_sequence"));
610 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
611 MessageManager.getString("label.sort_annotations_by_label"));
614 .setSelected(sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
615 sortAnnBySequence.addActionListener(new ActionListener()
618 public void actionPerformed(ActionEvent e)
620 boolean newState = sortAnnBySequence.getState();
621 sortAnnByLabel.setSelected(false);
622 setAnnotationSortOrder(newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
623 : SequenceAnnotationOrder.NONE);
624 sortAnnotations_actionPerformed();
628 .setSelected(sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
629 sortAnnByLabel.addActionListener(new ActionListener()
632 public void actionPerformed(ActionEvent e)
634 boolean newState = sortAnnByLabel.getState();
635 sortAnnBySequence.setSelected(false);
636 setAnnotationSortOrder(newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
637 : SequenceAnnotationOrder.NONE);
638 sortAnnotations_actionPerformed();
641 colourTextMenuItem = new JCheckBoxMenuItem(
643 .getString("label.colour_text"));
644 colourTextMenuItem.addActionListener(new ActionListener()
647 public void actionPerformed(ActionEvent e)
649 colourTextMenuItem_actionPerformed(e);
653 JMenuItem htmlMenuItem = new JMenuItem(
654 MessageManager.getString("label.html"));
655 htmlMenuItem.addActionListener(new ActionListener()
658 public void actionPerformed(ActionEvent e)
660 htmlMenuItem_actionPerformed(e);
664 JMenuItem createBioJS = new JMenuItem(
665 MessageManager.getString("label.biojs_html_export"));
666 createBioJS.addActionListener(new java.awt.event.ActionListener()
669 public void actionPerformed(ActionEvent e)
671 bioJSMenuItem_actionPerformed(e);
675 JMenuItem overviewMenuItem = new JMenuItem(
676 MessageManager.getString("label.overview_window"));
677 overviewMenuItem.addActionListener(new ActionListener()
680 public void actionPerformed(ActionEvent e)
682 overviewMenuItem_actionPerformed(e);
686 undoMenuItem.setEnabled(false);
687 undoMenuItem.setText(MessageManager.getString("action.undo"));
688 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z, Toolkit
689 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
690 al = new ActionListener()
693 public void actionPerformed(ActionEvent e)
695 undoMenuItem_actionPerformed(e);
698 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
700 redoMenuItem.setEnabled(false);
701 redoMenuItem.setText(MessageManager.getString("action.redo"));
702 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y, Toolkit
703 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
704 al = new ActionListener()
707 public void actionPerformed(ActionEvent e)
709 redoMenuItem_actionPerformed(e);
712 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
714 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
715 wrapMenuItem.addActionListener(new ActionListener()
718 public void actionPerformed(ActionEvent e)
720 wrapMenuItem_actionPerformed(e);
724 JMenuItem printMenuItem = new JMenuItem(
725 MessageManager.getString("action.print"));
726 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P, Toolkit
727 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
728 al = new ActionListener()
731 public void actionPerformed(ActionEvent e)
733 printMenuItem_actionPerformed(e);
736 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
739 .setText(MessageManager.getString("action.show_gaps"));
740 renderGapsMenuItem.setState(true);
741 renderGapsMenuItem.addActionListener(new ActionListener()
744 public void actionPerformed(ActionEvent e)
746 renderGapsMenuItem_actionPerformed(e);
750 JMenuItem findMenuItem = new JMenuItem(
751 MessageManager.getString("action.find"));
752 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F, Toolkit
753 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
754 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
755 MessageManager.getString("label.find_tip")));
756 al = new ActionListener()
759 public void actionPerformed(ActionEvent e)
761 findMenuItem_actionPerformed(e);
764 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
766 showSeqFeatures.setText(MessageManager
767 .getString("label.show_sequence_features"));
768 showSeqFeatures.addActionListener(new ActionListener()
771 public void actionPerformed(ActionEvent actionEvent)
773 showSeqFeatures_actionPerformed(actionEvent);
777 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
778 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
779 * void actionPerformed(ActionEvent actionEvent) {
780 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
782 showDbRefsMenuitem.setText(MessageManager
783 .getString("label.show_database_refs"));
784 showDbRefsMenuitem.addActionListener(new ActionListener()
788 public void actionPerformed(ActionEvent e)
790 showDbRefs_actionPerformed(e);
794 showNpFeatsMenuitem.setText(MessageManager
795 .getString("label.show_non_positional_features"));
796 showNpFeatsMenuitem.addActionListener(new ActionListener()
800 public void actionPerformed(ActionEvent e)
802 showNpFeats_actionPerformed(e);
806 showGroupConservation.setText(MessageManager
807 .getString("label.group_conservation"));
808 showGroupConservation.addActionListener(new ActionListener()
812 public void actionPerformed(ActionEvent e)
814 showGroupConservation_actionPerformed(e);
819 showGroupConsensus.setText(MessageManager
820 .getString("label.group_consensus"));
821 showGroupConsensus.addActionListener(new ActionListener()
825 public void actionPerformed(ActionEvent e)
827 showGroupConsensus_actionPerformed(e);
831 showConsensusHistogram.setText(MessageManager
832 .getString("label.show_consensus_histogram"));
833 showConsensusHistogram.addActionListener(new ActionListener()
837 public void actionPerformed(ActionEvent e)
839 showConsensusHistogram_actionPerformed(e);
843 showSequenceLogo.setText(MessageManager
844 .getString("label.show_consensus_logo"));
845 showSequenceLogo.addActionListener(new ActionListener()
849 public void actionPerformed(ActionEvent e)
851 showSequenceLogo_actionPerformed(e);
855 normaliseSequenceLogo.setText(MessageManager
856 .getString("label.norm_consensus_logo"));
857 normaliseSequenceLogo.addActionListener(new ActionListener()
861 public void actionPerformed(ActionEvent e)
863 normaliseSequenceLogo_actionPerformed(e);
867 applyAutoAnnotationSettings.setText(MessageManager
868 .getString("label.apply_all_groups"));
869 applyAutoAnnotationSettings.setState(false);
870 applyAutoAnnotationSettings.setVisible(true);
871 applyAutoAnnotationSettings.addActionListener(new ActionListener()
874 public void actionPerformed(ActionEvent e)
876 applyAutoAnnotationSettings_actionPerformed(e);
880 ButtonGroup buttonGroup = new ButtonGroup();
881 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
882 MessageManager.getString("label.show_first"));
883 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
884 MessageManager.getString("label.show_last"));
885 buttonGroup.add(showAutoFirst);
886 buttonGroup.add(showAutoLast);
887 final boolean autoFirst = Cache.getDefault(
888 Preferences.SHOW_AUTOCALC_ABOVE, false);
889 showAutoFirst.setSelected(autoFirst);
890 setShowAutoCalculatedAbove(autoFirst);
891 showAutoFirst.addActionListener(new ActionListener()
894 public void actionPerformed(ActionEvent e)
896 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
897 sortAnnotations_actionPerformed();
900 showAutoLast.setSelected(!showAutoFirst.isSelected());
901 showAutoLast.addActionListener(new ActionListener()
904 public void actionPerformed(ActionEvent e)
906 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
907 sortAnnotations_actionPerformed();
911 JMenuItem deleteGroups = new JMenuItem(
912 MessageManager.getString("action.undefine_groups"));
913 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U, Toolkit
914 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
915 al = new ActionListener()
918 public void actionPerformed(ActionEvent e)
920 deleteGroups_actionPerformed(e);
923 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
925 JMenuItem annotationColumn = new JMenuItem(
926 MessageManager.getString("action.select_by_annotation"));
927 annotationColumn.addActionListener(new ActionListener()
930 public void actionPerformed(ActionEvent e)
932 annotationColumn_actionPerformed(e);
936 JMenuItem createGroup = new JMenuItem(
937 MessageManager.getString("action.create_groups"));
938 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, Toolkit
939 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
940 al = new ActionListener()
943 public void actionPerformed(ActionEvent e)
945 createGroup_actionPerformed(e);
948 addMenuActionAndAccelerator(keyStroke, createGroup, al);
950 JMenuItem unGroup = new JMenuItem(
951 MessageManager.getString("action.remove_group"));
952 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, Toolkit
953 .getDefaultToolkit().getMenuShortcutKeyMask()
954 | KeyEvent.SHIFT_MASK, false);
955 al = new ActionListener()
958 public void actionPerformed(ActionEvent e)
960 unGroup_actionPerformed(e);
963 addMenuActionAndAccelerator(keyStroke, unGroup, al);
965 copy.setText(MessageManager.getString("action.copy"));
966 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C, Toolkit
967 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
969 al = new ActionListener()
972 public void actionPerformed(ActionEvent e)
974 copy_actionPerformed(e);
977 addMenuActionAndAccelerator(keyStroke, copy, al);
979 cut.setText(MessageManager.getString("action.cut"));
980 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, Toolkit
981 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
982 al = new ActionListener()
985 public void actionPerformed(ActionEvent e)
987 cut_actionPerformed(e);
990 addMenuActionAndAccelerator(keyStroke, cut, al);
992 JMenuItem delete = new JMenuItem(
993 MessageManager.getString("action.delete"));
994 delete.addActionListener(new ActionListener()
997 public void actionPerformed(ActionEvent e)
999 delete_actionPerformed(e);
1003 pasteMenu.setText(MessageManager.getString("action.paste"));
1004 JMenuItem pasteNew = new JMenuItem(
1005 MessageManager.getString("label.to_new_alignment"));
1006 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V, Toolkit
1007 .getDefaultToolkit().getMenuShortcutKeyMask()
1008 | KeyEvent.SHIFT_MASK, false);
1009 al = new ActionListener()
1012 public void actionPerformed(ActionEvent e)
1014 pasteNew_actionPerformed(e);
1017 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1019 JMenuItem pasteThis = new JMenuItem(
1020 MessageManager.getString("label.to_this_alignment"));
1021 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V, Toolkit
1022 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1023 al = new ActionListener()
1026 public void actionPerformed(ActionEvent e)
1028 pasteThis_actionPerformed(e);
1031 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1033 JMenuItem createPNG = new JMenuItem("PNG");
1034 createPNG.addActionListener(new ActionListener()
1037 public void actionPerformed(ActionEvent e)
1042 createPNG.setActionCommand(MessageManager
1043 .getString("label.save_png_image"));
1045 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1046 font.addActionListener(new ActionListener()
1049 public void actionPerformed(ActionEvent e)
1051 font_actionPerformed(e);
1054 seqLimits.setText(MessageManager
1055 .getString("label.show_sequence_limits"));
1056 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1057 seqLimits.addActionListener(new ActionListener()
1060 public void actionPerformed(ActionEvent e)
1062 seqLimit_actionPerformed(e);
1065 JMenuItem epsFile = new JMenuItem("EPS");
1066 epsFile.addActionListener(new ActionListener()
1069 public void actionPerformed(ActionEvent e)
1075 JMenuItem createSVG = new JMenuItem("SVG");
1076 createSVG.addActionListener(new ActionListener()
1079 public void actionPerformed(ActionEvent e)
1085 JMenuItem loadTreeMenuItem = new JMenuItem(
1086 MessageManager.getString("label.load_associated_tree"));
1087 loadTreeMenuItem.setActionCommand(MessageManager
1088 .getString("label.load_tree_for_sequence_set"));
1089 loadTreeMenuItem.addActionListener(new ActionListener()
1092 public void actionPerformed(ActionEvent e)
1094 loadTreeMenuItem_actionPerformed(e);
1098 scaleAbove.setVisible(false);
1099 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1100 scaleAbove.addActionListener(new ActionListener()
1103 public void actionPerformed(ActionEvent e)
1105 scaleAbove_actionPerformed(e);
1108 scaleLeft.setVisible(false);
1109 scaleLeft.setSelected(true);
1110 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1111 scaleLeft.addActionListener(new ActionListener()
1114 public void actionPerformed(ActionEvent e)
1116 scaleLeft_actionPerformed(e);
1119 scaleRight.setVisible(false);
1120 scaleRight.setSelected(true);
1121 scaleRight.setText(MessageManager.getString("action.scale_right"));
1122 scaleRight.addActionListener(new ActionListener()
1125 public void actionPerformed(ActionEvent e)
1127 scaleRight_actionPerformed(e);
1130 centreColumnLabelsMenuItem.setVisible(true);
1131 centreColumnLabelsMenuItem.setState(false);
1132 centreColumnLabelsMenuItem.setText(MessageManager
1133 .getString("label.centre_column_labels"));
1134 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1137 public void actionPerformed(ActionEvent e)
1139 centreColumnLabels_actionPerformed(e);
1142 followHighlightMenuItem.setVisible(true);
1143 followHighlightMenuItem.setState(true);
1144 followHighlightMenuItem.setText(MessageManager
1145 .getString("label.automatic_scrolling"));
1146 followHighlightMenuItem.addActionListener(new ActionListener()
1150 public void actionPerformed(ActionEvent e)
1152 followHighlight_actionPerformed();
1158 .setText(MessageManager.getString("action.by_tree_order"));
1159 sort.setText(MessageManager.getString("action.sort"));
1160 sort.addMenuListener(new MenuListener()
1163 public void menuSelected(MenuEvent e)
1165 buildTreeSortMenu();
1169 public void menuDeselected(MenuEvent e)
1174 public void menuCanceled(MenuEvent e)
1178 sortByAnnotScore.setText(MessageManager
1179 .getString("label.sort_by_score"));
1180 sort.add(sortByAnnotScore);
1181 sort.addMenuListener(new javax.swing.event.MenuListener()
1185 public void menuCanceled(MenuEvent e)
1190 public void menuDeselected(MenuEvent e)
1195 public void menuSelected(MenuEvent e)
1197 buildSortByAnnotationScoresMenu();
1200 sortByAnnotScore.setVisible(false);
1203 .setText(MessageManager.getString("action.calculate_tree"));
1205 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1206 padGapsMenuitem.setState(jalview.bin.Cache
1207 .getDefault("PAD_GAPS", false));
1208 padGapsMenuitem.addActionListener(new ActionListener()
1211 public void actionPerformed(ActionEvent e)
1213 padGapsMenuitem_actionPerformed(e);
1216 JMenuItem vamsasStore = new JMenuItem(
1217 MessageManager.getString("label.vamsas_store"));
1218 vamsasStore.setVisible(false);
1219 vamsasStore.addActionListener(new ActionListener()
1222 public void actionPerformed(ActionEvent e)
1224 vamsasStore_actionPerformed(e);
1227 showTranslation.setText(MessageManager
1228 .getString("label.translate_cDNA"));
1229 showTranslation.addActionListener(new ActionListener()
1232 public void actionPerformed(ActionEvent e)
1234 showTranslation_actionPerformed(e);
1237 showReverse.setText(MessageManager.getString("label.reverse"));
1238 showReverse.addActionListener(new ActionListener()
1241 public void actionPerformed(ActionEvent e)
1243 showReverse_actionPerformed(false);
1246 showReverseComplement.setText(MessageManager
1247 .getString("label.reverse_complement"));
1248 showReverseComplement.addActionListener(new ActionListener()
1251 public void actionPerformed(ActionEvent e)
1253 showReverse_actionPerformed(true);
1257 JMenuItem extractScores = new JMenuItem(
1258 MessageManager.getString("label.extract_scores"));
1259 extractScores.addActionListener(new ActionListener()
1262 public void actionPerformed(ActionEvent e)
1264 extractScores_actionPerformed(e);
1267 extractScores.setVisible(true);
1268 // JBPNote: TODO: make gui for regex based score extraction
1270 // for show products actions see AlignFrame.canShowProducts
1271 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1273 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1274 runGroovy.setToolTipText(MessageManager
1275 .getString("label.run_groovy_tip"));
1276 runGroovy.addActionListener(new ActionListener()
1279 public void actionPerformed(ActionEvent e)
1281 runGroovy_actionPerformed();
1285 JMenuItem openFeatureSettings = new JMenuItem(
1286 MessageManager.getString("action.feature_settings"));
1287 openFeatureSettings.addActionListener(new ActionListener()
1290 public void actionPerformed(ActionEvent e)
1292 featureSettings_actionPerformed(e);
1295 JMenuItem fetchSequence = new JMenuItem(
1296 MessageManager.getString("label.fetch_sequences"));
1297 fetchSequence.addActionListener(new ActionListener()
1300 public void actionPerformed(ActionEvent e)
1302 fetchSequence_actionPerformed(e);
1306 JMenuItem associatedData = new JMenuItem(
1307 MessageManager.getString("label.load_features_annotations"));
1308 associatedData.addActionListener(new ActionListener()
1311 public void actionPerformed(ActionEvent e)
1313 associatedData_actionPerformed(e);
1316 autoCalculate.setText(MessageManager
1317 .getString("label.autocalculate_consensus"));
1318 autoCalculate.setState(jalview.bin.Cache.getDefault(
1319 "AUTO_CALC_CONSENSUS", true));
1320 autoCalculate.addActionListener(new ActionListener()
1323 public void actionPerformed(ActionEvent e)
1325 autoCalculate_actionPerformed(e);
1328 sortByTree.setText(MessageManager
1329 .getString("label.sort_alignment_new_tree"));
1331 .setToolTipText("<html>"
1333 .getString("label.enable_automatically_sort_alignment_when_open_new_tree"));
1335 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1336 sortByTree.addActionListener(new ActionListener()
1339 public void actionPerformed(ActionEvent e)
1341 sortByTreeOption_actionPerformed(e);
1345 listenToViewSelections.setText(MessageManager
1346 .getString("label.listen_for_selections"));
1347 listenToViewSelections
1348 .setToolTipText("<html>"
1350 .getString("label.selections_mirror_selections_made_same_sequences_other_views"));
1351 listenToViewSelections.setState(false);
1352 listenToViewSelections.addActionListener(new ActionListener()
1355 public void actionPerformed(ActionEvent e)
1357 listenToViewSelections_actionPerformed(e);
1361 JMenu addSequenceMenu = new JMenu(
1362 MessageManager.getString("label.add_sequences"));
1363 JMenuItem addFromFile = new JMenuItem(
1364 MessageManager.getString("label.from_file"));
1365 addFromFile.addActionListener(new ActionListener()
1368 public void actionPerformed(ActionEvent e)
1370 addFromFile_actionPerformed(e);
1373 JMenuItem addFromText = new JMenuItem(
1374 MessageManager.getString("label.from_textbox"));
1375 addFromText.addActionListener(new ActionListener()
1378 public void actionPerformed(ActionEvent e)
1380 addFromText_actionPerformed(e);
1383 JMenuItem addFromURL = new JMenuItem(
1384 MessageManager.getString("label.from_url"));
1385 addFromURL.addActionListener(new ActionListener()
1388 public void actionPerformed(ActionEvent e)
1390 addFromURL_actionPerformed(e);
1393 JMenuItem exportFeatures = new JMenuItem(
1394 MessageManager.getString("label.export_features"));
1395 exportFeatures.addActionListener(new ActionListener()
1398 public void actionPerformed(ActionEvent e)
1400 exportFeatures_actionPerformed(e);
1403 JMenuItem exportAnnotations = new JMenuItem(
1404 MessageManager.getString("label.export_annotations"));
1405 exportAnnotations.addActionListener(new ActionListener()
1408 public void actionPerformed(ActionEvent e)
1410 exportAnnotations_actionPerformed(e);
1413 statusPanel.setLayout(new GridLayout());
1414 JMenuItem showAllSeqs = new JMenuItem(
1415 MessageManager.getString("label.all_sequences"));
1416 showAllSeqs.setToolTipText(MessageManager
1417 .getString("label.toggle_sequence_visibility"));
1418 showAllSeqs.addActionListener(new ActionListener()
1421 public void actionPerformed(ActionEvent e)
1423 showAllSeqs_actionPerformed(e);
1426 JMenuItem showAllColumns = new JMenuItem(
1427 MessageManager.getString("label.all_columns"));
1428 showAllColumns.setToolTipText(MessageManager
1429 .getString("label.toggle_columns_visibility"));
1430 showAllColumns.addActionListener(new ActionListener()
1433 public void actionPerformed(ActionEvent e)
1435 showAllColumns_actionPerformed(e);
1438 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1439 JMenuItem hideSelSequences = new JMenuItem(
1440 MessageManager.getString("label.selected_sequences"));
1441 hideSelSequences.setToolTipText(MessageManager
1442 .getString("label.toggle_sequence_visibility"));
1443 hideSelSequences.addActionListener(new ActionListener()
1446 public void actionPerformed(ActionEvent e)
1448 hideSelSequences_actionPerformed(e);
1451 JMenuItem hideSelColumns = new JMenuItem(
1452 MessageManager.getString("label.selected_columns"));
1453 hideSelColumns.setToolTipText(MessageManager
1454 .getString("label.toggle_columns_visibility"));
1455 hideSelColumns.addActionListener(new ActionListener()
1458 public void actionPerformed(ActionEvent e)
1460 hideSelColumns_actionPerformed(e);
1463 JMenuItem hideAllSelection = new JMenuItem(
1464 MessageManager.getString("label.selected_region"));
1465 hideAllSelection.addActionListener(new ActionListener()
1468 public void actionPerformed(ActionEvent e)
1470 hideAllSelection_actionPerformed(e);
1473 // TODO: should be hidden if no selection exists.
1474 JMenuItem hideAllButSelection = new JMenuItem(
1475 MessageManager.getString("label.all_but_selected_region"));
1476 hideAllButSelection.addActionListener(new ActionListener()
1479 public void actionPerformed(ActionEvent e)
1481 hideAllButSelection_actionPerformed(e);
1484 JMenuItem showAllhidden = new JMenuItem(
1485 MessageManager.getString("label.all_sequences_columns"));
1486 showAllhidden.setToolTipText(MessageManager
1487 .getString("label.toggles_visibility_hidden_selected_regions"));
1488 showAllhidden.addActionListener(new ActionListener()
1491 public void actionPerformed(ActionEvent e)
1493 showAllhidden_actionPerformed(e);
1496 hiddenMarkers.setText(MessageManager
1497 .getString("action.show_hidden_markers"));
1498 hiddenMarkers.addActionListener(new ActionListener()
1501 public void actionPerformed(ActionEvent e)
1503 hiddenMarkers_actionPerformed(e);
1507 JMenuItem invertColSel = new JMenuItem(
1508 MessageManager.getString("action.invert_column_selection"));
1509 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I, Toolkit
1510 .getDefaultToolkit().getMenuShortcutKeyMask()
1511 | KeyEvent.ALT_MASK, false);
1512 al = new ActionListener()
1515 public void actionPerformed(ActionEvent e)
1517 invertColSel_actionPerformed(e);
1520 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1522 showComplementMenuItem.setVisible(false);
1523 showComplementMenuItem.addActionListener(new ActionListener()
1526 public void actionPerformed(ActionEvent e)
1528 showComplement_actionPerformed(showComplementMenuItem.getState());
1532 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1535 public void stateChanged(ChangeEvent evt)
1537 JTabbedPane pane = (JTabbedPane) evt.getSource();
1538 int sel = pane.getSelectedIndex();
1539 tabSelectionChanged(sel);
1542 tabbedPane.addMouseListener(new MouseAdapter()
1545 public void mousePressed(MouseEvent e)
1547 if (e.isPopupTrigger()) // Mac
1549 tabbedPane_mousePressed(e);
1554 public void mouseReleased(MouseEvent e)
1556 if (e.isPopupTrigger()) // Windows
1558 tabbedPane_mousePressed(e);
1562 tabbedPane.addFocusListener(new FocusAdapter()
1565 public void focusGained(FocusEvent e)
1567 tabbedPane_focusGained(e);
1571 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1572 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, Toolkit
1573 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1574 al = new ActionListener()
1577 public void actionPerformed(ActionEvent e)
1579 save_actionPerformed(e);
1582 addMenuActionAndAccelerator(keyStroke, save, al);
1584 reload.setEnabled(false);
1585 reload.setText(MessageManager.getString("action.reload"));
1586 reload.addActionListener(new ActionListener()
1589 public void actionPerformed(ActionEvent e)
1591 reload_actionPerformed(e);
1595 JMenuItem newView = new JMenuItem(
1596 MessageManager.getString("action.new_view"));
1597 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T, Toolkit
1598 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1599 al = new ActionListener()
1602 public void actionPerformed(ActionEvent e)
1604 newView_actionPerformed(e);
1607 addMenuActionAndAccelerator(keyStroke, newView, al);
1609 tabbedPane.setToolTipText("<html><i>"
1610 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1613 formatMenu.setText(MessageManager.getString("action.format"));
1614 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1615 idRightAlign.setText(MessageManager
1616 .getString("label.right_align_sequence_id"));
1617 idRightAlign.addActionListener(new ActionListener()
1620 public void actionPerformed(ActionEvent e)
1622 idRightAlign_actionPerformed(e);
1626 gatherViews.setEnabled(false);
1627 gatherViews.setText(MessageManager.getString("action.gather_views"));
1628 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1629 al = new ActionListener()
1632 public void actionPerformed(ActionEvent e)
1634 gatherViews_actionPerformed(e);
1637 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1639 expandViews.setEnabled(false);
1640 expandViews.setText(MessageManager.getString("action.expand_views"));
1641 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1642 al = new ActionListener()
1645 public void actionPerformed(ActionEvent e)
1647 expandViews_actionPerformed(e);
1650 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1652 JMenuItem pageSetup = new JMenuItem(
1653 MessageManager.getString("action.page_setup"));
1654 pageSetup.addActionListener(new ActionListener()
1657 public void actionPerformed(ActionEvent e)
1659 pageSetup_actionPerformed(e);
1662 JMenuItem alignmentProperties = new JMenuItem(
1663 MessageManager.getString("label.alignment_props"));
1664 alignmentProperties.addActionListener(new ActionListener()
1667 public void actionPerformed(ActionEvent actionEvent)
1669 alignmentProperties();
1672 JMenuItem selectHighlighted = new JMenuItem(
1673 MessageManager.getString("action.select_highlighted_columns"));
1674 selectHighlighted.setToolTipText(MessageManager
1675 .getString("tooltip.select_highlighted_columns"));
1676 al = new ActionListener()
1679 public void actionPerformed(ActionEvent actionEvent)
1681 selectHighlightedColumns_actionPerformed(actionEvent);
1684 selectHighlighted.addActionListener(al);
1685 JMenu tooltipSettingsMenu = new JMenu(
1686 MessageManager.getString("label.sequence_id_tooltip"));
1687 JMenu autoAnnMenu = new JMenu(
1688 MessageManager.getString("label.autocalculated_annotation"));
1690 JMenu exportImageMenu = new JMenu(
1691 MessageManager.getString("label.export_image"));
1692 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1693 alignFrameMenuBar.add(fileMenu);
1694 alignFrameMenuBar.add(editMenu);
1695 alignFrameMenuBar.add(selectMenu);
1696 alignFrameMenuBar.add(viewMenu);
1697 alignFrameMenuBar.add(annotationsMenu);
1698 alignFrameMenuBar.add(formatMenu);
1699 alignFrameMenuBar.add(colourMenu);
1700 alignFrameMenuBar.add(calculateMenu);
1701 alignFrameMenuBar.add(webService);
1703 fileMenu.add(fetchSequence);
1704 fileMenu.add(addSequenceMenu);
1705 fileMenu.add(reload);
1706 fileMenu.addSeparator();
1707 fileMenu.add(vamsasStore);
1709 fileMenu.add(saveAs);
1710 fileMenu.add(outputTextboxMenu);
1711 fileMenu.add(pageSetup);
1712 fileMenu.add(printMenuItem);
1713 fileMenu.addSeparator();
1714 fileMenu.add(exportImageMenu);
1715 fileMenu.add(exportFeatures);
1716 fileMenu.add(exportAnnotations);
1717 fileMenu.add(loadTreeMenuItem);
1718 fileMenu.add(associatedData);
1719 fileMenu.addSeparator();
1720 fileMenu.add(closeMenuItem);
1722 pasteMenu.add(pasteNew);
1723 pasteMenu.add(pasteThis);
1724 editMenu.add(undoMenuItem);
1725 editMenu.add(redoMenuItem);
1728 editMenu.add(pasteMenu);
1729 editMenu.add(delete);
1730 editMenu.addSeparator();
1731 editMenu.add(remove2LeftMenuItem);
1732 editMenu.add(remove2RightMenuItem);
1733 editMenu.add(removeGappedColumnMenuItem);
1734 editMenu.add(removeAllGapsMenuItem);
1735 editMenu.add(removeRedundancyMenuItem);
1736 editMenu.addSeparator();
1737 // dont add these yet in the CVS build - they cannot be undone!
1738 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1739 // editMenu.add(justifyLeftMenuItem);
1740 // editMenu.add(justifyRightMenuItem);
1741 // editMenu.addSeparator();
1742 editMenu.add(padGapsMenuitem);
1744 showMenu.add(showAllColumns);
1745 showMenu.add(showAllSeqs);
1746 showMenu.add(showAllhidden);
1747 hideMenu.add(hideSelColumns);
1748 hideMenu.add(hideSelSequences);
1749 hideMenu.add(hideAllSelection);
1750 hideMenu.add(hideAllButSelection);
1751 viewMenu.add(newView);
1752 viewMenu.add(expandViews);
1753 viewMenu.add(gatherViews);
1754 viewMenu.addSeparator();
1755 viewMenu.add(showMenu);
1756 viewMenu.add(hideMenu);
1757 viewMenu.add(showComplementMenuItem);
1758 viewMenu.addSeparator();
1759 viewMenu.add(followHighlightMenuItem);
1760 viewMenu.addSeparator();
1761 viewMenu.add(showSeqFeatures);
1762 // viewMenu.add(showSeqFeaturesHeight);
1763 viewMenu.add(openFeatureSettings);
1764 tooltipSettingsMenu.add(showDbRefsMenuitem);
1765 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1766 viewMenu.add(tooltipSettingsMenu);
1767 viewMenu.addSeparator();
1768 viewMenu.add(alignmentProperties);
1769 viewMenu.addSeparator();
1770 viewMenu.add(overviewMenuItem);
1772 annotationsMenu.add(annotationPanelMenuItem);
1773 annotationsMenu.addSeparator();
1774 annotationsMenu.add(showAllAlAnnotations);
1775 annotationsMenu.add(hideAllAlAnnotations);
1776 annotationsMenu.addSeparator();
1777 annotationsMenu.add(showAllSeqAnnotations);
1778 annotationsMenu.add(hideAllSeqAnnotations);
1779 annotationsMenu.add(sortAnnBySequence);
1780 annotationsMenu.add(sortAnnByLabel);
1781 annotationsMenu.addSeparator();
1782 autoAnnMenu.add(showAutoFirst);
1783 autoAnnMenu.add(showAutoLast);
1784 autoAnnMenu.addSeparator();
1785 autoAnnMenu.add(applyAutoAnnotationSettings);
1786 autoAnnMenu.add(showConsensusHistogram);
1787 autoAnnMenu.add(showSequenceLogo);
1788 autoAnnMenu.add(normaliseSequenceLogo);
1789 autoAnnMenu.addSeparator();
1790 autoAnnMenu.add(showGroupConservation);
1791 autoAnnMenu.add(showGroupConsensus);
1792 annotationsMenu.add(autoAnnMenu);
1795 sort.add(sortIDMenuItem);
1796 sort.add(sortLengthMenuItem);
1797 sort.add(sortGroupMenuItem);
1798 sort.add(sortPairwiseMenuItem);
1799 sort.add(sortByTreeMenu);
1800 calculateMenu.add(sort);
1801 calculateMenu.add(calculateTree);
1802 calculateMenu.addSeparator();
1803 calculateMenu.add(pairwiseAlignmentMenuItem);
1804 calculateMenu.add(PCAMenuItem);
1805 calculateMenu.addSeparator();
1806 calculateMenu.add(showTranslation);
1807 calculateMenu.add(showReverse);
1808 calculateMenu.add(showReverseComplement);
1809 calculateMenu.add(showProducts);
1810 calculateMenu.add(autoCalculate);
1811 calculateMenu.add(sortByTree);
1812 calculateMenu.addSeparator();
1813 calculateMenu.add(expandAlignment);
1814 calculateMenu.add(extractScores);
1815 calculateMenu.addSeparator();
1816 calculateMenu.add(runGroovy);
1818 webServiceNoServices = new JMenuItem(
1819 MessageManager.getString("label.no_services"));
1820 webService.add(webServiceNoServices);
1821 exportImageMenu.add(htmlMenuItem);
1822 exportImageMenu.add(epsFile);
1823 exportImageMenu.add(createPNG);
1824 exportImageMenu.add(createBioJS);
1825 exportImageMenu.add(createSVG);
1826 addSequenceMenu.add(addFromFile);
1827 addSequenceMenu.add(addFromText);
1828 addSequenceMenu.add(addFromURL);
1829 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1830 statusPanel.add(statusBar, null);
1831 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1833 formatMenu.add(font);
1834 formatMenu.addSeparator();
1835 formatMenu.add(wrapMenuItem);
1836 formatMenu.add(scaleAbove);
1837 formatMenu.add(scaleLeft);
1838 formatMenu.add(scaleRight);
1839 formatMenu.add(seqLimits);
1840 formatMenu.add(idRightAlign);
1841 formatMenu.add(hiddenMarkers);
1842 formatMenu.add(viewBoxesMenuItem);
1843 formatMenu.add(viewTextMenuItem);
1844 formatMenu.add(colourTextMenuItem);
1845 formatMenu.add(renderGapsMenuItem);
1846 formatMenu.add(centreColumnLabelsMenuItem);
1847 formatMenu.add(showNonconservedMenuItem);
1848 selectMenu.add(findMenuItem);
1849 selectMenu.addSeparator();
1850 selectMenu.add(selectAllSequenceMenuItem);
1851 selectMenu.add(deselectAllSequenceMenuItem);
1852 selectMenu.add(invertSequenceMenuItem);
1853 selectMenu.add(invertColSel);
1854 selectMenu.add(createGroup);
1855 selectMenu.add(unGroup);
1856 selectMenu.add(grpsFromSelection);
1857 selectMenu.add(deleteGroups);
1858 selectMenu.add(annotationColumn);
1859 selectMenu.add(selectHighlighted);
1860 // TODO - determine if the listenToViewSelections button is needed : see bug
1862 // selectMenu.addSeparator();
1863 // selectMenu.add(listenToViewSelections);
1867 * Constructs the entries on the Colour menu (but does not add them to the
1870 protected void initColourMenu()
1872 applyToAllGroups = new JCheckBoxMenuItem(
1873 MessageManager.getString("label.apply_colour_to_all_groups"));
1874 applyToAllGroups.addActionListener(new ActionListener()
1877 public void actionPerformed(ActionEvent e)
1879 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1883 textColour = new JRadioButtonMenuItem(
1884 MessageManager.getString("action.set_text_colour"));
1885 textColour.addActionListener(new ActionListener()
1888 public void actionPerformed(ActionEvent e)
1890 textColour_actionPerformed();
1894 conservationMenuItem = new JCheckBoxMenuItem(
1895 MessageManager.getString("action.by_conservation"));
1896 conservationMenuItem.addActionListener(new ActionListener()
1899 public void actionPerformed(ActionEvent e)
1901 conservationMenuItem_actionPerformed(conservationMenuItem
1906 abovePIDThreshold = new JCheckBoxMenuItem(
1907 MessageManager.getString("label.above_identity_threshold"));
1908 abovePIDThreshold.addActionListener(new ActionListener()
1911 public void actionPerformed(ActionEvent e)
1913 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
1916 modifyPID = new JMenuItem(
1917 MessageManager.getString("label.modify_identity_threshold"));
1918 modifyPID.addActionListener(new ActionListener()
1921 public void actionPerformed(ActionEvent e)
1923 modifyPID_actionPerformed();
1926 modifyConservation = new JMenuItem(
1928 .getString("label.modify_conservation_threshold"));
1929 modifyConservation.addActionListener(new ActionListener()
1932 public void actionPerformed(ActionEvent e)
1934 modifyConservation_actionPerformed();
1938 annotationColour = new JMenuItem(
1939 MessageManager.getString("action.by_annotation"));
1940 annotationColour.addActionListener(new ActionListener()
1943 public void actionPerformed(ActionEvent e)
1945 annotationColour_actionPerformed();
1950 protected void selectHighlightedColumns_actionPerformed(
1951 ActionEvent actionEvent)
1953 // TODO Auto-generated method stub
1958 * Generate the reverse sequence (or reverse complement if the flag is true)
1959 * and add it to the alignment
1963 protected void showReverse_actionPerformed(boolean complement)
1968 * Try to run script in a Groovy console, having first ensured that this
1969 * alignframe is set as currentAlignFrame in Desktop
1971 protected void runGroovy_actionPerformed()
1977 * Adds the given action listener and key accelerator to the given menu item.
1978 * Also saves in a lookup table to support lookup of action by key stroke.
1982 * @param actionListener
1984 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
1985 JMenuItem menuItem, ActionListener actionListener)
1987 menuItem.setAccelerator(keyStroke);
1988 accelerators.put(keyStroke, menuItem);
1989 menuItem.addActionListener(actionListener);
1993 * Action on clicking sort annotations by type.
1997 protected void sortAnnotations_actionPerformed()
2002 * Action on clicking Show all annotations.
2004 * @param forSequences
2005 * update sequence-related annotations
2006 * @param forAlignment
2007 * update non-sequence-related annotations
2009 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2010 boolean forAlignment)
2012 setAnnotationsVisibility(true, forSequences, forAlignment);
2016 * Action on clicking Hide all annotations.
2018 * @param forSequences
2019 * update sequence-related annotations
2020 * @param forAlignment
2021 * update non-sequence-related annotations
2023 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2024 boolean forAlignment)
2026 setAnnotationsVisibility(false, forSequences, forAlignment);
2030 * Set the visibility of annotations to true or false. Can act on
2031 * sequence-related annotations, or alignment-related, or both.
2034 * @param forSequences
2035 * update sequence-related annotations
2036 * @param forAlignment
2037 * update non-sequence-related annotations
2039 protected void setAnnotationsVisibility(boolean visible,
2040 boolean forSequences, boolean forAlignment)
2045 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2047 // TODO Auto-generated method stub
2051 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2053 // TODO Auto-generated method stub
2057 protected void showAllhidden_actionPerformed(ActionEvent e)
2059 // TODO Auto-generated method stub
2063 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2065 // TODO Auto-generated method stub
2069 protected void hideAllSelection_actionPerformed(ActionEvent e)
2071 // TODO Auto-generated method stub
2075 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2077 // TODO Auto-generated method stub
2081 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2083 // TODO Auto-generated method stub
2087 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2089 // TODO Auto-generated method stub
2093 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2095 // TODO Auto-generated method stub
2099 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2101 // TODO Auto-generated method stub
2105 protected void showGroupConservation_actionPerformed(ActionEvent e)
2107 // TODO Auto-generated method stub
2111 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2113 // TODO Auto-generated method stub
2117 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2119 // TODO Auto-generated method stub
2123 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2125 // TODO Auto-generated method stub
2129 protected void followHighlight_actionPerformed()
2131 // TODO Auto-generated method stub
2135 protected void showNpFeats_actionPerformed(ActionEvent e)
2137 // TODO Auto-generated method stub
2141 protected void showDbRefs_actionPerformed(ActionEvent e)
2143 // TODO Auto-generated method stub
2147 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2151 protected void buildSortByAnnotationScoresMenu()
2155 protected void extractScores_actionPerformed(ActionEvent e)
2159 protected void outputText_actionPerformed(ActionEvent e)
2163 public void addFromFile_actionPerformed(ActionEvent e)
2168 public void addFromText_actionPerformed(ActionEvent e)
2173 public void addFromURL_actionPerformed(ActionEvent e)
2178 public void exportFeatures_actionPerformed(ActionEvent e)
2183 public void exportAnnotations_actionPerformed(ActionEvent e)
2188 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2192 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2197 protected void closeMenuItem_actionPerformed(boolean b)
2201 protected void redoMenuItem_actionPerformed(ActionEvent e)
2205 protected void undoMenuItem_actionPerformed(ActionEvent e)
2209 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2213 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2217 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2221 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2225 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2229 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2233 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2237 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2241 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2245 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2249 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2253 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2257 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2261 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2265 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2269 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2273 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2277 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2281 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2285 protected void PCAMenuItem_actionPerformed(ActionEvent e)
2289 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2293 protected void conservationMenuItem_actionPerformed(boolean selected)
2297 protected void printMenuItem_actionPerformed(ActionEvent e)
2301 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2305 protected void findMenuItem_actionPerformed(ActionEvent e)
2309 protected void abovePIDThreshold_actionPerformed(boolean selected)
2313 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2317 protected void deleteGroups_actionPerformed(ActionEvent e)
2321 protected void createGroup_actionPerformed(ActionEvent e)
2325 protected void unGroup_actionPerformed(ActionEvent e)
2329 protected void copy_actionPerformed(ActionEvent e)
2333 protected void cut_actionPerformed(ActionEvent e)
2337 protected void delete_actionPerformed(ActionEvent e)
2341 protected void pasteNew_actionPerformed(ActionEvent e)
2345 protected void pasteThis_actionPerformed(ActionEvent e)
2349 protected void applyToAllGroups_actionPerformed(boolean selected)
2353 public void createPNG(java.io.File f)
2357 protected void font_actionPerformed(ActionEvent e)
2361 protected void seqLimit_actionPerformed(ActionEvent e)
2365 public void seqDBRef_actionPerformed(ActionEvent e)
2370 public void createEPS(java.io.File f)
2374 public void createSVG(java.io.File f)
2379 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2385 * Template method to handle the 'load T-Coffee scores' menu event.
2387 * Subclasses override this method to provide a custom action.
2392 protected void loadScores_actionPerformed(ActionEvent event)
2397 protected void jpred_actionPerformed(ActionEvent e)
2401 protected void scaleAbove_actionPerformed(ActionEvent e)
2405 protected void scaleLeft_actionPerformed(ActionEvent e)
2409 protected void scaleRight_actionPerformed(ActionEvent e)
2413 protected void modifyPID_actionPerformed()
2417 protected void modifyConservation_actionPerformed()
2421 protected void saveAs_actionPerformed(ActionEvent e)
2425 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2429 public void vamsasStore_actionPerformed(ActionEvent e)
2434 public void vamsasLoad_actionPerformed(ActionEvent e)
2439 public void showTranslation_actionPerformed(ActionEvent e)
2444 public void featureSettings_actionPerformed(ActionEvent e)
2449 public void fetchSequence_actionPerformed(ActionEvent e)
2454 public void smoothFont_actionPerformed(ActionEvent e)
2459 public void annotationColour_actionPerformed()
2463 public void annotationColumn_actionPerformed(ActionEvent e)
2467 public void associatedData_actionPerformed(ActionEvent e)
2472 public void autoCalculate_actionPerformed(ActionEvent e)
2477 public void sortByTreeOption_actionPerformed(ActionEvent e)
2482 public void showAllSeqs_actionPerformed(ActionEvent e)
2487 public void showAllColumns_actionPerformed(ActionEvent e)
2492 public void hideSelSequences_actionPerformed(ActionEvent e)
2497 public void hideSelColumns_actionPerformed(ActionEvent e)
2502 public void hiddenMarkers_actionPerformed(ActionEvent e)
2507 public void findPdbId_actionPerformed(ActionEvent e)
2512 public void enterPdbId_actionPerformed(ActionEvent e)
2517 public void pdbFile_actionPerformed(ActionEvent e)
2522 public void invertColSel_actionPerformed(ActionEvent e)
2527 public void tabSelectionChanged(int sel)
2532 public void tabbedPane_mousePressed(MouseEvent e)
2537 public void tabbedPane_focusGained(FocusEvent e)
2542 public void save_actionPerformed(ActionEvent e)
2547 public void reload_actionPerformed(ActionEvent e)
2552 public void newView_actionPerformed(ActionEvent e)
2557 public void textColour_actionPerformed()
2562 public void idRightAlign_actionPerformed(ActionEvent e)
2567 public void expandViews_actionPerformed(ActionEvent e)
2572 public void gatherViews_actionPerformed(ActionEvent e)
2577 public void buildTreeSortMenu()
2582 public void pageSetup_actionPerformed(ActionEvent e)
2587 public void alignmentProperties()
2592 protected void expand_newalign(ActionEvent e)
2594 // TODO Auto-generated method stub
2598 protected boolean isShowAutoCalculatedAbove()
2600 return showAutoCalculatedAbove;
2603 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2605 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2608 protected SequenceAnnotationOrder getAnnotationSortOrder()
2610 return annotationSortOrder;
2613 protected void setAnnotationSortOrder(
2614 SequenceAnnotationOrder annotationSortOrder)
2616 this.annotationSortOrder = annotationSortOrder;
2619 public Map<KeyStroke, JMenuItem> getAccelerators()
2621 return this.accelerators;
2625 * Returns the selected index of the tabbed pane, or -1 if none selected
2626 * (including the case where the tabbed pane has not been made visible).
2630 public int getTabIndex()
2632 return tabbedPane.getSelectedIndex();
2635 public JPanel getStatusPanel()
2641 * Sets a reference to the containing split frame. Also makes the 'toggle
2642 * split view' menu item visible and checked.
2646 public void setSplitFrame(SplitContainerI sf)
2648 this.splitFrame = sf;
2651 this.showComplementMenuItem.setVisible(true);
2652 this.showComplementMenuItem.setState(true);
2656 public SplitContainerI getSplitViewContainer()
2658 return this.splitFrame;
2661 protected void showComplement_actionPerformed(boolean complement)