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.analysis.GeneticCodeI;
25 import jalview.analysis.GeneticCodes;
26 import jalview.api.SplitContainerI;
27 import jalview.bin.Cache;
28 import jalview.gui.JvSwingUtils;
29 import jalview.gui.PaintRefresher;
30 import jalview.gui.Preferences;
31 import jalview.gui.TreePanel;
32 import jalview.io.FileFormats;
33 import jalview.schemes.ResidueColourScheme;
34 import jalview.util.MessageManager;
35 import jalview.util.Platform;
37 import java.awt.BorderLayout;
38 import java.awt.Color;
39 import java.awt.Component;
40 import java.awt.GridLayout;
41 import java.awt.event.ActionEvent;
42 import java.awt.event.ActionListener;
43 import java.awt.event.FocusAdapter;
44 import java.awt.event.FocusEvent;
45 import java.awt.event.InputEvent;
46 import java.awt.event.KeyEvent;
47 import java.awt.event.MouseAdapter;
48 import java.awt.event.MouseEvent;
49 import java.util.ArrayList;
50 import java.util.HashMap;
51 import java.util.List;
54 import javax.swing.BorderFactory;
55 import javax.swing.ButtonGroup;
56 import javax.swing.JCheckBoxMenuItem;
57 import javax.swing.JInternalFrame;
58 import javax.swing.JLabel;
59 import javax.swing.JMenu;
60 import javax.swing.JMenuBar;
61 import javax.swing.JMenuItem;
62 import javax.swing.JPanel;
63 import javax.swing.JRadioButtonMenuItem;
64 import javax.swing.JTabbedPane;
65 import javax.swing.KeyStroke;
66 import javax.swing.event.ChangeEvent;
67 import javax.swing.event.MenuEvent;
68 import javax.swing.event.MenuListener;
70 @SuppressWarnings("serial")
71 public class GAlignFrame extends JInternalFrame
73 protected JMenuBar alignFrameMenuBar = new JMenuBar();
75 protected JMenuItem closeMenuItem = new JMenuItem();
77 public JMenu webService = new JMenu();// BH 2019 was protected, but not
78 // sufficient for AlignFrame thread run
80 public JMenuItem webServiceNoServices;// BH 2019 was protected, but not
81 // sufficient for AlignFrame thread run
83 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
85 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
87 protected JMenu sortByAnnotScore = new JMenu();
89 public JLabel statusBar = new JLabel(); // BH 2019 was protected, but not
91 // AlignFrame.printWriter
93 protected JMenu outputTextboxMenu = new JMenu();
95 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
97 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
99 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
101 protected JMenuItem undoMenuItem = new JMenuItem();
103 protected JMenuItem redoMenuItem = new JMenuItem();
105 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
107 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
109 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
111 JMenuItem copy = new JMenuItem();
113 JMenuItem cut = new JMenuItem();
115 JMenu pasteMenu = new JMenu();
117 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
119 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
121 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
123 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
125 protected JCheckBoxMenuItem applyToAllGroups;
127 protected JMenu colourMenu = new JMenu();
129 protected JMenuItem textColour;
131 protected JCheckBoxMenuItem conservationMenuItem;
133 protected JMenuItem modifyConservation;
135 protected JCheckBoxMenuItem abovePIDThreshold;
137 protected JMenuItem modifyPID;
139 protected JRadioButtonMenuItem annotationColour;
141 protected JMenu sortByTreeMenu = new JMenu();
143 protected JMenu sort = new JMenu();
145 protected JMenuItem calculateTree = new JMenuItem();
147 protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
149 protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
151 protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
153 protected JMenu showTranslation = new JMenu();
155 protected JMenuItem showReverse = new JMenuItem();
157 protected JMenuItem showReverseComplement = new JMenuItem();
159 protected JMenu showProducts = new JMenu();
161 protected JMenuItem runGroovy = new JMenuItem();
163 protected JMenuItem loadVcf;
165 protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
167 protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
169 protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
171 protected JPanel statusPanel = new JPanel();
173 protected JMenuItem showAllSeqAnnotations = new JMenuItem();
175 protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
177 protected JMenuItem showAllAlAnnotations = new JMenuItem();
179 protected JMenuItem hideAllAlAnnotations = new JMenuItem();
181 protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
183 protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
185 protected JTabbedPane tabbedPane = new JTabbedPane();
187 protected JMenuItem reload = new JMenuItem();
189 protected JMenu formatMenu = new JMenu();
191 protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
193 protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
195 protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
197 protected JMenuItem gatherViews = new JMenuItem();
199 protected JMenuItem expandViews = new JMenuItem();
201 protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
203 protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
205 protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
207 protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
209 protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
211 protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
213 protected JMenuItem openFeatureSettings;
215 private SequenceAnnotationOrder annotationSortOrder;
217 private boolean showAutoCalculatedAbove = false;
219 private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
221 private SplitContainerI splitFrame;
228 // for Web-page embedding using id=align-frame-div
229 setName(Platform.getAppID("alignment"));
233 setJMenuBar(alignFrameMenuBar);
235 // dynamically fill save as menu with available formats
236 for (String ff : FileFormats.getInstance().getWritableFormats(true))
238 JMenuItem item = new JMenuItem(ff);
240 item.addActionListener(new ActionListener()
243 public void actionPerformed(ActionEvent e)
245 outputText_actionPerformed(e.getActionCommand());
249 outputTextboxMenu.add(item);
251 } catch (Exception e)
253 System.err.println(e.toString());
256 if (Platform.allowMnemonics()) // was "not mac and not JS"
258 closeMenuItem.setMnemonic('C');
259 outputTextboxMenu.setMnemonic('T');
260 undoMenuItem.setMnemonic('Z');
261 redoMenuItem.setMnemonic('0');
262 copy.setMnemonic('C');
263 cut.setMnemonic('U');
264 pasteMenu.setMnemonic('P');
265 reload.setMnemonic('R');
269 private void jbInit() throws Exception
273 JMenuItem saveAs = new JMenuItem(
274 MessageManager.getString("action.save_as"));
275 ActionListener al = new ActionListener()
278 public void actionPerformed(ActionEvent e)
280 saveAs_actionPerformed();
284 // FIXME getDefaultToolkit throws an exception in Headless mode
285 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, Platform.SHORTCUT_KEY_MASK | InputEvent.SHIFT_DOWN_MASK,
287 addMenuActionAndAccelerator(keyStroke, saveAs, al);
289 closeMenuItem.setText(MessageManager.getString("action.close"));
290 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W, Platform.SHORTCUT_KEY_MASK, false);
291 al = new ActionListener()
294 public void actionPerformed(ActionEvent e)
296 closeMenuItem_actionPerformed(false);
299 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
301 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
302 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
303 JMenu annotationsMenu = new JMenu(
304 MessageManager.getString("action.annotations"));
305 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
306 colourMenu.setText(MessageManager.getString("action.colour"));
307 JMenu calculateMenu = new JMenu(
308 MessageManager.getString("action.calculate"));
309 webService.setText(MessageManager.getString("action.web_service"));
310 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
311 MessageManager.getString("action.select_all"));
312 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
313 Platform.SHORTCUT_KEY_MASK, false);
314 al = new ActionListener()
317 public void actionPerformed(ActionEvent e)
319 selectAllSequenceMenuItem_actionPerformed(e);
322 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
324 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
325 MessageManager.getString("action.deselect_all"));
326 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
327 al = new ActionListener()
330 public void actionPerformed(ActionEvent e)
332 deselectAllSequenceMenuItem_actionPerformed(e);
335 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
337 JMenuItem invertSequenceMenuItem = new JMenuItem(
338 MessageManager.getString("action.invert_sequence_selection"));
339 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
340 Platform.SHORTCUT_KEY_MASK, false);
341 al = new ActionListener()
344 public void actionPerformed(ActionEvent e)
346 invertSequenceMenuItem_actionPerformed(e);
349 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
351 JMenuItem grpsFromSelection = new JMenuItem(
352 MessageManager.getString("action.make_groups_selection"));
353 grpsFromSelection.addActionListener(new ActionListener()
356 public void actionPerformed(ActionEvent e)
358 makeGrpsFromSelection_actionPerformed(e);
361 JMenuItem expandAlignment = new JMenuItem(
362 MessageManager.getString("action.view_flanking_regions"));
363 expandAlignment.setToolTipText(
364 MessageManager.getString("label.view_flanking_regions"));
365 expandAlignment.addActionListener(new ActionListener()
368 public void actionPerformed(ActionEvent e)
373 JMenuItem remove2LeftMenuItem = new JMenuItem(
374 MessageManager.getString("action.remove_left"));
375 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
376 Platform.SHORTCUT_KEY_MASK, false);
377 al = new ActionListener()
380 public void actionPerformed(ActionEvent e)
382 remove2LeftMenuItem_actionPerformed(e);
385 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
387 JMenuItem remove2RightMenuItem = new JMenuItem(
388 MessageManager.getString("action.remove_right"));
389 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
390 Platform.SHORTCUT_KEY_MASK, false);
391 al = new ActionListener()
394 public void actionPerformed(ActionEvent e)
396 remove2RightMenuItem_actionPerformed(e);
399 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
401 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
402 MessageManager.getString("action.remove_empty_columns"));
403 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
404 Platform.SHORTCUT_KEY_MASK, false);
405 al = new ActionListener()
408 public void actionPerformed(ActionEvent e)
410 removeGappedColumnMenuItem_actionPerformed(e);
413 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
415 JMenuItem removeAllGapsMenuItem = new JMenuItem(
416 MessageManager.getString("action.remove_all_gaps"));
417 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
418 Platform.SHORTCUT_KEY_MASK
419 | InputEvent.SHIFT_DOWN_MASK,
421 al = new ActionListener()
424 public void actionPerformed(ActionEvent e)
426 removeAllGapsMenuItem_actionPerformed(e);
429 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
431 JMenuItem justifyLeftMenuItem = new JMenuItem(
432 MessageManager.getString("action.left_justify_alignment"));
433 justifyLeftMenuItem.addActionListener(new ActionListener()
436 public void actionPerformed(ActionEvent e)
438 justifyLeftMenuItem_actionPerformed(e);
441 JMenuItem justifyRightMenuItem = new JMenuItem(
442 MessageManager.getString("action.right_justify_alignment"));
443 justifyRightMenuItem.addActionListener(new ActionListener()
446 public void actionPerformed(ActionEvent e)
448 justifyRightMenuItem_actionPerformed(e);
451 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
452 viewBoxesMenuItem.setState(true);
453 viewBoxesMenuItem.addActionListener(new ActionListener()
456 public void actionPerformed(ActionEvent e)
458 viewBoxesMenuItem_actionPerformed(e);
461 viewTextMenuItem.setText(MessageManager.getString("action.text"));
462 viewTextMenuItem.setState(true);
463 viewTextMenuItem.addActionListener(new ActionListener()
466 public void actionPerformed(ActionEvent e)
468 viewTextMenuItem_actionPerformed(e);
471 showNonconservedMenuItem
472 .setText(MessageManager.getString("label.show_non_conserved"));
473 showNonconservedMenuItem.setState(false);
474 showNonconservedMenuItem.addActionListener(new ActionListener()
477 public void actionPerformed(ActionEvent e)
479 showUnconservedMenuItem_actionPerformed(e);
482 JMenuItem sortPairwiseMenuItem = new JMenuItem(
483 MessageManager.getString("action.by_pairwise_id"));
484 sortPairwiseMenuItem.addActionListener(new ActionListener()
487 public void actionPerformed(ActionEvent e)
489 sortPairwiseMenuItem_actionPerformed(e);
492 JMenuItem sortIDMenuItem = new JMenuItem(
493 MessageManager.getString("action.by_id"));
494 sortIDMenuItem.addActionListener(new ActionListener()
497 public void actionPerformed(ActionEvent e)
499 sortIDMenuItem_actionPerformed(e);
502 JMenuItem sortLengthMenuItem = new JMenuItem(
503 MessageManager.getString("action.by_length"));
504 sortLengthMenuItem.addActionListener(new ActionListener()
507 public void actionPerformed(ActionEvent e)
509 sortLengthMenuItem_actionPerformed(e);
512 JMenuItem sortGroupMenuItem = new JMenuItem(
513 MessageManager.getString("action.by_group"));
514 sortGroupMenuItem.addActionListener(new ActionListener()
517 public void actionPerformed(ActionEvent e)
519 sortGroupMenuItem_actionPerformed(e);
523 JMenuItem removeRedundancyMenuItem = new JMenuItem(
524 MessageManager.getString("action.remove_redundancy"));
525 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
526 Platform.SHORTCUT_KEY_MASK, false);
527 al = new ActionListener()
530 public void actionPerformed(ActionEvent e)
532 removeRedundancyMenuItem_actionPerformed(e);
535 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
537 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
538 MessageManager.getString("action.pairwise_alignment"));
539 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
542 public void actionPerformed(ActionEvent e)
544 pairwiseAlignmentMenuItem_actionPerformed(e);
548 this.getContentPane().setLayout(new BorderLayout());
549 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
550 statusBar.setBackground(Color.white);
551 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
552 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
553 statusBar.setText(MessageManager.getString("label.status_bar"));
555 .setText(MessageManager.getString("label.out_to_textbox"));
557 annotationPanelMenuItem.setActionCommand("");
558 annotationPanelMenuItem
559 .setText(MessageManager.getString("label.show_annotations"));
560 annotationPanelMenuItem
561 .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
562 annotationPanelMenuItem.addActionListener(new ActionListener()
565 public void actionPerformed(ActionEvent e)
567 annotationPanelMenuItem_actionPerformed(e);
570 showAllAlAnnotations.setText(
571 MessageManager.getString("label.show_all_al_annotations"));
572 final boolean isAnnotationPanelShown = annotationPanelMenuItem
574 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
575 showAllAlAnnotations.addActionListener(new ActionListener()
578 public void actionPerformed(ActionEvent e)
580 showAllAnnotations_actionPerformed(false, true);
583 hideAllAlAnnotations.setText(
584 MessageManager.getString("label.hide_all_al_annotations"));
585 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
586 hideAllAlAnnotations.addActionListener(new ActionListener()
589 public void actionPerformed(ActionEvent e)
591 hideAllAnnotations_actionPerformed(false, true);
594 showAllSeqAnnotations.setText(
595 MessageManager.getString("label.show_all_seq_annotations"));
596 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
597 showAllSeqAnnotations.addActionListener(new ActionListener()
600 public void actionPerformed(ActionEvent e)
602 showAllAnnotations_actionPerformed(true, false);
605 hideAllSeqAnnotations.setText(
606 MessageManager.getString("label.hide_all_seq_annotations"));
607 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
608 hideAllSeqAnnotations.addActionListener(new ActionListener()
611 public void actionPerformed(ActionEvent e)
613 hideAllAnnotations_actionPerformed(true, false);
616 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
617 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
618 SequenceAnnotationOrder.NONE.name()));
619 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
620 MessageManager.getString("label.sort_annotations_by_sequence"));
621 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
622 MessageManager.getString("label.sort_annotations_by_label"));
624 sortAnnBySequence.setSelected(
625 sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
626 sortAnnBySequence.addActionListener(new ActionListener()
629 public void actionPerformed(ActionEvent e)
631 boolean newState = sortAnnBySequence.getState();
632 sortAnnByLabel.setSelected(false);
633 setAnnotationSortOrder(
634 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
635 : SequenceAnnotationOrder.NONE);
636 sortAnnotations_actionPerformed();
639 sortAnnByLabel.setSelected(
640 sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
641 sortAnnByLabel.addActionListener(new ActionListener()
644 public void actionPerformed(ActionEvent e)
646 boolean newState = sortAnnByLabel.getState();
647 sortAnnBySequence.setSelected(false);
648 setAnnotationSortOrder(
649 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
650 : SequenceAnnotationOrder.NONE);
651 sortAnnotations_actionPerformed();
654 colourTextMenuItem = new JCheckBoxMenuItem(
655 MessageManager.getString("label.colour_text"));
656 colourTextMenuItem.addActionListener(new ActionListener()
659 public void actionPerformed(ActionEvent e)
661 colourTextMenuItem_actionPerformed(e);
665 JMenuItem htmlMenuItem = new JMenuItem(
666 MessageManager.getString("label.html"));
667 htmlMenuItem.addActionListener(new ActionListener()
670 public void actionPerformed(ActionEvent e)
672 htmlMenuItem_actionPerformed(e);
676 JMenuItem createBioJS = new JMenuItem(
677 MessageManager.getString("label.biojs_html_export"));
678 createBioJS.addActionListener(new java.awt.event.ActionListener()
681 public void actionPerformed(ActionEvent e)
683 bioJSMenuItem_actionPerformed(e);
687 JMenuItem overviewMenuItem = new JMenuItem(
688 MessageManager.getString("label.overview_window"));
689 overviewMenuItem.addActionListener(new ActionListener()
692 public void actionPerformed(ActionEvent e)
694 overviewMenuItem_actionPerformed(e);
698 undoMenuItem.setEnabled(false);
699 undoMenuItem.setText(MessageManager.getString("action.undo"));
700 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
701 Platform.SHORTCUT_KEY_MASK, false);
702 al = new ActionListener()
705 public void actionPerformed(ActionEvent e)
707 undoMenuItem_actionPerformed(e);
710 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
712 redoMenuItem.setEnabled(false);
713 redoMenuItem.setText(MessageManager.getString("action.redo"));
714 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
715 Platform.SHORTCUT_KEY_MASK, false);
716 al = new ActionListener()
719 public void actionPerformed(ActionEvent e)
721 redoMenuItem_actionPerformed(e);
724 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
726 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
727 wrapMenuItem.addActionListener(new ActionListener()
730 public void actionPerformed(ActionEvent e)
732 wrapMenuItem_actionPerformed(e);
736 JMenuItem printMenuItem = new JMenuItem(
737 MessageManager.getString("action.print"));
738 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
739 Platform.SHORTCUT_KEY_MASK, false);
740 al = new ActionListener()
743 public void actionPerformed(ActionEvent e)
745 printMenuItem_actionPerformed(e);
748 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
751 .setText(MessageManager.getString("action.show_gaps"));
752 renderGapsMenuItem.setState(true);
753 renderGapsMenuItem.addActionListener(new ActionListener()
756 public void actionPerformed(ActionEvent e)
758 renderGapsMenuItem_actionPerformed(e);
762 JMenuItem findMenuItem = new JMenuItem(
763 MessageManager.getString("action.find"));
764 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
765 Platform.SHORTCUT_KEY_MASK, false);
766 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
767 MessageManager.getString("label.find_tip")));
768 al = new ActionListener()
771 public void actionPerformed(ActionEvent e)
773 findMenuItem_actionPerformed(e);
776 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
778 showSeqFeatures.setText(
779 MessageManager.getString("label.show_sequence_features"));
780 showSeqFeatures.addActionListener(new ActionListener()
783 public void actionPerformed(ActionEvent actionEvent)
785 showSeqFeatures_actionPerformed(actionEvent);
789 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
790 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
791 * void actionPerformed(ActionEvent actionEvent) {
792 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
795 .setText(MessageManager.getString("label.show_database_refs"));
796 showDbRefsMenuitem.addActionListener(new ActionListener()
800 public void actionPerformed(ActionEvent e)
802 showDbRefs_actionPerformed(e);
806 showNpFeatsMenuitem.setText(
807 MessageManager.getString("label.show_non_positional_features"));
808 showNpFeatsMenuitem.addActionListener(new ActionListener()
812 public void actionPerformed(ActionEvent e)
814 showNpFeats_actionPerformed(e);
818 showGroupConservation
819 .setText(MessageManager.getString("label.group_conservation"));
820 showGroupConservation.addActionListener(new ActionListener()
824 public void actionPerformed(ActionEvent e)
826 showGroupConservation_actionPerformed(e);
832 .setText(MessageManager.getString("label.group_consensus"));
833 showGroupConsensus.addActionListener(new ActionListener()
837 public void actionPerformed(ActionEvent e)
839 showGroupConsensus_actionPerformed(e);
843 showConsensusHistogram.setText(
844 MessageManager.getString("label.show_consensus_histogram"));
845 showConsensusHistogram.addActionListener(new ActionListener()
849 public void actionPerformed(ActionEvent e)
851 showConsensusHistogram_actionPerformed(e);
856 .setText(MessageManager.getString("label.show_consensus_logo"));
857 showSequenceLogo.addActionListener(new ActionListener()
861 public void actionPerformed(ActionEvent e)
863 showSequenceLogo_actionPerformed(e);
867 normaliseSequenceLogo
868 .setText(MessageManager.getString("label.norm_consensus_logo"));
869 normaliseSequenceLogo.addActionListener(new ActionListener()
873 public void actionPerformed(ActionEvent e)
875 normaliseSequenceLogo_actionPerformed(e);
879 applyAutoAnnotationSettings
880 .setText(MessageManager.getString("label.apply_all_groups"));
881 applyAutoAnnotationSettings.setState(false);
882 applyAutoAnnotationSettings.setVisible(true);
883 applyAutoAnnotationSettings.addActionListener(new ActionListener()
886 public void actionPerformed(ActionEvent e)
888 applyAutoAnnotationSettings_actionPerformed(e);
892 ButtonGroup buttonGroup = new ButtonGroup();
893 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
894 MessageManager.getString("label.show_first"));
895 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
896 MessageManager.getString("label.show_last"));
897 buttonGroup.add(showAutoFirst);
898 buttonGroup.add(showAutoLast);
899 final boolean autoFirst = Cache
900 .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
901 showAutoFirst.setSelected(autoFirst);
902 setShowAutoCalculatedAbove(autoFirst);
903 showAutoFirst.addActionListener(new ActionListener()
906 public void actionPerformed(ActionEvent e)
908 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
909 sortAnnotations_actionPerformed();
912 showAutoLast.setSelected(!showAutoFirst.isSelected());
913 showAutoLast.addActionListener(new ActionListener()
916 public void actionPerformed(ActionEvent e)
918 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
919 sortAnnotations_actionPerformed();
923 JMenuItem deleteGroups = new JMenuItem(
924 MessageManager.getString("action.undefine_groups"));
925 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
926 Platform.SHORTCUT_KEY_MASK, false);
927 al = new ActionListener()
930 public void actionPerformed(ActionEvent e)
932 deleteGroups_actionPerformed(e);
935 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
937 JMenuItem annotationColumn = new JMenuItem(
938 MessageManager.getString("action.select_by_annotation"));
939 annotationColumn.addActionListener(new ActionListener()
942 public void actionPerformed(ActionEvent e)
944 annotationColumn_actionPerformed(e);
948 JMenuItem createGroup = new JMenuItem(
949 MessageManager.getString("action.create_group"));
950 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
951 Platform.SHORTCUT_KEY_MASK, false);
952 al = new ActionListener()
955 public void actionPerformed(ActionEvent e)
957 createGroup_actionPerformed(e);
960 addMenuActionAndAccelerator(keyStroke, createGroup, al);
962 JMenuItem unGroup = new JMenuItem(
963 MessageManager.getString("action.remove_group"));
964 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
965 Platform.SHORTCUT_KEY_MASK
966 | InputEvent.SHIFT_DOWN_MASK,
968 al = new ActionListener()
971 public void actionPerformed(ActionEvent e)
973 unGroup_actionPerformed(e);
976 addMenuActionAndAccelerator(keyStroke, unGroup, al);
978 copy.setText(MessageManager.getString("action.copy"));
979 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
980 Platform.SHORTCUT_KEY_MASK, false);
982 al = new ActionListener()
985 public void actionPerformed(ActionEvent e)
987 copy_actionPerformed();
990 addMenuActionAndAccelerator(keyStroke, copy, al);
992 cut.setText(MessageManager.getString("action.cut"));
993 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
994 Platform.SHORTCUT_KEY_MASK, false);
995 al = new ActionListener()
998 public void actionPerformed(ActionEvent e)
1000 cut_actionPerformed();
1003 addMenuActionAndAccelerator(keyStroke, cut, al);
1005 JMenuItem delete = new JMenuItem(
1006 MessageManager.getString("action.delete"));
1007 delete.addActionListener(new ActionListener()
1010 public void actionPerformed(ActionEvent e)
1012 delete_actionPerformed();
1016 pasteMenu.setText(MessageManager.getString("action.paste"));
1017 JMenuItem pasteNew = new JMenuItem(
1018 MessageManager.getString("label.to_new_alignment"));
1019 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1020 Platform.SHORTCUT_KEY_MASK
1021 | InputEvent.SHIFT_DOWN_MASK,
1023 al = new ActionListener()
1026 public void actionPerformed(ActionEvent e)
1028 pasteNew_actionPerformed(e);
1031 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1033 JMenuItem pasteThis = new JMenuItem(
1034 MessageManager.getString("label.to_this_alignment"));
1035 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1036 Platform.SHORTCUT_KEY_MASK, false);
1037 al = new ActionListener()
1040 public void actionPerformed(ActionEvent e)
1042 pasteThis_actionPerformed(e);
1045 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1047 JMenuItem createPNG = new JMenuItem("PNG");
1048 createPNG.addActionListener(new ActionListener()
1051 public void actionPerformed(ActionEvent e)
1056 createPNG.setActionCommand(
1057 MessageManager.getString("label.save_png_image"));
1059 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1060 font.addActionListener(new ActionListener()
1063 public void actionPerformed(ActionEvent e)
1065 font_actionPerformed(e);
1069 MessageManager.getString("label.show_sequence_limits"));
1070 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1071 seqLimits.addActionListener(new ActionListener()
1074 public void actionPerformed(ActionEvent e)
1076 seqLimit_actionPerformed(e);
1079 JMenuItem epsFile = new JMenuItem("EPS");
1080 epsFile.addActionListener(new ActionListener()
1083 public void actionPerformed(ActionEvent e)
1089 JMenuItem createSVG = new JMenuItem("SVG");
1090 createSVG.addActionListener(new ActionListener()
1093 public void actionPerformed(ActionEvent e)
1099 JMenuItem loadTreeMenuItem = new JMenuItem(
1100 MessageManager.getString("label.load_associated_tree"));
1101 loadTreeMenuItem.setActionCommand(
1102 MessageManager.getString("label.load_tree_for_sequence_set"));
1103 loadTreeMenuItem.addActionListener(new ActionListener()
1106 public void actionPerformed(ActionEvent e)
1108 loadTreeMenuItem_actionPerformed(e);
1112 scaleAbove.setVisible(false);
1113 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1114 scaleAbove.addActionListener(new ActionListener()
1117 public void actionPerformed(ActionEvent e)
1119 scaleAbove_actionPerformed(e);
1122 scaleLeft.setVisible(false);
1123 scaleLeft.setSelected(true);
1124 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1125 scaleLeft.addActionListener(new ActionListener()
1128 public void actionPerformed(ActionEvent e)
1130 scaleLeft_actionPerformed(e);
1133 scaleRight.setVisible(false);
1134 scaleRight.setSelected(true);
1135 scaleRight.setText(MessageManager.getString("action.scale_right"));
1136 scaleRight.addActionListener(new ActionListener()
1139 public void actionPerformed(ActionEvent e)
1141 scaleRight_actionPerformed(e);
1144 centreColumnLabelsMenuItem.setVisible(true);
1145 centreColumnLabelsMenuItem.setState(false);
1146 centreColumnLabelsMenuItem.setText(
1147 MessageManager.getString("label.centre_column_labels"));
1148 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1151 public void actionPerformed(ActionEvent e)
1153 centreColumnLabels_actionPerformed(e);
1156 followHighlightMenuItem.setVisible(true);
1157 followHighlightMenuItem.setState(true);
1158 followHighlightMenuItem
1159 .setText(MessageManager.getString("label.automatic_scrolling"));
1160 followHighlightMenuItem.addActionListener(new ActionListener()
1164 public void actionPerformed(ActionEvent e)
1166 followHighlight_actionPerformed();
1172 .setText(MessageManager.getString("action.by_tree_order"));
1173 sort.setText(MessageManager.getString("action.sort"));
1174 sort.addMenuListener(new MenuListener()
1177 public void menuSelected(MenuEvent e)
1179 enableSortMenuOptions();
1183 public void menuDeselected(MenuEvent e)
1188 public void menuCanceled(MenuEvent e)
1192 sortByTreeMenu.addMenuListener(new MenuListener()
1195 public void menuSelected(MenuEvent e)
1197 buildTreeSortMenu();
1201 public void menuDeselected(MenuEvent e)
1206 public void menuCanceled(MenuEvent e)
1211 .setText(MessageManager.getString("label.sort_by_score"));
1212 sort.add(sortByAnnotScore);
1213 sort.addMenuListener(new javax.swing.event.MenuListener()
1217 public void menuCanceled(MenuEvent e)
1222 public void menuDeselected(MenuEvent e)
1227 public void menuSelected(MenuEvent e)
1229 buildSortByAnnotationScoresMenu();
1232 sortByAnnotScore.setVisible(false);
1235 .setText(MessageManager.getString("action.calculate_tree_pca"));
1237 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1239 .setState(jalview.bin.Cache.getDefault("PAD_GAPS", false));
1240 padGapsMenuitem.addActionListener(new ActionListener()
1243 public void actionPerformed(ActionEvent e)
1245 padGapsMenuitem_actionPerformed(e);
1248 JMenuItem vamsasStore = new JMenuItem(
1249 MessageManager.getString("label.vamsas_store"));
1250 vamsasStore.setVisible(false);
1251 vamsasStore.addActionListener(new ActionListener()
1254 public void actionPerformed(ActionEvent e)
1256 vamsasStore_actionPerformed(e);
1261 * Translate as cDNA with sub-menu of translation tables
1264 .setText(MessageManager.getString("label.translate_cDNA"));
1265 boolean first = true;
1266 for (final GeneticCodeI table : GeneticCodes.getInstance()
1269 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1270 showTranslation.add(item);
1271 item.addActionListener(new ActionListener()
1274 public void actionPerformed(ActionEvent e)
1276 showTranslation_actionPerformed(table);
1281 showTranslation.addSeparator();
1286 showReverse.setText(MessageManager.getString("label.reverse"));
1287 showReverse.addActionListener(new ActionListener()
1290 public void actionPerformed(ActionEvent e)
1292 showReverse_actionPerformed(false);
1295 showReverseComplement
1296 .setText(MessageManager.getString("label.reverse_complement"));
1297 showReverseComplement.addActionListener(new ActionListener()
1300 public void actionPerformed(ActionEvent e)
1302 showReverse_actionPerformed(true);
1306 JMenuItem extractScores = new JMenuItem(
1307 MessageManager.getString("label.extract_scores"));
1308 extractScores.addActionListener(new ActionListener()
1311 public void actionPerformed(ActionEvent e)
1313 extractScores_actionPerformed(e);
1316 extractScores.setVisible(true);
1317 // JBPNote: TODO: make gui for regex based score extraction
1319 // for show products actions see AlignFrame.canShowProducts
1320 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1322 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1323 runGroovy.setToolTipText(
1324 MessageManager.getString("label.run_groovy_tip"));
1325 runGroovy.addActionListener(new ActionListener()
1328 public void actionPerformed(ActionEvent e)
1330 runGroovy_actionPerformed();
1334 openFeatureSettings = new JMenuItem(
1335 MessageManager.getString("action.feature_settings"));
1336 openFeatureSettings.addActionListener(new ActionListener()
1339 public void actionPerformed(ActionEvent e)
1341 featureSettings_actionPerformed(e);
1346 * add sub-menu of database we can fetch from
1348 JMenuItem fetchSequence = new JMenuItem(
1349 MessageManager.getString("label.fetch_sequences"));
1350 fetchSequence.addActionListener(new ActionListener()
1353 public void actionPerformed(ActionEvent e)
1355 fetchSequence_actionPerformed();
1359 JMenuItem associatedData = new JMenuItem(
1360 MessageManager.getString("label.load_features_annotations"));
1361 associatedData.addActionListener(new ActionListener()
1364 public void actionPerformed(ActionEvent e)
1366 associatedData_actionPerformed(e);
1369 loadVcf = new JMenuItem(
1370 MessageManager.getString("label.load_vcf_file"));
1371 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1372 loadVcf.addActionListener(new ActionListener()
1375 public void actionPerformed(ActionEvent e)
1377 loadVcf_actionPerformed();
1380 autoCalculate.setText(
1381 MessageManager.getString("label.autocalculate_consensus"));
1382 autoCalculate.setState(
1383 jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1384 autoCalculate.addActionListener(new ActionListener()
1387 public void actionPerformed(ActionEvent e)
1389 autoCalculate_actionPerformed(e);
1393 MessageManager.getString("label.sort_alignment_new_tree"));
1394 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1395 "label.enable_automatically_sort_alignment_when_open_new_tree"));
1397 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1398 sortByTree.addActionListener(new ActionListener()
1401 public void actionPerformed(ActionEvent e)
1403 sortByTreeOption_actionPerformed(e);
1407 listenToViewSelections.setText(
1408 MessageManager.getString("label.listen_for_selections"));
1409 listenToViewSelections
1410 .setToolTipText("<html>" + MessageManager.getString(
1411 "label.selections_mirror_selections_made_same_sequences_other_views"));
1412 listenToViewSelections.setState(false);
1413 listenToViewSelections.addActionListener(new ActionListener()
1416 public void actionPerformed(ActionEvent e)
1418 listenToViewSelections_actionPerformed(e);
1422 JMenu addSequenceMenu = new JMenu(
1423 MessageManager.getString("label.add_sequences"));
1424 JMenuItem addFromFile = new JMenuItem(
1425 MessageManager.getString("label.from_file"));
1426 addFromFile.addActionListener(new ActionListener()
1429 public void actionPerformed(ActionEvent e)
1431 addFromFile_actionPerformed(e);
1434 JMenuItem addFromText = new JMenuItem(
1435 MessageManager.getString("label.from_textbox"));
1436 addFromText.addActionListener(new ActionListener()
1439 public void actionPerformed(ActionEvent e)
1441 addFromText_actionPerformed(e);
1444 JMenuItem addFromURL = new JMenuItem(
1445 MessageManager.getString("label.from_url"));
1446 addFromURL.addActionListener(new ActionListener()
1449 public void actionPerformed(ActionEvent e)
1451 addFromURL_actionPerformed(e);
1454 JMenuItem exportFeatures = new JMenuItem(
1455 MessageManager.getString("label.export_features"));
1456 exportFeatures.addActionListener(new ActionListener()
1459 public void actionPerformed(ActionEvent e)
1461 exportFeatures_actionPerformed(e);
1464 JMenuItem exportAnnotations = new JMenuItem(
1465 MessageManager.getString("label.export_annotations"));
1466 exportAnnotations.addActionListener(new ActionListener()
1469 public void actionPerformed(ActionEvent e)
1471 exportAnnotations_actionPerformed(e);
1474 statusPanel.setLayout(new GridLayout());
1475 JMenuItem showAllSeqs = new JMenuItem(
1476 MessageManager.getString("label.all_sequences"));
1477 showAllSeqs.setToolTipText(
1478 MessageManager.getString("label.toggle_sequence_visibility"));
1479 showAllSeqs.addActionListener(new ActionListener()
1482 public void actionPerformed(ActionEvent e)
1484 showAllSeqs_actionPerformed(e);
1487 JMenuItem showAllColumns = new JMenuItem(
1488 MessageManager.getString("label.all_columns"));
1489 showAllColumns.setToolTipText(
1490 MessageManager.getString("label.toggle_columns_visibility"));
1491 showAllColumns.addActionListener(new ActionListener()
1494 public void actionPerformed(ActionEvent e)
1496 showAllColumns_actionPerformed(e);
1499 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1500 JMenuItem hideSelSequences = new JMenuItem(
1501 MessageManager.getString("label.selected_sequences"));
1502 hideSelSequences.setToolTipText(
1503 MessageManager.getString("label.toggle_sequence_visibility"));
1504 hideSelSequences.addActionListener(new ActionListener()
1507 public void actionPerformed(ActionEvent e)
1509 hideSelSequences_actionPerformed(e);
1512 JMenuItem hideSelColumns = new JMenuItem(
1513 MessageManager.getString("label.selected_columns"));
1514 hideSelColumns.setToolTipText(
1515 MessageManager.getString("label.toggle_columns_visibility"));
1516 hideSelColumns.addActionListener(new ActionListener()
1519 public void actionPerformed(ActionEvent e)
1521 hideSelColumns_actionPerformed(e);
1524 JMenuItem hideAllSelection = new JMenuItem(
1525 MessageManager.getString("label.selected_region"));
1526 hideAllSelection.addActionListener(new ActionListener()
1529 public void actionPerformed(ActionEvent e)
1531 hideAllSelection_actionPerformed(e);
1534 // TODO: should be hidden if no selection exists.
1535 JMenuItem hideAllButSelection = new JMenuItem(
1536 MessageManager.getString("label.all_but_selected_region"));
1537 hideAllButSelection.addActionListener(new ActionListener()
1540 public void actionPerformed(ActionEvent e)
1542 hideAllButSelection_actionPerformed(e);
1545 JMenuItem showAllhidden = new JMenuItem(
1546 MessageManager.getString("label.all_sequences_columns"));
1547 showAllhidden.setToolTipText(MessageManager
1548 .getString("label.toggles_visibility_hidden_selected_regions"));
1549 showAllhidden.addActionListener(new ActionListener()
1552 public void actionPerformed(ActionEvent e)
1554 showAllhidden_actionPerformed(e);
1557 hiddenMarkers.setText(
1558 MessageManager.getString("action.show_hidden_markers"));
1559 hiddenMarkers.addActionListener(new ActionListener()
1562 public void actionPerformed(ActionEvent e)
1564 hiddenMarkers_actionPerformed(e);
1568 JMenuItem invertColSel = new JMenuItem(
1569 MessageManager.getString("action.invert_column_selection"));
1570 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1571 Platform.SHORTCUT_KEY_MASK
1572 | InputEvent.ALT_DOWN_MASK,
1574 al = new ActionListener()
1577 public void actionPerformed(ActionEvent e)
1579 invertColSel_actionPerformed(e);
1582 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1584 showComplementMenuItem.setVisible(false);
1585 showComplementMenuItem.addActionListener(new ActionListener()
1588 public void actionPerformed(ActionEvent e)
1590 showComplement_actionPerformed(showComplementMenuItem.getState());
1594 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1597 public void stateChanged(ChangeEvent evt)
1599 JTabbedPane pane = (JTabbedPane) evt.getSource();
1600 int sel = pane.getSelectedIndex();
1601 tabSelectionChanged(sel);
1604 tabbedPane.addMouseListener(new MouseAdapter()
1607 public void mousePressed(MouseEvent e)
1609 if (e.isPopupTrigger()) // Mac
1611 tabbedPane_mousePressed(e);
1616 public void mouseReleased(MouseEvent e)
1618 if (e.isPopupTrigger()) // Windows
1620 tabbedPane_mousePressed(e);
1624 tabbedPane.addFocusListener(new FocusAdapter()
1627 public void focusGained(FocusEvent e)
1629 tabbedPane_focusGained(e);
1633 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1634 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1635 Platform.SHORTCUT_KEY_MASK, false);
1636 al = new ActionListener()
1639 public void actionPerformed(ActionEvent e)
1641 save_actionPerformed(e);
1644 addMenuActionAndAccelerator(keyStroke, save, al);
1646 reload.setEnabled(false);
1647 reload.setText(MessageManager.getString("action.reload"));
1648 reload.addActionListener(new ActionListener()
1651 public void actionPerformed(ActionEvent e)
1653 reload_actionPerformed(e);
1657 JMenuItem newView = new JMenuItem(
1658 MessageManager.getString("action.new_view"));
1659 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1660 Platform.SHORTCUT_KEY_MASK, false);
1661 al = new ActionListener()
1664 public void actionPerformed(ActionEvent e)
1666 newView_actionPerformed(e);
1669 addMenuActionAndAccelerator(keyStroke, newView, al);
1671 tabbedPane.setToolTipText("<html><i>"
1672 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1675 formatMenu.setText(MessageManager.getString("action.format"));
1676 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1678 idRightAlign.setText(
1679 MessageManager.getString("label.right_align_sequence_id"));
1680 idRightAlign.addActionListener(new ActionListener()
1683 public void actionPerformed(ActionEvent e)
1685 idRightAlign_actionPerformed(e);
1689 gatherViews.setEnabled(false);
1690 gatherViews.setText(MessageManager.getString("action.gather_views"));
1691 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1692 al = new ActionListener()
1695 public void actionPerformed(ActionEvent e)
1697 gatherViews_actionPerformed(e);
1700 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1702 expandViews.setEnabled(false);
1703 expandViews.setText(MessageManager.getString("action.expand_views"));
1704 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1705 al = new ActionListener()
1708 public void actionPerformed(ActionEvent e)
1710 expandViews_actionPerformed(e);
1713 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1715 JMenuItem pageSetup = new JMenuItem(
1716 MessageManager.getString("action.page_setup"));
1717 pageSetup.addActionListener(new ActionListener()
1720 public void actionPerformed(ActionEvent e)
1722 pageSetup_actionPerformed(e);
1725 JMenuItem alignmentProperties = new JMenuItem(
1726 MessageManager.getString("label.alignment_props"));
1727 alignmentProperties.addActionListener(new ActionListener()
1730 public void actionPerformed(ActionEvent actionEvent)
1732 alignmentProperties();
1735 JMenuItem selectHighlighted = new JMenuItem(
1736 MessageManager.getString("action.select_highlighted_columns"));
1737 selectHighlighted.setToolTipText(JvSwingUtils.wrapTooltip(true,
1738 MessageManager.getString("tooltip.select_highlighted_columns")));
1739 al = new ActionListener()
1742 public void actionPerformed(ActionEvent actionEvent)
1744 selectHighlightedColumns_actionPerformed(actionEvent);
1747 selectHighlighted.addActionListener(al);
1748 JMenu tooltipSettingsMenu = new JMenu(
1749 MessageManager.getString("label.sequence_id_tooltip"));
1750 JMenu autoAnnMenu = new JMenu(
1751 MessageManager.getString("label.autocalculated_annotation"));
1753 JMenu exportImageMenu = new JMenu(
1754 MessageManager.getString("label.export_image"));
1755 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1756 alignFrameMenuBar.add(fileMenu);
1757 alignFrameMenuBar.add(editMenu);
1758 alignFrameMenuBar.add(selectMenu);
1759 alignFrameMenuBar.add(viewMenu);
1760 alignFrameMenuBar.add(annotationsMenu);
1761 alignFrameMenuBar.add(formatMenu);
1762 alignFrameMenuBar.add(colourMenu);
1763 alignFrameMenuBar.add(calculateMenu);
1764 if (!Platform.isJS())
1766 alignFrameMenuBar.add(webService);
1769 fileMenu.add(fetchSequence);
1770 fileMenu.add(addSequenceMenu);
1771 fileMenu.add(reload);
1772 fileMenu.addSeparator();
1773 fileMenu.add(vamsasStore);
1775 fileMenu.add(saveAs);
1776 fileMenu.add(outputTextboxMenu);
1777 fileMenu.add(pageSetup);
1778 fileMenu.add(printMenuItem);
1779 fileMenu.addSeparator();
1780 fileMenu.add(exportImageMenu);
1781 fileMenu.add(exportFeatures);
1782 fileMenu.add(exportAnnotations);
1783 fileMenu.add(loadTreeMenuItem);
1784 fileMenu.add(associatedData);
1785 if (!Platform.isJS())
1787 fileMenu.add(loadVcf);
1789 fileMenu.addSeparator();
1790 fileMenu.add(closeMenuItem);
1792 pasteMenu.add(pasteNew);
1793 pasteMenu.add(pasteThis);
1794 editMenu.add(undoMenuItem);
1795 editMenu.add(redoMenuItem);
1798 editMenu.add(pasteMenu);
1799 editMenu.add(delete);
1800 editMenu.addSeparator();
1801 editMenu.add(remove2LeftMenuItem);
1802 editMenu.add(remove2RightMenuItem);
1803 editMenu.add(removeGappedColumnMenuItem);
1804 editMenu.add(removeAllGapsMenuItem);
1805 editMenu.add(removeRedundancyMenuItem);
1806 editMenu.addSeparator();
1807 // dont add these yet in the CVS build - they cannot be undone!
1808 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1809 // editMenu.add(justifyLeftMenuItem);
1810 // editMenu.add(justifyRightMenuItem);
1811 // editMenu.addSeparator();
1812 editMenu.add(padGapsMenuitem);
1814 showMenu.add(showAllColumns);
1815 showMenu.add(showAllSeqs);
1816 showMenu.add(showAllhidden);
1817 hideMenu.add(hideSelColumns);
1818 hideMenu.add(hideSelSequences);
1819 hideMenu.add(hideAllSelection);
1820 hideMenu.add(hideAllButSelection);
1821 viewMenu.add(newView);
1822 viewMenu.add(expandViews);
1823 viewMenu.add(gatherViews);
1824 viewMenu.addSeparator();
1825 viewMenu.add(showMenu);
1826 viewMenu.add(hideMenu);
1827 viewMenu.add(showComplementMenuItem);
1828 viewMenu.addSeparator();
1829 viewMenu.add(followHighlightMenuItem);
1830 viewMenu.addSeparator();
1831 viewMenu.add(showSeqFeatures);
1832 // viewMenu.add(showSeqFeaturesHeight);
1833 viewMenu.add(openFeatureSettings);
1834 tooltipSettingsMenu.add(showDbRefsMenuitem);
1835 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1836 viewMenu.add(tooltipSettingsMenu);
1837 viewMenu.addSeparator();
1838 viewMenu.add(alignmentProperties);
1839 viewMenu.addSeparator();
1840 viewMenu.add(overviewMenuItem);
1842 annotationsMenu.add(annotationPanelMenuItem);
1843 annotationsMenu.addSeparator();
1844 annotationsMenu.add(showAllAlAnnotations);
1845 annotationsMenu.add(hideAllAlAnnotations);
1846 annotationsMenu.addSeparator();
1847 annotationsMenu.add(showAllSeqAnnotations);
1848 annotationsMenu.add(hideAllSeqAnnotations);
1849 annotationsMenu.add(sortAnnBySequence);
1850 annotationsMenu.add(sortAnnByLabel);
1851 annotationsMenu.addSeparator();
1852 autoAnnMenu.add(showAutoFirst);
1853 autoAnnMenu.add(showAutoLast);
1854 autoAnnMenu.addSeparator();
1855 autoAnnMenu.add(applyAutoAnnotationSettings);
1856 autoAnnMenu.add(showConsensusHistogram);
1857 autoAnnMenu.add(showSequenceLogo);
1858 autoAnnMenu.add(normaliseSequenceLogo);
1859 autoAnnMenu.addSeparator();
1860 autoAnnMenu.add(showGroupConservation);
1861 autoAnnMenu.add(showGroupConsensus);
1862 annotationsMenu.add(autoAnnMenu);
1864 sort.add(sortIDMenuItem);
1865 sort.add(sortLengthMenuItem);
1866 sort.add(sortGroupMenuItem);
1867 sort.add(sortPairwiseMenuItem);
1868 sort.add(sortByTreeMenu);
1869 calculateMenu.add(sort);
1870 calculateMenu.add(calculateTree);
1871 calculateMenu.addSeparator();
1872 calculateMenu.add(pairwiseAlignmentMenuItem);
1873 calculateMenu.addSeparator();
1874 calculateMenu.add(showTranslation);
1875 calculateMenu.add(showReverse);
1876 calculateMenu.add(showReverseComplement);
1877 calculateMenu.add(showProducts);
1878 calculateMenu.add(autoCalculate);
1879 calculateMenu.add(sortByTree);
1880 calculateMenu.addSeparator();
1881 calculateMenu.add(expandAlignment);
1882 calculateMenu.add(extractScores);
1883 if (!Platform.isJS())
1885 calculateMenu.addSeparator();
1886 calculateMenu.add(runGroovy);
1889 webServiceNoServices = new JMenuItem(
1890 MessageManager.getString("label.no_services"));
1891 webService.add(webServiceNoServices);
1892 if (!Platform.isJS())
1894 exportImageMenu.add(htmlMenuItem);
1896 exportImageMenu.add(epsFile);
1897 exportImageMenu.add(createPNG);
1898 if (!Platform.isJS())
1900 exportImageMenu.add(createBioJS);
1901 exportImageMenu.add(createSVG);
1903 addSequenceMenu.add(addFromFile);
1904 addSequenceMenu.add(addFromText);
1905 addSequenceMenu.add(addFromURL);
1906 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1907 statusPanel.add(statusBar, null);
1908 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1910 formatMenu.add(font);
1911 formatMenu.addSeparator();
1912 formatMenu.add(wrapMenuItem);
1913 formatMenu.add(scaleAbove);
1914 formatMenu.add(scaleLeft);
1915 formatMenu.add(scaleRight);
1916 formatMenu.add(seqLimits);
1917 formatMenu.add(idRightAlign);
1918 formatMenu.add(hiddenMarkers);
1919 formatMenu.add(viewBoxesMenuItem);
1920 formatMenu.add(viewTextMenuItem);
1921 formatMenu.add(colourTextMenuItem);
1922 formatMenu.add(renderGapsMenuItem);
1923 formatMenu.add(centreColumnLabelsMenuItem);
1924 formatMenu.add(showNonconservedMenuItem);
1925 selectMenu.add(findMenuItem);
1926 selectMenu.addSeparator();
1927 selectMenu.add(selectAllSequenceMenuItem);
1928 selectMenu.add(deselectAllSequenceMenuItem);
1929 selectMenu.add(invertSequenceMenuItem);
1930 selectMenu.add(invertColSel);
1931 selectMenu.add(createGroup);
1932 selectMenu.add(unGroup);
1933 selectMenu.add(grpsFromSelection);
1934 selectMenu.add(deleteGroups);
1935 selectMenu.add(annotationColumn);
1936 selectMenu.add(selectHighlighted);
1937 // TODO - determine if the listenToViewSelections button is needed : see bug
1939 // selectMenu.addSeparator();
1940 // selectMenu.add(listenToViewSelections);
1943 protected void enableSortMenuOptions()
1947 protected void loadVcf_actionPerformed()
1952 * Constructs the entries on the Colour menu (but does not add them to the
1955 protected void initColourMenu()
1957 applyToAllGroups = new JCheckBoxMenuItem(
1958 MessageManager.getString("label.apply_colour_to_all_groups"));
1959 applyToAllGroups.addActionListener(new ActionListener()
1962 public void actionPerformed(ActionEvent e)
1964 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1968 textColour = new JMenuItem(
1969 MessageManager.getString("label.text_colour"));
1970 textColour.addActionListener(new ActionListener()
1973 public void actionPerformed(ActionEvent e)
1975 textColour_actionPerformed();
1979 conservationMenuItem = new JCheckBoxMenuItem(
1980 MessageManager.getString("action.by_conservation"));
1981 conservationMenuItem.addActionListener(new ActionListener()
1984 public void actionPerformed(ActionEvent e)
1986 conservationMenuItem_actionPerformed(
1987 conservationMenuItem.isSelected());
1991 abovePIDThreshold = new JCheckBoxMenuItem(
1992 MessageManager.getString("label.above_identity_threshold"));
1993 abovePIDThreshold.addActionListener(new ActionListener()
1996 public void actionPerformed(ActionEvent e)
1998 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
2001 modifyPID = new JMenuItem(
2002 MessageManager.getString("label.modify_identity_threshold"));
2003 modifyPID.addActionListener(new ActionListener()
2006 public void actionPerformed(ActionEvent e)
2008 modifyPID_actionPerformed();
2011 modifyConservation = new JMenuItem(MessageManager
2012 .getString("label.modify_conservation_threshold"));
2013 modifyConservation.addActionListener(new ActionListener()
2016 public void actionPerformed(ActionEvent e)
2018 modifyConservation_actionPerformed();
2022 annotationColour = new JRadioButtonMenuItem(
2023 MessageManager.getString("action.by_annotation"));
2024 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2025 annotationColour.addActionListener(new ActionListener()
2028 public void actionPerformed(ActionEvent e)
2030 annotationColour_actionPerformed();
2035 protected void selectHighlightedColumns_actionPerformed(
2036 ActionEvent actionEvent)
2038 // TODO Auto-generated method stub
2043 * Generate the reverse sequence (or reverse complement if the flag is true)
2044 * and add it to the alignment
2048 protected void showReverse_actionPerformed(boolean complement)
2053 * Try to run script in a Groovy console, having first ensured that this
2054 * alignframe is set as currentAlignFrame in Desktop
2056 protected void runGroovy_actionPerformed()
2062 * Adds the given action listener and key accelerator to the given menu item.
2063 * Also saves in a lookup table to support lookup of action by key stroke.
2067 * @param actionListener
2069 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2070 JMenuItem menuItem, ActionListener actionListener)
2072 menuItem.setAccelerator(keyStroke);
2073 accelerators.put(keyStroke, menuItem);
2074 menuItem.addActionListener(actionListener);
2078 * Action on clicking sort annotations by type.
2082 protected void sortAnnotations_actionPerformed()
2087 * Action on clicking Show all annotations.
2089 * @param forSequences
2090 * update sequence-related annotations
2091 * @param forAlignment
2092 * update non-sequence-related annotations
2094 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2095 boolean forAlignment)
2097 setAnnotationsVisibility(true, forSequences, forAlignment);
2101 * Action on clicking Hide all annotations.
2103 * @param forSequences
2104 * update sequence-related annotations
2105 * @param forAlignment
2106 * update non-sequence-related annotations
2108 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2109 boolean forAlignment)
2111 setAnnotationsVisibility(false, forSequences, forAlignment);
2115 * Set the visibility of annotations to true or false. Can act on
2116 * sequence-related annotations, or alignment-related, or both.
2119 * @param forSequences
2120 * update sequence-related annotations
2121 * @param forAlignment
2122 * update non-sequence-related annotations
2124 protected void setAnnotationsVisibility(boolean visible,
2125 boolean forSequences, boolean forAlignment)
2130 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2132 // TODO Auto-generated method stub
2136 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2138 // TODO Auto-generated method stub
2142 protected void showAllhidden_actionPerformed(ActionEvent e)
2144 // TODO Auto-generated method stub
2148 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2150 // TODO Auto-generated method stub
2154 protected void hideAllSelection_actionPerformed(ActionEvent e)
2156 // TODO Auto-generated method stub
2160 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2162 // TODO Auto-generated method stub
2166 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2168 // TODO Auto-generated method stub
2172 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2174 // TODO Auto-generated method stub
2178 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2180 // TODO Auto-generated method stub
2184 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2186 // TODO Auto-generated method stub
2190 protected void showGroupConservation_actionPerformed(ActionEvent e)
2192 // TODO Auto-generated method stub
2196 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2198 // TODO Auto-generated method stub
2202 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2204 // TODO Auto-generated method stub
2208 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2210 // TODO Auto-generated method stub
2214 protected void followHighlight_actionPerformed()
2216 // TODO Auto-generated method stub
2220 protected void showNpFeats_actionPerformed(ActionEvent e)
2222 // TODO Auto-generated method stub
2226 protected void showDbRefs_actionPerformed(ActionEvent e)
2228 // TODO Auto-generated method stub
2232 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2236 protected void buildSortByAnnotationScoresMenu()
2240 protected void extractScores_actionPerformed(ActionEvent e)
2244 protected void outputText_actionPerformed(String formatName)
2248 public void addFromFile_actionPerformed(ActionEvent e)
2253 public void addFromText_actionPerformed(ActionEvent e)
2258 public void addFromURL_actionPerformed(ActionEvent e)
2263 public void exportFeatures_actionPerformed(ActionEvent e)
2268 public void exportAnnotations_actionPerformed(ActionEvent e)
2273 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2277 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2282 protected void closeMenuItem_actionPerformed(boolean b)
2286 protected void redoMenuItem_actionPerformed(ActionEvent e)
2290 protected void undoMenuItem_actionPerformed(ActionEvent e)
2294 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2298 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2302 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2306 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2310 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2314 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2318 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2322 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2326 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2330 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2334 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2338 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2342 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2346 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2350 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2354 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2358 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2362 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2366 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2370 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2374 protected void conservationMenuItem_actionPerformed(boolean selected)
2378 protected void printMenuItem_actionPerformed(ActionEvent e)
2382 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2386 protected void findMenuItem_actionPerformed(ActionEvent e)
2390 protected void abovePIDThreshold_actionPerformed(boolean selected)
2394 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2398 protected void deleteGroups_actionPerformed(ActionEvent e)
2402 protected void createGroup_actionPerformed(ActionEvent e)
2406 protected void unGroup_actionPerformed(ActionEvent e)
2410 protected void copy_actionPerformed()
2414 protected void cut_actionPerformed()
2418 protected void delete_actionPerformed()
2422 protected void pasteNew_actionPerformed(ActionEvent e)
2426 protected void pasteThis_actionPerformed(ActionEvent e)
2430 protected void applyToAllGroups_actionPerformed(boolean selected)
2434 public void createPNG(java.io.File f)
2438 protected void font_actionPerformed(ActionEvent e)
2442 protected void seqLimit_actionPerformed(ActionEvent e)
2446 public void seqDBRef_actionPerformed(ActionEvent e)
2451 public void createEPS(java.io.File f)
2455 public void createSVG(java.io.File f)
2460 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2466 * Template method to handle the 'load T-Coffee scores' menu event.
2468 * Subclasses override this method to provide a custom action.
2473 protected void loadScores_actionPerformed(ActionEvent event)
2478 protected void jpred_actionPerformed(ActionEvent e)
2482 protected void scaleAbove_actionPerformed(ActionEvent e)
2486 protected void scaleLeft_actionPerformed(ActionEvent e)
2490 protected void scaleRight_actionPerformed(ActionEvent e)
2494 protected void modifyPID_actionPerformed()
2498 protected void modifyConservation_actionPerformed()
2502 protected void saveAs_actionPerformed()
2506 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2510 public void vamsasStore_actionPerformed(ActionEvent e)
2515 public void vamsasLoad_actionPerformed(ActionEvent e)
2520 public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2525 public void featureSettings_actionPerformed(ActionEvent e)
2530 public void fetchSequence_actionPerformed()
2535 public void smoothFont_actionPerformed(ActionEvent e)
2540 public void annotationColour_actionPerformed()
2544 public void annotationColumn_actionPerformed(ActionEvent e)
2548 public void associatedData_actionPerformed(ActionEvent e)
2553 public void autoCalculate_actionPerformed(ActionEvent e)
2558 public void sortByTreeOption_actionPerformed(ActionEvent e)
2563 public void showAllSeqs_actionPerformed(ActionEvent e)
2568 public void showAllColumns_actionPerformed(ActionEvent e)
2573 public void hideSelSequences_actionPerformed(ActionEvent e)
2578 public void hideSelColumns_actionPerformed(ActionEvent e)
2583 public void hiddenMarkers_actionPerformed(ActionEvent e)
2588 public void findPdbId_actionPerformed(ActionEvent e)
2593 public void enterPdbId_actionPerformed(ActionEvent e)
2598 public void pdbFile_actionPerformed(ActionEvent e)
2603 public void invertColSel_actionPerformed(ActionEvent e)
2608 public void tabSelectionChanged(int sel)
2613 public void tabbedPane_mousePressed(MouseEvent e)
2618 public void tabbedPane_focusGained(FocusEvent e)
2623 public void save_actionPerformed(ActionEvent e)
2628 public void reload_actionPerformed(ActionEvent e)
2633 public void newView_actionPerformed(ActionEvent e)
2638 public void textColour_actionPerformed()
2643 public void idRightAlign_actionPerformed(ActionEvent e)
2648 public void expandViews_actionPerformed(ActionEvent e)
2653 public void gatherViews_actionPerformed(ActionEvent e)
2658 public void buildTreeSortMenu()
2663 public void pageSetup_actionPerformed(ActionEvent e)
2668 public void alignmentProperties()
2673 protected void expand_newalign(ActionEvent e)
2675 // TODO Auto-generated method stub
2679 protected boolean isShowAutoCalculatedAbove()
2681 return showAutoCalculatedAbove;
2684 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2686 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2689 protected SequenceAnnotationOrder getAnnotationSortOrder()
2691 return annotationSortOrder;
2694 protected void setAnnotationSortOrder(
2695 SequenceAnnotationOrder annotationSortOrder)
2697 this.annotationSortOrder = annotationSortOrder;
2700 public Map<KeyStroke, JMenuItem> getAccelerators()
2702 return this.accelerators;
2706 * Returns the selected index of the tabbed pane, or -1 if none selected
2707 * (including the case where the tabbed pane has not been made visible).
2711 public int getTabIndex()
2713 return tabbedPane.getSelectedIndex();
2716 public JPanel getStatusPanel()
2722 * Sets a reference to the containing split frame. Also makes the 'toggle
2723 * split view' menu item visible and checked.
2727 public void setSplitFrame(SplitContainerI sf)
2729 this.splitFrame = sf;
2732 this.showComplementMenuItem.setVisible(true);
2733 this.showComplementMenuItem.setState(true);
2737 public SplitContainerI getSplitViewContainer()
2739 return this.splitFrame;
2742 protected void showComplement_actionPerformed(boolean complement)