2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.jbgui;
23 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
24 import jalview.api.SplitContainerI;
25 import jalview.bin.Cache;
26 import jalview.gui.JvSwingUtils;
27 import jalview.gui.Preferences;
28 import jalview.io.FileFormats;
29 import jalview.util.MessageManager;
30 import jalview.util.Platform;
32 import java.awt.BorderLayout;
33 import java.awt.Color;
34 import java.awt.GridLayout;
35 import java.awt.Toolkit;
36 import java.awt.event.ActionEvent;
37 import java.awt.event.ActionListener;
38 import java.awt.event.FocusAdapter;
39 import java.awt.event.FocusEvent;
40 import java.awt.event.KeyEvent;
41 import java.awt.event.MouseAdapter;
42 import java.awt.event.MouseEvent;
43 import java.util.HashMap;
46 import javax.swing.BorderFactory;
47 import javax.swing.ButtonGroup;
48 import javax.swing.JCheckBoxMenuItem;
49 import javax.swing.JInternalFrame;
50 import javax.swing.JLabel;
51 import javax.swing.JMenu;
52 import javax.swing.JMenuBar;
53 import javax.swing.JMenuItem;
54 import javax.swing.JPanel;
55 import javax.swing.JRadioButtonMenuItem;
56 import javax.swing.JTabbedPane;
57 import javax.swing.KeyStroke;
58 import javax.swing.event.ChangeEvent;
59 import javax.swing.event.MenuEvent;
60 import javax.swing.event.MenuListener;
62 public class GAlignFrame extends JInternalFrame
64 protected JMenuBar alignFrameMenuBar = new JMenuBar();
66 protected JMenuItem closeMenuItem = new JMenuItem();
68 protected JMenu webService = new JMenu();
70 protected JMenuItem webServiceNoServices;
72 protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
74 protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
76 protected JMenu sortByAnnotScore = new JMenu();
78 public JLabel statusBar = new JLabel();
80 protected JMenu outputTextboxMenu = new JMenu();
82 protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
84 protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
86 protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
88 protected JMenuItem undoMenuItem = new JMenuItem();
90 protected JMenuItem redoMenuItem = new JMenuItem();
92 protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
94 protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
96 public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
98 JMenuItem copy = new JMenuItem();
100 JMenuItem cut = new JMenuItem();
102 JMenu pasteMenu = new JMenu();
104 protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
106 protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
108 protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
110 protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
112 protected JCheckBoxMenuItem applyToAllGroups;
114 protected JMenu colourMenu = new JMenu();
116 protected JMenuItem textColour;
118 protected JCheckBoxMenuItem conservationMenuItem;
120 protected JMenuItem modifyConservation;
122 protected JCheckBoxMenuItem abovePIDThreshold;
124 protected JMenuItem modifyPID;
126 protected JMenuItem annotationColour;
128 protected JMenu sortByTreeMenu = new JMenu();
130 protected JMenu sort = new JMenu();
132 protected JMenu calculateTree = new JMenu();
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);
536 JMenuItem averageDistanceTreeMenuItem = new JMenuItem(
537 MessageManager.getString("label.average_distance_identity"));
538 averageDistanceTreeMenuItem.addActionListener(new ActionListener()
541 public void actionPerformed(ActionEvent e)
543 averageDistanceTreeMenuItem_actionPerformed(e);
546 JMenuItem neighbourTreeMenuItem = new JMenuItem(
547 MessageManager.getString("label.neighbour_joining_identity"));
548 neighbourTreeMenuItem.addActionListener(new ActionListener()
551 public void actionPerformed(ActionEvent e)
553 neighbourTreeMenuItem_actionPerformed(e);
557 this.getContentPane().setLayout(new BorderLayout());
558 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
559 statusBar.setBackground(Color.white);
560 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
561 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
562 statusBar.setText(MessageManager.getString("label.status_bar"));
563 outputTextboxMenu.setText(MessageManager
564 .getString("label.out_to_textbox"));
567 JMenuItem avDistanceTreeBlosumMenuItem = new JMenuItem(
568 MessageManager.getString("label.average_distance_blosum62"));
569 avDistanceTreeBlosumMenuItem.addActionListener(new ActionListener()
572 public void actionPerformed(ActionEvent e)
574 avTreeBlosumMenuItem_actionPerformed(e);
577 JMenuItem njTreeBlosumMenuItem = new JMenuItem(
578 MessageManager.getString("label.neighbour_blosum62"));
579 njTreeBlosumMenuItem.addActionListener(new ActionListener()
582 public void actionPerformed(ActionEvent e)
584 njTreeBlosumMenuItem_actionPerformed(e);
587 annotationPanelMenuItem.setActionCommand("");
588 annotationPanelMenuItem.setText(MessageManager
589 .getString("label.show_annotations"));
590 annotationPanelMenuItem.setState(Cache.getDefault("SHOW_ANNOTATIONS",
592 annotationPanelMenuItem.addActionListener(new ActionListener()
595 public void actionPerformed(ActionEvent e)
597 annotationPanelMenuItem_actionPerformed(e);
600 showAllAlAnnotations.setText(MessageManager
601 .getString("label.show_all_al_annotations"));
602 final boolean isAnnotationPanelShown = annotationPanelMenuItem
604 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
605 showAllAlAnnotations.addActionListener(new ActionListener()
608 public void actionPerformed(ActionEvent e)
610 showAllAnnotations_actionPerformed(false, true);
613 hideAllAlAnnotations.setText(MessageManager
614 .getString("label.hide_all_al_annotations"));
615 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
616 hideAllAlAnnotations.addActionListener(new ActionListener()
619 public void actionPerformed(ActionEvent e)
621 hideAllAnnotations_actionPerformed(false, true);
624 showAllSeqAnnotations.setText(MessageManager
625 .getString("label.show_all_seq_annotations"));
626 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
627 showAllSeqAnnotations.addActionListener(new ActionListener()
630 public void actionPerformed(ActionEvent e)
632 showAllAnnotations_actionPerformed(true, false);
635 hideAllSeqAnnotations.setText(MessageManager
636 .getString("label.hide_all_seq_annotations"));
637 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
638 hideAllSeqAnnotations.addActionListener(new ActionListener()
641 public void actionPerformed(ActionEvent e)
643 hideAllAnnotations_actionPerformed(true, false);
646 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
647 .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
648 SequenceAnnotationOrder.NONE.name()));
649 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
650 MessageManager.getString("label.sort_annotations_by_sequence"));
651 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
652 MessageManager.getString("label.sort_annotations_by_label"));
655 .setSelected(sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
656 sortAnnBySequence.addActionListener(new ActionListener()
659 public void actionPerformed(ActionEvent e)
661 boolean newState = sortAnnBySequence.getState();
662 sortAnnByLabel.setSelected(false);
663 setAnnotationSortOrder(newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
664 : SequenceAnnotationOrder.NONE);
665 sortAnnotations_actionPerformed();
669 .setSelected(sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
670 sortAnnByLabel.addActionListener(new ActionListener()
673 public void actionPerformed(ActionEvent e)
675 boolean newState = sortAnnByLabel.getState();
676 sortAnnBySequence.setSelected(false);
677 setAnnotationSortOrder(newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
678 : SequenceAnnotationOrder.NONE);
679 sortAnnotations_actionPerformed();
682 colourTextMenuItem = new JCheckBoxMenuItem(
684 .getString("label.colour_text"));
685 colourTextMenuItem.addActionListener(new ActionListener()
688 public void actionPerformed(ActionEvent e)
690 colourTextMenuItem_actionPerformed(e);
694 JMenuItem htmlMenuItem = new JMenuItem(
695 MessageManager.getString("label.html"));
696 htmlMenuItem.addActionListener(new ActionListener()
699 public void actionPerformed(ActionEvent e)
701 htmlMenuItem_actionPerformed(e);
705 JMenuItem createBioJS = new JMenuItem(
706 MessageManager.getString("label.biojs_html_export"));
707 createBioJS.addActionListener(new java.awt.event.ActionListener()
710 public void actionPerformed(ActionEvent e)
712 bioJSMenuItem_actionPerformed(e);
716 JMenuItem overviewMenuItem = new JMenuItem(
717 MessageManager.getString("label.overview_window"));
718 overviewMenuItem.addActionListener(new ActionListener()
721 public void actionPerformed(ActionEvent e)
723 overviewMenuItem_actionPerformed(e);
727 undoMenuItem.setEnabled(false);
728 undoMenuItem.setText(MessageManager.getString("action.undo"));
729 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z, Toolkit
730 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
731 al = new ActionListener()
734 public void actionPerformed(ActionEvent e)
736 undoMenuItem_actionPerformed(e);
739 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
741 redoMenuItem.setEnabled(false);
742 redoMenuItem.setText(MessageManager.getString("action.redo"));
743 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y, Toolkit
744 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
745 al = new ActionListener()
748 public void actionPerformed(ActionEvent e)
750 redoMenuItem_actionPerformed(e);
753 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
755 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
756 wrapMenuItem.addActionListener(new ActionListener()
759 public void actionPerformed(ActionEvent e)
761 wrapMenuItem_actionPerformed(e);
765 JMenuItem printMenuItem = new JMenuItem(
766 MessageManager.getString("action.print"));
767 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P, Toolkit
768 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
769 al = new ActionListener()
772 public void actionPerformed(ActionEvent e)
774 printMenuItem_actionPerformed(e);
777 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
780 .setText(MessageManager.getString("action.show_gaps"));
781 renderGapsMenuItem.setState(true);
782 renderGapsMenuItem.addActionListener(new ActionListener()
785 public void actionPerformed(ActionEvent e)
787 renderGapsMenuItem_actionPerformed(e);
791 JMenuItem findMenuItem = new JMenuItem(
792 MessageManager.getString("action.find"));
793 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F, Toolkit
794 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
795 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
796 MessageManager.getString("label.find_tip")));
797 al = new ActionListener()
800 public void actionPerformed(ActionEvent e)
802 findMenuItem_actionPerformed(e);
805 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
807 showSeqFeatures.setText(MessageManager
808 .getString("label.show_sequence_features"));
809 showSeqFeatures.addActionListener(new ActionListener()
812 public void actionPerformed(ActionEvent actionEvent)
814 showSeqFeatures_actionPerformed(actionEvent);
818 * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
819 * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
820 * void actionPerformed(ActionEvent actionEvent) {
821 * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
823 showDbRefsMenuitem.setText(MessageManager
824 .getString("label.show_database_refs"));
825 showDbRefsMenuitem.addActionListener(new ActionListener()
829 public void actionPerformed(ActionEvent e)
831 showDbRefs_actionPerformed(e);
835 showNpFeatsMenuitem.setText(MessageManager
836 .getString("label.show_non_positional_features"));
837 showNpFeatsMenuitem.addActionListener(new ActionListener()
841 public void actionPerformed(ActionEvent e)
843 showNpFeats_actionPerformed(e);
847 showGroupConservation.setText(MessageManager
848 .getString("label.group_conservation"));
849 showGroupConservation.addActionListener(new ActionListener()
853 public void actionPerformed(ActionEvent e)
855 showGroupConservation_actionPerformed(e);
860 showGroupConsensus.setText(MessageManager
861 .getString("label.group_consensus"));
862 showGroupConsensus.addActionListener(new ActionListener()
866 public void actionPerformed(ActionEvent e)
868 showGroupConsensus_actionPerformed(e);
872 showConsensusHistogram.setText(MessageManager
873 .getString("label.show_consensus_histogram"));
874 showConsensusHistogram.addActionListener(new ActionListener()
878 public void actionPerformed(ActionEvent e)
880 showConsensusHistogram_actionPerformed(e);
884 showSequenceLogo.setText(MessageManager
885 .getString("label.show_consensus_logo"));
886 showSequenceLogo.addActionListener(new ActionListener()
890 public void actionPerformed(ActionEvent e)
892 showSequenceLogo_actionPerformed(e);
896 normaliseSequenceLogo.setText(MessageManager
897 .getString("label.norm_consensus_logo"));
898 normaliseSequenceLogo.addActionListener(new ActionListener()
902 public void actionPerformed(ActionEvent e)
904 normaliseSequenceLogo_actionPerformed(e);
908 applyAutoAnnotationSettings.setText(MessageManager
909 .getString("label.apply_all_groups"));
910 applyAutoAnnotationSettings.setState(false);
911 applyAutoAnnotationSettings.setVisible(true);
912 applyAutoAnnotationSettings.addActionListener(new ActionListener()
915 public void actionPerformed(ActionEvent e)
917 applyAutoAnnotationSettings_actionPerformed(e);
921 ButtonGroup buttonGroup = new ButtonGroup();
922 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
923 MessageManager.getString("label.show_first"));
924 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
925 MessageManager.getString("label.show_last"));
926 buttonGroup.add(showAutoFirst);
927 buttonGroup.add(showAutoLast);
928 final boolean autoFirst = Cache.getDefault(
929 Preferences.SHOW_AUTOCALC_ABOVE, false);
930 showAutoFirst.setSelected(autoFirst);
931 setShowAutoCalculatedAbove(autoFirst);
932 showAutoFirst.addActionListener(new ActionListener()
935 public void actionPerformed(ActionEvent e)
937 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
938 sortAnnotations_actionPerformed();
941 showAutoLast.setSelected(!showAutoFirst.isSelected());
942 showAutoLast.addActionListener(new ActionListener()
945 public void actionPerformed(ActionEvent e)
947 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
948 sortAnnotations_actionPerformed();
952 JMenuItem deleteGroups = new JMenuItem(
953 MessageManager.getString("action.undefine_groups"));
954 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U, Toolkit
955 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
956 al = new ActionListener()
959 public void actionPerformed(ActionEvent e)
961 deleteGroups_actionPerformed(e);
964 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
966 JMenuItem annotationColumn = new JMenuItem(
967 MessageManager.getString("action.select_by_annotation"));
968 annotationColumn.addActionListener(new ActionListener()
971 public void actionPerformed(ActionEvent e)
973 annotationColumn_actionPerformed(e);
977 JMenuItem createGroup = new JMenuItem(
978 MessageManager.getString("action.create_group"));
979 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, Toolkit
980 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
981 al = new ActionListener()
984 public void actionPerformed(ActionEvent e)
986 createGroup_actionPerformed(e);
989 addMenuActionAndAccelerator(keyStroke, createGroup, al);
991 JMenuItem unGroup = new JMenuItem(
992 MessageManager.getString("action.remove_group"));
993 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, Toolkit
994 .getDefaultToolkit().getMenuShortcutKeyMask()
995 | KeyEvent.SHIFT_MASK, false);
996 al = new ActionListener()
999 public void actionPerformed(ActionEvent e)
1001 unGroup_actionPerformed(e);
1004 addMenuActionAndAccelerator(keyStroke, unGroup, al);
1006 copy.setText(MessageManager.getString("action.copy"));
1007 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C, Toolkit
1008 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1010 al = new ActionListener()
1013 public void actionPerformed(ActionEvent e)
1015 copy_actionPerformed(e);
1018 addMenuActionAndAccelerator(keyStroke, copy, al);
1020 cut.setText(MessageManager.getString("action.cut"));
1021 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, Toolkit
1022 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1023 al = new ActionListener()
1026 public void actionPerformed(ActionEvent e)
1028 cut_actionPerformed(e);
1031 addMenuActionAndAccelerator(keyStroke, cut, al);
1033 JMenuItem delete = new JMenuItem(
1034 MessageManager.getString("action.delete"));
1035 delete.addActionListener(new ActionListener()
1038 public void actionPerformed(ActionEvent e)
1040 delete_actionPerformed(e);
1044 pasteMenu.setText(MessageManager.getString("action.paste"));
1045 JMenuItem pasteNew = new JMenuItem(
1046 MessageManager.getString("label.to_new_alignment"));
1047 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V, Toolkit
1048 .getDefaultToolkit().getMenuShortcutKeyMask()
1049 | KeyEvent.SHIFT_MASK, false);
1050 al = new ActionListener()
1053 public void actionPerformed(ActionEvent e)
1055 pasteNew_actionPerformed(e);
1058 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1060 JMenuItem pasteThis = new JMenuItem(
1061 MessageManager.getString("label.to_this_alignment"));
1062 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V, Toolkit
1063 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1064 al = new ActionListener()
1067 public void actionPerformed(ActionEvent e)
1069 pasteThis_actionPerformed(e);
1072 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1074 JMenuItem createPNG = new JMenuItem("PNG");
1075 createPNG.addActionListener(new ActionListener()
1078 public void actionPerformed(ActionEvent e)
1083 createPNG.setActionCommand(MessageManager
1084 .getString("label.save_png_image"));
1086 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1087 font.addActionListener(new ActionListener()
1090 public void actionPerformed(ActionEvent e)
1092 font_actionPerformed(e);
1095 seqLimits.setText(MessageManager
1096 .getString("label.show_sequence_limits"));
1097 seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
1098 seqLimits.addActionListener(new ActionListener()
1101 public void actionPerformed(ActionEvent e)
1103 seqLimit_actionPerformed(e);
1106 JMenuItem epsFile = new JMenuItem("EPS");
1107 epsFile.addActionListener(new ActionListener()
1110 public void actionPerformed(ActionEvent e)
1116 JMenuItem createSVG = new JMenuItem("SVG");
1117 createSVG.addActionListener(new ActionListener()
1120 public void actionPerformed(ActionEvent e)
1126 JMenuItem loadTreeMenuItem = new JMenuItem(
1127 MessageManager.getString("label.load_associated_tree"));
1128 loadTreeMenuItem.setActionCommand(MessageManager
1129 .getString("label.load_tree_for_sequence_set"));
1130 loadTreeMenuItem.addActionListener(new ActionListener()
1133 public void actionPerformed(ActionEvent e)
1135 loadTreeMenuItem_actionPerformed(e);
1139 scaleAbove.setVisible(false);
1140 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1141 scaleAbove.addActionListener(new ActionListener()
1144 public void actionPerformed(ActionEvent e)
1146 scaleAbove_actionPerformed(e);
1149 scaleLeft.setVisible(false);
1150 scaleLeft.setSelected(true);
1151 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1152 scaleLeft.addActionListener(new ActionListener()
1155 public void actionPerformed(ActionEvent e)
1157 scaleLeft_actionPerformed(e);
1160 scaleRight.setVisible(false);
1161 scaleRight.setSelected(true);
1162 scaleRight.setText(MessageManager.getString("action.scale_right"));
1163 scaleRight.addActionListener(new ActionListener()
1166 public void actionPerformed(ActionEvent e)
1168 scaleRight_actionPerformed(e);
1171 centreColumnLabelsMenuItem.setVisible(true);
1172 centreColumnLabelsMenuItem.setState(false);
1173 centreColumnLabelsMenuItem.setText(MessageManager
1174 .getString("label.centre_column_labels"));
1175 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1178 public void actionPerformed(ActionEvent e)
1180 centreColumnLabels_actionPerformed(e);
1183 followHighlightMenuItem.setVisible(true);
1184 followHighlightMenuItem.setState(true);
1185 followHighlightMenuItem.setText(MessageManager
1186 .getString("label.automatic_scrolling"));
1187 followHighlightMenuItem.addActionListener(new ActionListener()
1191 public void actionPerformed(ActionEvent e)
1193 followHighlight_actionPerformed();
1199 .setText(MessageManager.getString("action.by_tree_order"));
1200 sort.setText(MessageManager.getString("action.sort"));
1201 sort.addMenuListener(new MenuListener()
1204 public void menuSelected(MenuEvent e)
1210 public void menuDeselected(MenuEvent e)
1215 public void menuCanceled(MenuEvent e)
1219 sortByAnnotScore.setText(MessageManager
1220 .getString("label.sort_by_score"));
1221 sort.add(sortByAnnotScore);
1222 sort.addMenuListener(new javax.swing.event.MenuListener()
1226 public void menuCanceled(MenuEvent e)
1231 public void menuDeselected(MenuEvent e)
1236 public void menuSelected(MenuEvent e)
1238 buildSortByAnnotationScoresMenu();
1241 sortByAnnotScore.setVisible(false);
1244 .setText(MessageManager.getString("action.calculate_tree"));
1246 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1247 padGapsMenuitem.setState(jalview.bin.Cache
1248 .getDefault("PAD_GAPS", false));
1249 padGapsMenuitem.addActionListener(new ActionListener()
1252 public void actionPerformed(ActionEvent e)
1254 padGapsMenuitem_actionPerformed(e);
1257 JMenuItem vamsasStore = new JMenuItem(
1258 MessageManager.getString("label.vamsas_store"));
1259 vamsasStore.setVisible(false);
1260 vamsasStore.addActionListener(new ActionListener()
1263 public void actionPerformed(ActionEvent e)
1265 vamsasStore_actionPerformed(e);
1268 showTranslation.setText(MessageManager
1269 .getString("label.translate_cDNA"));
1270 showTranslation.addActionListener(new ActionListener()
1273 public void actionPerformed(ActionEvent e)
1275 showTranslation_actionPerformed(e);
1278 showReverse.setText(MessageManager.getString("label.reverse"));
1279 showReverse.addActionListener(new ActionListener()
1282 public void actionPerformed(ActionEvent e)
1284 showReverse_actionPerformed(false);
1287 showReverseComplement.setText(MessageManager
1288 .getString("label.reverse_complement"));
1289 showReverseComplement.addActionListener(new ActionListener()
1292 public void actionPerformed(ActionEvent e)
1294 showReverse_actionPerformed(true);
1298 JMenuItem extractScores = new JMenuItem(
1299 MessageManager.getString("label.extract_scores"));
1300 extractScores.addActionListener(new ActionListener()
1303 public void actionPerformed(ActionEvent e)
1305 extractScores_actionPerformed(e);
1308 extractScores.setVisible(true);
1309 // JBPNote: TODO: make gui for regex based score extraction
1311 // for show products actions see AlignFrame.canShowProducts
1312 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1314 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1315 runGroovy.setToolTipText(MessageManager
1316 .getString("label.run_groovy_tip"));
1317 runGroovy.addActionListener(new ActionListener()
1320 public void actionPerformed(ActionEvent e)
1322 runGroovy_actionPerformed();
1326 JMenuItem openFeatureSettings = new JMenuItem(
1327 MessageManager.getString("action.feature_settings"));
1328 openFeatureSettings.addActionListener(new ActionListener()
1331 public void actionPerformed(ActionEvent e)
1333 featureSettings_actionPerformed(e);
1336 JMenuItem fetchSequence = new JMenuItem(
1337 MessageManager.getString("label.fetch_sequences"));
1338 fetchSequence.addActionListener(new ActionListener()
1341 public void actionPerformed(ActionEvent e)
1343 fetchSequence_actionPerformed(e);
1347 JMenuItem associatedData = new JMenuItem(
1348 MessageManager.getString("label.load_features_annotations"));
1349 associatedData.addActionListener(new ActionListener()
1352 public void actionPerformed(ActionEvent e)
1354 associatedData_actionPerformed(e);
1357 autoCalculate.setText(MessageManager
1358 .getString("label.autocalculate_consensus"));
1359 autoCalculate.setState(jalview.bin.Cache.getDefault(
1360 "AUTO_CALC_CONSENSUS", true));
1361 autoCalculate.addActionListener(new ActionListener()
1364 public void actionPerformed(ActionEvent e)
1366 autoCalculate_actionPerformed(e);
1369 sortByTree.setText(MessageManager
1370 .getString("label.sort_alignment_new_tree"));
1372 .setToolTipText("<html>"
1374 .getString("label.enable_automatically_sort_alignment_when_open_new_tree"));
1376 .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
1377 sortByTree.addActionListener(new ActionListener()
1380 public void actionPerformed(ActionEvent e)
1382 sortByTreeOption_actionPerformed(e);
1386 listenToViewSelections.setText(MessageManager
1387 .getString("label.listen_for_selections"));
1388 listenToViewSelections
1389 .setToolTipText("<html>"
1391 .getString("label.selections_mirror_selections_made_same_sequences_other_views"));
1392 listenToViewSelections.setState(false);
1393 listenToViewSelections.addActionListener(new ActionListener()
1396 public void actionPerformed(ActionEvent e)
1398 listenToViewSelections_actionPerformed(e);
1402 JMenu addSequenceMenu = new JMenu(
1403 MessageManager.getString("label.add_sequences"));
1404 JMenuItem addFromFile = new JMenuItem(
1405 MessageManager.getString("label.from_file"));
1406 addFromFile.addActionListener(new ActionListener()
1409 public void actionPerformed(ActionEvent e)
1411 addFromFile_actionPerformed(e);
1414 JMenuItem addFromText = new JMenuItem(
1415 MessageManager.getString("label.from_textbox"));
1416 addFromText.addActionListener(new ActionListener()
1419 public void actionPerformed(ActionEvent e)
1421 addFromText_actionPerformed(e);
1424 JMenuItem addFromURL = new JMenuItem(
1425 MessageManager.getString("label.from_url"));
1426 addFromURL.addActionListener(new ActionListener()
1429 public void actionPerformed(ActionEvent e)
1431 addFromURL_actionPerformed(e);
1434 JMenuItem exportFeatures = new JMenuItem(
1435 MessageManager.getString("label.export_features"));
1436 exportFeatures.addActionListener(new ActionListener()
1439 public void actionPerformed(ActionEvent e)
1441 exportFeatures_actionPerformed(e);
1444 JMenuItem exportAnnotations = new JMenuItem(
1445 MessageManager.getString("label.export_annotations"));
1446 exportAnnotations.addActionListener(new ActionListener()
1449 public void actionPerformed(ActionEvent e)
1451 exportAnnotations_actionPerformed(e);
1454 statusPanel.setLayout(new GridLayout());
1455 JMenuItem showAllSeqs = new JMenuItem(
1456 MessageManager.getString("label.all_sequences"));
1457 showAllSeqs.setToolTipText(MessageManager
1458 .getString("label.toggle_sequence_visibility"));
1459 showAllSeqs.addActionListener(new ActionListener()
1462 public void actionPerformed(ActionEvent e)
1464 showAllSeqs_actionPerformed(e);
1467 JMenuItem showAllColumns = new JMenuItem(
1468 MessageManager.getString("label.all_columns"));
1469 showAllColumns.setToolTipText(MessageManager
1470 .getString("label.toggle_columns_visibility"));
1471 showAllColumns.addActionListener(new ActionListener()
1474 public void actionPerformed(ActionEvent e)
1476 showAllColumns_actionPerformed(e);
1479 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1480 JMenuItem hideSelSequences = new JMenuItem(
1481 MessageManager.getString("label.selected_sequences"));
1482 hideSelSequences.setToolTipText(MessageManager
1483 .getString("label.toggle_sequence_visibility"));
1484 hideSelSequences.addActionListener(new ActionListener()
1487 public void actionPerformed(ActionEvent e)
1489 hideSelSequences_actionPerformed(e);
1492 JMenuItem hideSelColumns = new JMenuItem(
1493 MessageManager.getString("label.selected_columns"));
1494 hideSelColumns.setToolTipText(MessageManager
1495 .getString("label.toggle_columns_visibility"));
1496 hideSelColumns.addActionListener(new ActionListener()
1499 public void actionPerformed(ActionEvent e)
1501 hideSelColumns_actionPerformed(e);
1504 JMenuItem hideAllSelection = new JMenuItem(
1505 MessageManager.getString("label.selected_region"));
1506 hideAllSelection.addActionListener(new ActionListener()
1509 public void actionPerformed(ActionEvent e)
1511 hideAllSelection_actionPerformed(e);
1514 // TODO: should be hidden if no selection exists.
1515 JMenuItem hideAllButSelection = new JMenuItem(
1516 MessageManager.getString("label.all_but_selected_region"));
1517 hideAllButSelection.addActionListener(new ActionListener()
1520 public void actionPerformed(ActionEvent e)
1522 hideAllButSelection_actionPerformed(e);
1525 JMenuItem showAllhidden = new JMenuItem(
1526 MessageManager.getString("label.all_sequences_columns"));
1527 showAllhidden.setToolTipText(MessageManager
1528 .getString("label.toggles_visibility_hidden_selected_regions"));
1529 showAllhidden.addActionListener(new ActionListener()
1532 public void actionPerformed(ActionEvent e)
1534 showAllhidden_actionPerformed(e);
1537 hiddenMarkers.setText(MessageManager
1538 .getString("action.show_hidden_markers"));
1539 hiddenMarkers.addActionListener(new ActionListener()
1542 public void actionPerformed(ActionEvent e)
1544 hiddenMarkers_actionPerformed(e);
1548 JMenuItem invertColSel = new JMenuItem(
1549 MessageManager.getString("action.invert_column_selection"));
1550 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I, Toolkit
1551 .getDefaultToolkit().getMenuShortcutKeyMask()
1552 | KeyEvent.ALT_MASK, false);
1553 al = new ActionListener()
1556 public void actionPerformed(ActionEvent e)
1558 invertColSel_actionPerformed(e);
1561 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1563 showComplementMenuItem.setVisible(false);
1564 showComplementMenuItem.addActionListener(new ActionListener()
1567 public void actionPerformed(ActionEvent e)
1569 showComplement_actionPerformed(showComplementMenuItem.getState());
1573 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1576 public void stateChanged(ChangeEvent evt)
1578 JTabbedPane pane = (JTabbedPane) evt.getSource();
1579 int sel = pane.getSelectedIndex();
1580 tabSelectionChanged(sel);
1583 tabbedPane.addMouseListener(new MouseAdapter()
1586 public void mousePressed(MouseEvent e)
1588 if (e.isPopupTrigger()) // Mac
1590 tabbedPane_mousePressed(e);
1595 public void mouseReleased(MouseEvent e)
1597 if (e.isPopupTrigger()) // Windows
1599 tabbedPane_mousePressed(e);
1603 tabbedPane.addFocusListener(new FocusAdapter()
1606 public void focusGained(FocusEvent e)
1608 tabbedPane_focusGained(e);
1612 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1613 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, Toolkit
1614 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1615 al = new ActionListener()
1618 public void actionPerformed(ActionEvent e)
1620 save_actionPerformed(e);
1623 addMenuActionAndAccelerator(keyStroke, save, al);
1625 reload.setEnabled(false);
1626 reload.setText(MessageManager.getString("action.reload"));
1627 reload.addActionListener(new ActionListener()
1630 public void actionPerformed(ActionEvent e)
1632 reload_actionPerformed(e);
1636 JMenuItem newView = new JMenuItem(
1637 MessageManager.getString("action.new_view"));
1638 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T, Toolkit
1639 .getDefaultToolkit().getMenuShortcutKeyMask(), false);
1640 al = new ActionListener()
1643 public void actionPerformed(ActionEvent e)
1645 newView_actionPerformed(e);
1648 addMenuActionAndAccelerator(keyStroke, newView, al);
1650 tabbedPane.setToolTipText("<html><i>"
1651 + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1654 formatMenu.setText(MessageManager.getString("action.format"));
1655 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1657 idRightAlign.setText(MessageManager
1658 .getString("label.right_align_sequence_id"));
1659 idRightAlign.addActionListener(new ActionListener()
1662 public void actionPerformed(ActionEvent e)
1664 idRightAlign_actionPerformed(e);
1668 gatherViews.setEnabled(false);
1669 gatherViews.setText(MessageManager.getString("action.gather_views"));
1670 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1671 al = new ActionListener()
1674 public void actionPerformed(ActionEvent e)
1676 gatherViews_actionPerformed(e);
1679 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1681 expandViews.setEnabled(false);
1682 expandViews.setText(MessageManager.getString("action.expand_views"));
1683 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1684 al = new ActionListener()
1687 public void actionPerformed(ActionEvent e)
1689 expandViews_actionPerformed(e);
1692 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1694 JMenuItem pageSetup = new JMenuItem(
1695 MessageManager.getString("action.page_setup"));
1696 pageSetup.addActionListener(new ActionListener()
1699 public void actionPerformed(ActionEvent e)
1701 pageSetup_actionPerformed(e);
1704 JMenuItem alignmentProperties = new JMenuItem(
1705 MessageManager.getString("label.alignment_props"));
1706 alignmentProperties.addActionListener(new ActionListener()
1709 public void actionPerformed(ActionEvent actionEvent)
1711 alignmentProperties();
1714 JMenuItem selectHighlighted = new JMenuItem(
1715 MessageManager.getString("action.select_highlighted_columns"));
1716 selectHighlighted.setToolTipText(MessageManager
1717 .getString("tooltip.select_highlighted_columns"));
1718 al = new ActionListener()
1721 public void actionPerformed(ActionEvent actionEvent)
1723 selectHighlightedColumns_actionPerformed(actionEvent);
1726 selectHighlighted.addActionListener(al);
1727 JMenu tooltipSettingsMenu = new JMenu(
1728 MessageManager.getString("label.sequence_id_tooltip"));
1729 JMenu autoAnnMenu = new JMenu(
1730 MessageManager.getString("label.autocalculated_annotation"));
1732 JMenu exportImageMenu = new JMenu(
1733 MessageManager.getString("label.export_image"));
1734 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1735 alignFrameMenuBar.add(fileMenu);
1736 alignFrameMenuBar.add(editMenu);
1737 alignFrameMenuBar.add(selectMenu);
1738 alignFrameMenuBar.add(viewMenu);
1739 alignFrameMenuBar.add(annotationsMenu);
1740 alignFrameMenuBar.add(formatMenu);
1741 alignFrameMenuBar.add(colourMenu);
1742 alignFrameMenuBar.add(calculateMenu);
1743 alignFrameMenuBar.add(webService);
1745 fileMenu.add(fetchSequence);
1746 fileMenu.add(addSequenceMenu);
1747 fileMenu.add(reload);
1748 fileMenu.addSeparator();
1749 fileMenu.add(vamsasStore);
1751 fileMenu.add(saveAs);
1752 fileMenu.add(outputTextboxMenu);
1753 fileMenu.add(pageSetup);
1754 fileMenu.add(printMenuItem);
1755 fileMenu.addSeparator();
1756 fileMenu.add(exportImageMenu);
1757 fileMenu.add(exportFeatures);
1758 fileMenu.add(exportAnnotations);
1759 fileMenu.add(loadTreeMenuItem);
1760 fileMenu.add(associatedData);
1761 fileMenu.addSeparator();
1762 fileMenu.add(closeMenuItem);
1764 pasteMenu.add(pasteNew);
1765 pasteMenu.add(pasteThis);
1766 editMenu.add(undoMenuItem);
1767 editMenu.add(redoMenuItem);
1770 editMenu.add(pasteMenu);
1771 editMenu.add(delete);
1772 editMenu.addSeparator();
1773 editMenu.add(remove2LeftMenuItem);
1774 editMenu.add(remove2RightMenuItem);
1775 editMenu.add(removeGappedColumnMenuItem);
1776 editMenu.add(removeAllGapsMenuItem);
1777 editMenu.add(removeRedundancyMenuItem);
1778 editMenu.addSeparator();
1779 // dont add these yet in the CVS build - they cannot be undone!
1780 // Excluded from Jalview 2.5 release - undo needs to be implemented.
1781 // editMenu.add(justifyLeftMenuItem);
1782 // editMenu.add(justifyRightMenuItem);
1783 // editMenu.addSeparator();
1784 editMenu.add(padGapsMenuitem);
1786 showMenu.add(showAllColumns);
1787 showMenu.add(showAllSeqs);
1788 showMenu.add(showAllhidden);
1789 hideMenu.add(hideSelColumns);
1790 hideMenu.add(hideSelSequences);
1791 hideMenu.add(hideAllSelection);
1792 hideMenu.add(hideAllButSelection);
1793 viewMenu.add(newView);
1794 viewMenu.add(expandViews);
1795 viewMenu.add(gatherViews);
1796 viewMenu.addSeparator();
1797 viewMenu.add(showMenu);
1798 viewMenu.add(hideMenu);
1799 viewMenu.add(showComplementMenuItem);
1800 viewMenu.addSeparator();
1801 viewMenu.add(followHighlightMenuItem);
1802 viewMenu.addSeparator();
1803 viewMenu.add(showSeqFeatures);
1804 // viewMenu.add(showSeqFeaturesHeight);
1805 viewMenu.add(openFeatureSettings);
1806 tooltipSettingsMenu.add(showDbRefsMenuitem);
1807 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1808 viewMenu.add(tooltipSettingsMenu);
1809 viewMenu.addSeparator();
1810 viewMenu.add(alignmentProperties);
1811 viewMenu.addSeparator();
1812 viewMenu.add(overviewMenuItem);
1814 annotationsMenu.add(annotationPanelMenuItem);
1815 annotationsMenu.addSeparator();
1816 annotationsMenu.add(showAllAlAnnotations);
1817 annotationsMenu.add(hideAllAlAnnotations);
1818 annotationsMenu.addSeparator();
1819 annotationsMenu.add(showAllSeqAnnotations);
1820 annotationsMenu.add(hideAllSeqAnnotations);
1821 annotationsMenu.add(sortAnnBySequence);
1822 annotationsMenu.add(sortAnnByLabel);
1823 annotationsMenu.addSeparator();
1824 autoAnnMenu.add(showAutoFirst);
1825 autoAnnMenu.add(showAutoLast);
1826 autoAnnMenu.addSeparator();
1827 autoAnnMenu.add(applyAutoAnnotationSettings);
1828 autoAnnMenu.add(showConsensusHistogram);
1829 autoAnnMenu.add(showSequenceLogo);
1830 autoAnnMenu.add(normaliseSequenceLogo);
1831 autoAnnMenu.addSeparator();
1832 autoAnnMenu.add(showGroupConservation);
1833 autoAnnMenu.add(showGroupConsensus);
1834 annotationsMenu.add(autoAnnMenu);
1837 sort.add(sortIDMenuItem);
1838 sort.add(sortLengthMenuItem);
1839 sort.add(sortGroupMenuItem);
1840 sort.add(sortPairwiseMenuItem);
1841 sort.add(sortByTreeMenu);
1842 calculateMenu.add(sort);
1843 calculateMenu.add(calculateTree);
1844 calculateMenu.addSeparator();
1845 calculateMenu.add(pairwiseAlignmentMenuItem);
1846 calculateMenu.add(PCAMenuItem);
1847 calculateMenu.addSeparator();
1848 calculateMenu.add(showTranslation);
1849 calculateMenu.add(showReverse);
1850 calculateMenu.add(showReverseComplement);
1851 calculateMenu.add(showProducts);
1852 calculateMenu.add(autoCalculate);
1853 calculateMenu.add(sortByTree);
1854 calculateMenu.addSeparator();
1855 calculateMenu.add(expandAlignment);
1856 calculateMenu.add(extractScores);
1857 calculateMenu.addSeparator();
1858 calculateMenu.add(runGroovy);
1860 webServiceNoServices = new JMenuItem(
1861 MessageManager.getString("label.no_services"));
1862 webService.add(webServiceNoServices);
1863 exportImageMenu.add(htmlMenuItem);
1864 exportImageMenu.add(epsFile);
1865 exportImageMenu.add(createPNG);
1866 exportImageMenu.add(createBioJS);
1867 exportImageMenu.add(createSVG);
1868 addSequenceMenu.add(addFromFile);
1869 addSequenceMenu.add(addFromText);
1870 addSequenceMenu.add(addFromURL);
1871 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
1872 statusPanel.add(statusBar, null);
1873 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
1875 formatMenu.add(font);
1876 formatMenu.addSeparator();
1877 formatMenu.add(wrapMenuItem);
1878 formatMenu.add(scaleAbove);
1879 formatMenu.add(scaleLeft);
1880 formatMenu.add(scaleRight);
1881 formatMenu.add(seqLimits);
1882 formatMenu.add(idRightAlign);
1883 formatMenu.add(hiddenMarkers);
1884 formatMenu.add(viewBoxesMenuItem);
1885 formatMenu.add(viewTextMenuItem);
1886 formatMenu.add(colourTextMenuItem);
1887 formatMenu.add(renderGapsMenuItem);
1888 formatMenu.add(centreColumnLabelsMenuItem);
1889 formatMenu.add(showNonconservedMenuItem);
1890 selectMenu.add(findMenuItem);
1891 selectMenu.addSeparator();
1892 selectMenu.add(selectAllSequenceMenuItem);
1893 selectMenu.add(deselectAllSequenceMenuItem);
1894 selectMenu.add(invertSequenceMenuItem);
1895 selectMenu.add(invertColSel);
1896 selectMenu.add(createGroup);
1897 selectMenu.add(unGroup);
1898 selectMenu.add(grpsFromSelection);
1899 selectMenu.add(deleteGroups);
1900 selectMenu.add(annotationColumn);
1901 selectMenu.add(selectHighlighted);
1902 // TODO - determine if the listenToViewSelections button is needed : see bug
1904 // selectMenu.addSeparator();
1905 // selectMenu.add(listenToViewSelections);
1909 * Constructs the entries on the Colour menu (but does not add them to the
1912 protected void initColourMenu()
1914 applyToAllGroups = new JCheckBoxMenuItem(
1915 MessageManager.getString("label.apply_colour_to_all_groups"));
1916 applyToAllGroups.addActionListener(new ActionListener()
1919 public void actionPerformed(ActionEvent e)
1921 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
1925 textColour = new JMenuItem(
1926 MessageManager.getString("label.text_colour"));
1927 textColour.addActionListener(new ActionListener()
1930 public void actionPerformed(ActionEvent e)
1932 textColour_actionPerformed();
1936 conservationMenuItem = new JCheckBoxMenuItem(
1937 MessageManager.getString("action.by_conservation"));
1938 conservationMenuItem.addActionListener(new ActionListener()
1941 public void actionPerformed(ActionEvent e)
1943 conservationMenuItem_actionPerformed(conservationMenuItem
1948 abovePIDThreshold = new JCheckBoxMenuItem(
1949 MessageManager.getString("label.above_identity_threshold"));
1950 abovePIDThreshold.addActionListener(new ActionListener()
1953 public void actionPerformed(ActionEvent e)
1955 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
1958 modifyPID = new JMenuItem(
1959 MessageManager.getString("label.modify_identity_threshold"));
1960 modifyPID.addActionListener(new ActionListener()
1963 public void actionPerformed(ActionEvent e)
1965 modifyPID_actionPerformed();
1968 modifyConservation = new JMenuItem(
1970 .getString("label.modify_conservation_threshold"));
1971 modifyConservation.addActionListener(new ActionListener()
1974 public void actionPerformed(ActionEvent e)
1976 modifyConservation_actionPerformed();
1980 annotationColour = new JMenuItem(
1981 MessageManager.getString("action.by_annotation"));
1982 annotationColour.addActionListener(new ActionListener()
1985 public void actionPerformed(ActionEvent e)
1987 annotationColour_actionPerformed();
1992 protected void selectHighlightedColumns_actionPerformed(
1993 ActionEvent actionEvent)
1995 // TODO Auto-generated method stub
2000 * Generate the reverse sequence (or reverse complement if the flag is true)
2001 * and add it to the alignment
2005 protected void showReverse_actionPerformed(boolean complement)
2010 * Try to run script in a Groovy console, having first ensured that this
2011 * alignframe is set as currentAlignFrame in Desktop
2013 protected void runGroovy_actionPerformed()
2019 * Adds the given action listener and key accelerator to the given menu item.
2020 * Also saves in a lookup table to support lookup of action by key stroke.
2024 * @param actionListener
2026 protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2027 JMenuItem menuItem, ActionListener actionListener)
2029 menuItem.setAccelerator(keyStroke);
2030 accelerators.put(keyStroke, menuItem);
2031 menuItem.addActionListener(actionListener);
2035 * Action on clicking sort annotations by type.
2039 protected void sortAnnotations_actionPerformed()
2044 * Action on clicking Show all annotations.
2046 * @param forSequences
2047 * update sequence-related annotations
2048 * @param forAlignment
2049 * update non-sequence-related annotations
2051 protected void showAllAnnotations_actionPerformed(boolean forSequences,
2052 boolean forAlignment)
2054 setAnnotationsVisibility(true, forSequences, forAlignment);
2058 * Action on clicking Hide all annotations.
2060 * @param forSequences
2061 * update sequence-related annotations
2062 * @param forAlignment
2063 * update non-sequence-related annotations
2065 protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2066 boolean forAlignment)
2068 setAnnotationsVisibility(false, forSequences, forAlignment);
2072 * Set the visibility of annotations to true or false. Can act on
2073 * sequence-related annotations, or alignment-related, or both.
2076 * @param forSequences
2077 * update sequence-related annotations
2078 * @param forAlignment
2079 * update non-sequence-related annotations
2081 protected void setAnnotationsVisibility(boolean visible,
2082 boolean forSequences, boolean forAlignment)
2087 protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2089 // TODO Auto-generated method stub
2093 protected void listenToViewSelections_actionPerformed(ActionEvent e)
2095 // TODO Auto-generated method stub
2099 protected void showAllhidden_actionPerformed(ActionEvent e)
2101 // TODO Auto-generated method stub
2105 protected void hideAllButSelection_actionPerformed(ActionEvent e)
2107 // TODO Auto-generated method stub
2111 protected void hideAllSelection_actionPerformed(ActionEvent e)
2113 // TODO Auto-generated method stub
2117 protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2119 // TODO Auto-generated method stub
2123 protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2125 // TODO Auto-generated method stub
2129 protected void showSequenceLogo_actionPerformed(ActionEvent e)
2131 // TODO Auto-generated method stub
2135 protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2137 // TODO Auto-generated method stub
2141 protected void showGroupConsensus_actionPerformed(ActionEvent e)
2143 // TODO Auto-generated method stub
2147 protected void showGroupConservation_actionPerformed(ActionEvent e)
2149 // TODO Auto-generated method stub
2153 protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2155 // TODO Auto-generated method stub
2159 protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2161 // TODO Auto-generated method stub
2165 protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2167 // TODO Auto-generated method stub
2171 protected void followHighlight_actionPerformed()
2173 // TODO Auto-generated method stub
2177 protected void showNpFeats_actionPerformed(ActionEvent e)
2179 // TODO Auto-generated method stub
2183 protected void showDbRefs_actionPerformed(ActionEvent e)
2185 // TODO Auto-generated method stub
2189 protected void centreColumnLabels_actionPerformed(ActionEvent e)
2193 protected void buildSortByAnnotationScoresMenu()
2197 protected void extractScores_actionPerformed(ActionEvent e)
2201 protected void outputText_actionPerformed(ActionEvent e)
2205 public void addFromFile_actionPerformed(ActionEvent e)
2210 public void addFromText_actionPerformed(ActionEvent e)
2215 public void addFromURL_actionPerformed(ActionEvent e)
2220 public void exportFeatures_actionPerformed(ActionEvent e)
2225 public void exportAnnotations_actionPerformed(ActionEvent e)
2230 protected void htmlMenuItem_actionPerformed(ActionEvent e)
2234 protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2239 protected void closeMenuItem_actionPerformed(boolean b)
2243 protected void redoMenuItem_actionPerformed(ActionEvent e)
2247 protected void undoMenuItem_actionPerformed(ActionEvent e)
2251 protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2255 protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2259 protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2263 protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2267 protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2271 protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2275 protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2279 protected void wrapMenuItem_actionPerformed(ActionEvent e)
2283 protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2287 protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2291 protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2295 protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2299 protected void overviewMenuItem_actionPerformed(ActionEvent e)
2303 protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2307 protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2311 protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2315 protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2319 protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2323 protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2327 protected void PCAMenuItem_actionPerformed(ActionEvent e)
2331 protected void averageDistanceTreeMenuItem_actionPerformed(ActionEvent e)
2335 protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2339 protected void njTreeBlosumMenuItem_actionPerformed(ActionEvent e)
2343 protected void avTreeBlosumMenuItem_actionPerformed(ActionEvent e)
2347 protected void conservationMenuItem_actionPerformed(boolean selected)
2351 protected void printMenuItem_actionPerformed(ActionEvent e)
2355 protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2359 protected void findMenuItem_actionPerformed(ActionEvent e)
2363 protected void abovePIDThreshold_actionPerformed(boolean selected)
2367 public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2371 protected void deleteGroups_actionPerformed(ActionEvent e)
2375 protected void createGroup_actionPerformed(ActionEvent e)
2379 protected void unGroup_actionPerformed(ActionEvent e)
2383 protected void copy_actionPerformed(ActionEvent e)
2387 protected void cut_actionPerformed(ActionEvent e)
2391 protected void delete_actionPerformed(ActionEvent e)
2395 protected void pasteNew_actionPerformed(ActionEvent e)
2399 protected void pasteThis_actionPerformed(ActionEvent e)
2403 protected void applyToAllGroups_actionPerformed(boolean selected)
2407 public void createPNG(java.io.File f)
2411 protected void font_actionPerformed(ActionEvent e)
2415 protected void seqLimit_actionPerformed(ActionEvent e)
2419 public void seqDBRef_actionPerformed(ActionEvent e)
2424 public void createEPS(java.io.File f)
2428 public void createSVG(java.io.File f)
2433 protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2439 * Template method to handle the 'load T-Coffee scores' menu event.
2441 * Subclasses override this method to provide a custom action.
2446 protected void loadScores_actionPerformed(ActionEvent event)
2451 protected void jpred_actionPerformed(ActionEvent e)
2455 protected void scaleAbove_actionPerformed(ActionEvent e)
2459 protected void scaleLeft_actionPerformed(ActionEvent e)
2463 protected void scaleRight_actionPerformed(ActionEvent e)
2467 protected void modifyPID_actionPerformed()
2471 protected void modifyConservation_actionPerformed()
2475 protected void saveAs_actionPerformed(ActionEvent e)
2479 protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2483 public void vamsasStore_actionPerformed(ActionEvent e)
2488 public void vamsasLoad_actionPerformed(ActionEvent e)
2493 public void showTranslation_actionPerformed(ActionEvent e)
2498 public void featureSettings_actionPerformed(ActionEvent e)
2503 public void fetchSequence_actionPerformed(ActionEvent e)
2508 public void smoothFont_actionPerformed(ActionEvent e)
2513 public void annotationColour_actionPerformed()
2517 public void annotationColumn_actionPerformed(ActionEvent e)
2521 public void associatedData_actionPerformed(ActionEvent e)
2526 public void autoCalculate_actionPerformed(ActionEvent e)
2531 public void sortByTreeOption_actionPerformed(ActionEvent e)
2536 public void showAllSeqs_actionPerformed(ActionEvent e)
2541 public void showAllColumns_actionPerformed(ActionEvent e)
2546 public void hideSelSequences_actionPerformed(ActionEvent e)
2551 public void hideSelColumns_actionPerformed(ActionEvent e)
2556 public void hiddenMarkers_actionPerformed(ActionEvent e)
2561 public void findPdbId_actionPerformed(ActionEvent e)
2566 public void enterPdbId_actionPerformed(ActionEvent e)
2571 public void pdbFile_actionPerformed(ActionEvent e)
2576 public void invertColSel_actionPerformed(ActionEvent e)
2581 public void tabSelectionChanged(int sel)
2586 public void tabbedPane_mousePressed(MouseEvent e)
2591 public void tabbedPane_focusGained(FocusEvent e)
2596 public void save_actionPerformed(ActionEvent e)
2601 public void reload_actionPerformed(ActionEvent e)
2606 public void newView_actionPerformed(ActionEvent e)
2611 public void textColour_actionPerformed()
2616 public void idRightAlign_actionPerformed(ActionEvent e)
2621 public void expandViews_actionPerformed(ActionEvent e)
2626 public void gatherViews_actionPerformed(ActionEvent e)
2631 public void buildTreeMenu()
2636 public void pageSetup_actionPerformed(ActionEvent e)
2641 public void alignmentProperties()
2646 protected void expand_newalign(ActionEvent e)
2648 // TODO Auto-generated method stub
2652 protected boolean isShowAutoCalculatedAbove()
2654 return showAutoCalculatedAbove;
2657 protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2659 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2662 protected SequenceAnnotationOrder getAnnotationSortOrder()
2664 return annotationSortOrder;
2667 protected void setAnnotationSortOrder(
2668 SequenceAnnotationOrder annotationSortOrder)
2670 this.annotationSortOrder = annotationSortOrder;
2673 public Map<KeyStroke, JMenuItem> getAccelerators()
2675 return this.accelerators;
2679 * Returns the selected index of the tabbed pane, or -1 if none selected
2680 * (including the case where the tabbed pane has not been made visible).
2684 public int getTabIndex()
2686 return tabbedPane.getSelectedIndex();
2689 public JPanel getStatusPanel()
2695 * Sets a reference to the containing split frame. Also makes the 'toggle
2696 * split view' menu item visible and checked.
2700 public void setSplitFrame(SplitContainerI sf)
2702 this.splitFrame = sf;
2705 this.showComplementMenuItem.setVisible(true);
2706 this.showComplementMenuItem.setState(true);
2710 public SplitContainerI getSplitViewContainer()
2712 return this.splitFrame;
2715 protected void showComplement_actionPerformed(boolean complement)