Clover icon

Coverage Report

  1. Project Clover database Mon Nov 11 2024 20:42:03 GMT
  2. Package jalview.jbgui

File GAlignFrame.java

 

Coverage histogram

../../img/srcFileCovDistChart6.png
36% of files have more coverage

Code metrics

28
772
281
1
2,987
2,404
296
0.38
2.75
281
1.05

Classes

Class Line # Actions
GAlignFrame 67 772 296
0.590194359%
 

Contributing tests

This file is covered by 180 tests. .

Source view

1    /*
2    * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3    * Copyright (C) $$Year-Rel$$ The Jalview Authors
4    *
5    * This file is part of Jalview.
6    *
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.
11    *
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.
16    *
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.
20    */
21    package jalview.jbgui;
22   
23    import java.awt.BorderLayout;
24    import java.awt.Color;
25    import java.awt.Component;
26    import java.awt.GridLayout;
27    import java.awt.event.ActionEvent;
28    import java.awt.event.ActionListener;
29    import java.awt.event.FocusAdapter;
30    import java.awt.event.FocusEvent;
31    import java.awt.event.KeyEvent;
32    import java.awt.event.MouseAdapter;
33    import java.awt.event.MouseEvent;
34    import java.util.HashMap;
35    import java.util.List;
36    import java.util.Map;
37   
38    import javax.swing.BorderFactory;
39    import javax.swing.ButtonGroup;
40    import javax.swing.JCheckBoxMenuItem;
41    import javax.swing.JInternalFrame;
42    import javax.swing.JLabel;
43    import javax.swing.JMenu;
44    import javax.swing.JMenuBar;
45    import javax.swing.JMenuItem;
46    import javax.swing.JPanel;
47    import javax.swing.JRadioButtonMenuItem;
48    import javax.swing.JTabbedPane;
49    import javax.swing.KeyStroke;
50    import javax.swing.event.ChangeEvent;
51    import javax.swing.event.MenuEvent;
52    import javax.swing.event.MenuListener;
53   
54    import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
55    import jalview.analysis.GeneticCodeI;
56    import jalview.analysis.GeneticCodes;
57    import jalview.api.SplitContainerI;
58    import jalview.bin.Cache;
59    import jalview.gui.JvSwingUtils;
60    import jalview.gui.Preferences;
61    import jalview.io.FileFormats;
62    import jalview.schemes.ResidueColourScheme;
63    import jalview.util.MessageManager;
64    import jalview.util.Platform;
65   
66    @SuppressWarnings("serial")
 
67    public class GAlignFrame extends JInternalFrame
68    {
69    protected JMenuBar alignFrameMenuBar = new JMenuBar();
70   
71    protected JMenuItem closeMenuItem = new JMenuItem();
72   
73    public JMenu webService = new JMenu();// BH 2019 was protected, but not
74    // sufficient for AlignFrame thread run
75   
76    public JMenuItem webServiceNoServices;// BH 2019 was protected, but not
77    // sufficient for AlignFrame thread run
78   
79    protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
80   
81    protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
82   
83    protected JMenu sortByAnnotScore = new JMenu();
84   
85    public JLabel statusBar = new JLabel(); // BH 2019 was protected, but not
86    // sufficient for
87    // AlignFrame.printWriter
88   
89    protected JMenu outputTextboxMenu = new JMenu();
90   
91    protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
92   
93    protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
94   
95    protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
96   
97    protected JMenuItem undoMenuItem = new JMenuItem();
98   
99    protected JMenuItem redoMenuItem = new JMenuItem();
100   
101    protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
102   
103    protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
104   
105    public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
106   
107    JMenuItem copy = new JMenuItem();
108   
109    JMenuItem copyHighlighted = new JMenuItem();
110   
111    JMenuItem cut = new JMenuItem();
112   
113    JMenu pasteMenu = new JMenu();
114   
115    protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
116   
117    protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
118   
119    protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
120   
121    protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
122   
123    protected JCheckBoxMenuItem applyToAllGroups;
124   
125    protected JMenu colourMenu = new JMenu();
126   
127    protected JMenuItem textColour;
128   
129    protected JCheckBoxMenuItem conservationMenuItem;
130   
131    protected JMenuItem modifyConservation;
132   
133    protected JCheckBoxMenuItem abovePIDThreshold;
134   
135    protected JMenuItem modifyPID;
136   
137    protected JCheckBoxMenuItem byConsensusSecondaryStructureMenuItem;
138   
139    protected JMenuItem modifyConsensusSecondaryStructureThreshold;
140   
141    protected JRadioButtonMenuItem annotationColour;
142   
143    protected JMenu sortByTreeMenu = new JMenu();
144   
145    protected JMenu sort = new JMenu();
146   
147    protected JMenuItem calculateTree = new JMenuItem();
148   
149    protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
150   
151    protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
152   
153    protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
154   
155    protected JMenu showTranslation = new JMenu();
156   
157    protected JMenuItem showReverse = new JMenuItem();
158   
159    protected JMenuItem showReverseComplement = new JMenuItem();
160   
161    protected JMenu showProducts = new JMenu();
162   
163    protected JMenuItem runGroovy = new JMenuItem();
164   
165    protected JMenuItem loadVcf;
166   
167    protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
168   
169    protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
170   
171    protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
172   
173    protected JPanel statusPanel = new JPanel();
174   
175    protected JMenuItem showAllSeqAnnotations = new JMenuItem();
176   
177    protected JMenuItem hideAllSeqAnnotations = new JMenuItem();
178   
179    protected JMenuItem showAllAlAnnotations = new JMenuItem();
180   
181    protected JMenuItem hideAllAlAnnotations = new JMenuItem();
182   
183    protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
184   
185    protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem();
186   
187    protected JTabbedPane tabbedPane = new JTabbedPane();
188   
189    protected JMenuItem reload = new JMenuItem();
190   
191    protected JMenu formatMenu = new JMenu();
192   
193    protected JCheckBoxMenuItem idRightAlign = new JCheckBoxMenuItem();
194   
195    protected JCheckBoxMenuItem centreColumnLabelsMenuItem = new JCheckBoxMenuItem();
196   
197    protected JCheckBoxMenuItem followHighlightMenuItem = new JCheckBoxMenuItem();
198   
199    protected JMenuItem gatherViews = new JMenuItem();
200   
201    protected JMenuItem expandViews = new JMenuItem();
202   
203    protected JCheckBoxMenuItem showStrucProvider = new JCheckBoxMenuItem();
204   
205    protected JCheckBoxMenuItem showSSConsensus = new JCheckBoxMenuItem();
206   
207    protected JCheckBoxMenuItem showGroupSSConsensus = new JCheckBoxMenuItem();
208   
209    protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
210   
211    protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
212   
213    protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
214   
215    protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
216   
217    protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
218   
219    protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
220   
221    protected JMenuItem openFeatureSettings;
222   
223    private SequenceAnnotationOrder annotationSortOrder;
224   
225    private boolean showAutoCalculatedAbove = false;
226   
227    private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
228   
229    private SplitContainerI splitFrame;
230   
 
231  454 toggle public GAlignFrame()
232    {
233  454 try
234    {
235  454 setFrameIcon(null);
236   
237    // for Web-page embedding using id=align-frame-div
238  454 setName("jalview-alignment");
239   
240  454 jbInit();
241  452 setJMenuBar(alignFrameMenuBar);
242   
243    // dynamically fill save as menu with available formats
244  452 for (String ff : FileFormats.getInstance().getWritableFormats(true))
245    {
246  4972 JMenuItem item = new JMenuItem(ff);
247   
248  4972 item.addActionListener(new ActionListener()
249    {
 
250  0 toggle @Override
251    public void actionPerformed(ActionEvent e)
252    {
253  0 outputText_actionPerformed(e.getActionCommand());
254    }
255    });
256   
257  4972 outputTextboxMenu.add(item);
258    }
259    } catch (Exception e)
260    {
261  0 jalview.bin.Console.errPrintln(e.toString());
262    }
263   
264  452 if (Platform.allowMnemonics()) // was "not mac and not JS"
265    {
266  452 closeMenuItem.setMnemonic('C');
267  452 outputTextboxMenu.setMnemonic('T');
268  452 undoMenuItem.setMnemonic('Z');
269  452 redoMenuItem.setMnemonic('0');
270  452 copy.setMnemonic('C');
271  452 cut.setMnemonic('U');
272  452 pasteMenu.setMnemonic('P');
273  452 reload.setMnemonic('R');
274    }
275    }
276   
 
277  454 toggle private void jbInit() throws Exception
278    {
279  454 setFrameIcon(null);
280  454 initColourMenu();
281   
282  454 JMenuItem saveAs = new JMenuItem(
283    MessageManager.getString("action.save_as"));
284  454 ActionListener al = new ActionListener()
285    {
 
286  0 toggle @Override
287    public void actionPerformed(ActionEvent e)
288    {
289  0 saveAs_actionPerformed();
290    }
291    };
292   
293    // FIXME getDefaultToolkit throws an exception in Headless mode
294  454 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
295    jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
296    | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
297    false);
298  454 addMenuActionAndAccelerator(keyStroke, saveAs, al);
299   
300  454 closeMenuItem.setText(MessageManager.getString("action.close"));
301  454 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
302    jalview.util.ShortcutKeyMaskExWrapper
303    .getMenuShortcutKeyMaskEx(),
304    false);
305  454 al = new ActionListener()
306    {
 
307  0 toggle @Override
308    public void actionPerformed(ActionEvent e)
309    {
310  0 closeMenuItem_actionPerformed(false);
311    }
312    };
313  454 addMenuActionAndAccelerator(keyStroke, closeMenuItem, al);
314   
315  454 JMenu editMenu = new JMenu(MessageManager.getString("action.edit"));
316  454 JMenu viewMenu = new JMenu(MessageManager.getString("action.view"));
317  454 JMenu annotationsMenu = new JMenu(
318    MessageManager.getString("action.annotations"));
319  454 JMenu showMenu = new JMenu(MessageManager.getString("action.show"));
320  454 colourMenu.setText(MessageManager.getString("action.colour"));
321  454 JMenu calculateMenu = new JMenu(
322    MessageManager.getString("action.calculate"));
323  454 webService.setText(MessageManager.getString("action.web_service"));
324  454 JMenuItem selectAllSequenceMenuItem = new JMenuItem(
325    MessageManager.getString("action.select_all"));
326  454 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
327    jalview.util.ShortcutKeyMaskExWrapper
328    .getMenuShortcutKeyMaskEx(),
329    false);
330  454 al = new ActionListener()
331    {
 
332  0 toggle @Override
333    public void actionPerformed(ActionEvent e)
334    {
335  0 selectAllSequenceMenuItem_actionPerformed(e);
336    }
337    };
338  454 addMenuActionAndAccelerator(keyStroke, selectAllSequenceMenuItem, al);
339   
340  454 JMenuItem deselectAllSequenceMenuItem = new JMenuItem(
341    MessageManager.getString("action.deselect_all"));
342  454 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
343  454 al = new ActionListener()
344    {
 
345  0 toggle @Override
346    public void actionPerformed(ActionEvent e)
347    {
348  0 deselectAllSequenceMenuItem_actionPerformed(e);
349    }
350    };
351  454 addMenuActionAndAccelerator(keyStroke, deselectAllSequenceMenuItem, al);
352   
353  454 JMenuItem invertSequenceMenuItem = new JMenuItem(
354    MessageManager.getString("action.invert_sequence_selection"));
355  454 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
356    jalview.util.ShortcutKeyMaskExWrapper
357    .getMenuShortcutKeyMaskEx(),
358    false);
359  454 al = new ActionListener()
360    {
 
361  0 toggle @Override
362    public void actionPerformed(ActionEvent e)
363    {
364  0 invertSequenceMenuItem_actionPerformed(e);
365    }
366    };
367  454 addMenuActionAndAccelerator(keyStroke, invertSequenceMenuItem, al);
368   
369  454 JMenuItem grpsFromSelection = new JMenuItem(
370    MessageManager.getString("action.make_groups_selection"));
371  454 grpsFromSelection.addActionListener(new ActionListener()
372    {
 
373  0 toggle @Override
374    public void actionPerformed(ActionEvent e)
375    {
376  0 makeGrpsFromSelection_actionPerformed(e);
377    }
378    });
379  454 JMenuItem expandAlignment = new JMenuItem(
380    MessageManager.getString("action.view_flanking_regions"));
381  454 expandAlignment.setToolTipText(
382    MessageManager.getString("label.view_flanking_regions"));
383  454 expandAlignment.addActionListener(new ActionListener()
384    {
 
385  0 toggle @Override
386    public void actionPerformed(ActionEvent e)
387    {
388  0 expand_newalign(e);
389    }
390    });
391  454 JMenuItem remove2LeftMenuItem = new JMenuItem(
392    MessageManager.getString("action.remove_left"));
393  454 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
394    jalview.util.ShortcutKeyMaskExWrapper
395    .getMenuShortcutKeyMaskEx(),
396    false);
397  454 al = new ActionListener()
398    {
 
399  0 toggle @Override
400    public void actionPerformed(ActionEvent e)
401    {
402  0 remove2LeftMenuItem_actionPerformed(e);
403    }
404    };
405  454 addMenuActionAndAccelerator(keyStroke, remove2LeftMenuItem, al);
406   
407  454 JMenuItem remove2RightMenuItem = new JMenuItem(
408    MessageManager.getString("action.remove_right"));
409  454 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
410    jalview.util.ShortcutKeyMaskExWrapper
411    .getMenuShortcutKeyMaskEx(),
412    false);
413  454 al = new ActionListener()
414    {
 
415  0 toggle @Override
416    public void actionPerformed(ActionEvent e)
417    {
418  0 remove2RightMenuItem_actionPerformed(e);
419    }
420    };
421  454 addMenuActionAndAccelerator(keyStroke, remove2RightMenuItem, al);
422   
423  454 JMenuItem removeGappedColumnMenuItem = new JMenuItem(
424    MessageManager.getString("action.remove_empty_columns"));
425  454 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
426    jalview.util.ShortcutKeyMaskExWrapper
427    .getMenuShortcutKeyMaskEx(),
428    false);
429  454 al = new ActionListener()
430    {
 
431  0 toggle @Override
432    public void actionPerformed(ActionEvent e)
433    {
434  0 removeGappedColumnMenuItem_actionPerformed(e);
435    }
436    };
437  454 addMenuActionAndAccelerator(keyStroke, removeGappedColumnMenuItem, al);
438   
439  454 JMenuItem removeAllGapsMenuItem = new JMenuItem(
440    MessageManager.getString("action.remove_all_gaps"));
441  454 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
442    jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
443    | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
444    false);
445  454 al = new ActionListener()
446    {
 
447  0 toggle @Override
448    public void actionPerformed(ActionEvent e)
449    {
450  0 removeAllGapsMenuItem_actionPerformed(e);
451    }
452    };
453  454 addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
454   
455  454 JMenuItem justifyLeftMenuItem = new JMenuItem(
456    MessageManager.getString("action.left_justify"));
457  454 justifyLeftMenuItem.setToolTipText(
458    MessageManager.getString("tooltip.left_justify"));
459  454 justifyLeftMenuItem.addActionListener(new ActionListener()
460    {
 
461  0 toggle @Override
462    public void actionPerformed(ActionEvent e)
463    {
464  0 justifyLeftMenuItem_actionPerformed(e);
465    }
466    });
467  454 JMenuItem justifyRightMenuItem = new JMenuItem(
468    MessageManager.getString("action.right_justify"));
469  454 justifyRightMenuItem.setToolTipText(
470    MessageManager.getString("action.left_justify"));
471   
472  454 justifyRightMenuItem.addActionListener(new ActionListener()
473    {
 
474  0 toggle @Override
475    public void actionPerformed(ActionEvent e)
476    {
477  0 justifyRightMenuItem_actionPerformed(e);
478    }
479    });
480  454 viewBoxesMenuItem.setText(MessageManager.getString("action.boxes"));
481  454 viewBoxesMenuItem.setState(true);
482  454 viewBoxesMenuItem.addActionListener(new ActionListener()
483    {
 
484  0 toggle @Override
485    public void actionPerformed(ActionEvent e)
486    {
487  0 viewBoxesMenuItem_actionPerformed(e);
488    }
489    });
490  454 viewTextMenuItem.setText(MessageManager.getString("action.text"));
491  454 viewTextMenuItem.setState(true);
492  454 viewTextMenuItem.addActionListener(new ActionListener()
493    {
 
494  0 toggle @Override
495    public void actionPerformed(ActionEvent e)
496    {
497  0 viewTextMenuItem_actionPerformed(e);
498    }
499    });
500  454 showNonconservedMenuItem
501    .setText(MessageManager.getString("label.show_non_conserved"));
502  454 showNonconservedMenuItem.setState(false);
503  454 showNonconservedMenuItem.addActionListener(new ActionListener()
504    {
 
505  0 toggle @Override
506    public void actionPerformed(ActionEvent e)
507    {
508  0 showUnconservedMenuItem_actionPerformed(e);
509    }
510    });
511  454 JMenuItem sortPairwiseMenuItem = new JMenuItem(
512    MessageManager.getString("action.by_pairwise_id"));
513  454 sortPairwiseMenuItem.addActionListener(new ActionListener()
514    {
 
515  0 toggle @Override
516    public void actionPerformed(ActionEvent e)
517    {
518  0 sortPairwiseMenuItem_actionPerformed(e);
519    }
520    });
521  454 JMenuItem sortIDMenuItem = new JMenuItem(
522    MessageManager.getString("action.by_id"));
523  454 sortIDMenuItem.addActionListener(new ActionListener()
524    {
 
525  0 toggle @Override
526    public void actionPerformed(ActionEvent e)
527    {
528  0 sortIDMenuItem_actionPerformed(e);
529    }
530    });
531  454 JMenuItem sortLengthMenuItem = new JMenuItem(
532    MessageManager.getString("action.by_length"));
533  454 sortLengthMenuItem.addActionListener(new ActionListener()
534    {
 
535  0 toggle @Override
536    public void actionPerformed(ActionEvent e)
537    {
538  0 sortLengthMenuItem_actionPerformed(e);
539    }
540    });
541  454 JMenuItem sortGroupMenuItem = new JMenuItem(
542    MessageManager.getString("action.by_group"));
543  454 sortGroupMenuItem.addActionListener(new ActionListener()
544    {
 
545  0 toggle @Override
546    public void actionPerformed(ActionEvent e)
547    {
548  0 sortGroupMenuItem_actionPerformed(e);
549    }
550    });
551   
552  454 JMenuItem removeRedundancyMenuItem = new JMenuItem(
553    MessageManager.getString("action.remove_redundancy"));
554  454 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
555    jalview.util.ShortcutKeyMaskExWrapper
556    .getMenuShortcutKeyMaskEx(),
557    false);
558  454 al = new ActionListener()
559    {
 
560  0 toggle @Override
561    public void actionPerformed(ActionEvent e)
562    {
563  0 removeRedundancyMenuItem_actionPerformed(e);
564    }
565    };
566  453 addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
567   
568  453 JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
569    MessageManager.getString("action.pairwise_alignment"));
570  453 pairwiseAlignmentMenuItem.addActionListener(new ActionListener()
571    {
 
572  0 toggle @Override
573    public void actionPerformed(ActionEvent e)
574    {
575  0 pairwiseAlignmentMenuItem_actionPerformed(e);
576    }
577    });
578   
579  453 this.getContentPane().setLayout(new BorderLayout());
580  453 alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
581  453 statusBar.setBackground(Color.white);
582  453 statusBar.setFont(new java.awt.Font("Verdana", 0, 11));
583  453 statusBar.setBorder(BorderFactory.createLineBorder(Color.black));
584  453 statusBar.setText(MessageManager.getString("label.status_bar"));
585  453 outputTextboxMenu
586    .setText(MessageManager.getString("label.out_to_textbox"));
587   
588  453 annotationPanelMenuItem.setActionCommand("");
589  453 annotationPanelMenuItem
590    .setText(MessageManager.getString("label.show_annotations"));
591  453 annotationPanelMenuItem
592    .setState(Cache.getDefault("SHOW_ANNOTATIONS", true));
593  453 annotationPanelMenuItem.addActionListener(new ActionListener()
594    {
 
595  0 toggle @Override
596    public void actionPerformed(ActionEvent e)
597    {
598  0 annotationPanelMenuItem_actionPerformed(e);
599    }
600    });
601  453 showAllAlAnnotations.setText(
602    MessageManager.getString("label.show_all_al_annotations"));
603  453 final boolean isAnnotationPanelShown = annotationPanelMenuItem
604    .getState();
605  453 showAllAlAnnotations.setEnabled(isAnnotationPanelShown);
606  453 showAllAlAnnotations.addActionListener(new ActionListener()
607    {
 
608  0 toggle @Override
609    public void actionPerformed(ActionEvent e)
610    {
611  0 showAllAnnotations_actionPerformed(false, true);
612    }
613    });
614  453 hideAllAlAnnotations.setText(
615    MessageManager.getString("label.hide_all_al_annotations"));
616  453 hideAllAlAnnotations.setEnabled(isAnnotationPanelShown);
617  453 hideAllAlAnnotations.addActionListener(new ActionListener()
618    {
 
619  0 toggle @Override
620    public void actionPerformed(ActionEvent e)
621    {
622  0 hideAllAnnotations_actionPerformed(false, true);
623    }
624    });
625  453 showAllSeqAnnotations.setText(
626    MessageManager.getString("label.show_all_seq_annotations"));
627  453 showAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
628  453 showAllSeqAnnotations.addActionListener(new ActionListener()
629    {
 
630  0 toggle @Override
631    public void actionPerformed(ActionEvent e)
632    {
633  0 showAllAnnotations_actionPerformed(true, false);
634    }
635    });
636  453 hideAllSeqAnnotations.setText(
637    MessageManager.getString("label.hide_all_seq_annotations"));
638  453 hideAllSeqAnnotations.setEnabled(isAnnotationPanelShown);
639  453 hideAllSeqAnnotations.addActionListener(new ActionListener()
640    {
 
641  0 toggle @Override
642    public void actionPerformed(ActionEvent e)
643    {
644  0 hideAllAnnotations_actionPerformed(true, false);
645    }
646    });
647  453 SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
648    .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
649    SequenceAnnotationOrder.NONE.name()));
650  453 final JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem(
651    MessageManager.getString("label.sort_annotations_by_sequence"));
652  453 final JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem(
653    MessageManager.getString("label.sort_annotations_by_label"));
654   
655  453 sortAnnBySequence.setSelected(
656    sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
657  453 sortAnnBySequence.addActionListener(new ActionListener()
658    {
 
659  0 toggle @Override
660    public void actionPerformed(ActionEvent e)
661    {
662  0 boolean newState = sortAnnBySequence.getState();
663  0 sortAnnByLabel.setSelected(false);
664  0 setAnnotationSortOrder(
665  0 newState ? SequenceAnnotationOrder.SEQUENCE_AND_LABEL
666    : SequenceAnnotationOrder.NONE);
667  0 sortAnnotations_actionPerformed();
668    }
669    });
670  453 sortAnnByLabel.setSelected(
671    sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
672  453 sortAnnByLabel.addActionListener(new ActionListener()
673    {
 
674  0 toggle @Override
675    public void actionPerformed(ActionEvent e)
676    {
677  0 boolean newState = sortAnnByLabel.getState();
678  0 sortAnnBySequence.setSelected(false);
679  0 setAnnotationSortOrder(
680  0 newState ? SequenceAnnotationOrder.LABEL_AND_SEQUENCE
681    : SequenceAnnotationOrder.NONE);
682  0 sortAnnotations_actionPerformed();
683    }
684    });
685  453 showStrucProvider = new JCheckBoxMenuItem(
686    MessageManager.getString("label.show_structure_provider"));
687  453 showStrucProvider.addActionListener(new ActionListener()
688    {
 
689  0 toggle @Override
690    public void actionPerformed(ActionEvent e)
691    {
692  0 showStructureProvider_actionPerformed(e);
693    }
694   
695    });
696  453 colourTextMenuItem = new JCheckBoxMenuItem(
697    MessageManager.getString("label.colour_text"));
698  453 colourTextMenuItem.addActionListener(new ActionListener()
699    {
 
700  0 toggle @Override
701    public void actionPerformed(ActionEvent e)
702    {
703  0 colourTextMenuItem_actionPerformed(e);
704    }
705    });
706   
707  453 JMenuItem htmlMenuItem = new JMenuItem(
708    MessageManager.getString("label.html"));
709  453 htmlMenuItem.addActionListener(new ActionListener()
710    {
 
711  0 toggle @Override
712    public void actionPerformed(ActionEvent e)
713    {
714  0 htmlMenuItem_actionPerformed(e);
715    }
716    });
717   
718  453 JMenuItem createBioJS = new JMenuItem(
719    MessageManager.getString("label.biojs_html_export"));
720  453 createBioJS.addActionListener(new java.awt.event.ActionListener()
721    {
 
722  0 toggle @Override
723    public void actionPerformed(ActionEvent e)
724    {
725  0 bioJSMenuItem_actionPerformed(e);
726    }
727    });
728   
729  453 JMenuItem overviewMenuItem = new JMenuItem(
730    MessageManager.getString("label.overview_window"));
731  453 overviewMenuItem.addActionListener(new ActionListener()
732    {
 
733  0 toggle @Override
734    public void actionPerformed(ActionEvent e)
735    {
736  0 overviewMenuItem_actionPerformed(e);
737    }
738    });
739   
740  453 undoMenuItem.setEnabled(false);
741  453 undoMenuItem.setText(MessageManager.getString("action.undo"));
742  453 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
743    jalview.util.ShortcutKeyMaskExWrapper
744    .getMenuShortcutKeyMaskEx(),
745    false);
746  453 al = new ActionListener()
747    {
 
748  0 toggle @Override
749    public void actionPerformed(ActionEvent e)
750    {
751  0 undoMenuItem_actionPerformed(e);
752    }
753    };
754  453 addMenuActionAndAccelerator(keyStroke, undoMenuItem, al);
755   
756  453 redoMenuItem.setEnabled(false);
757  453 redoMenuItem.setText(MessageManager.getString("action.redo"));
758  453 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
759    jalview.util.ShortcutKeyMaskExWrapper
760    .getMenuShortcutKeyMaskEx(),
761    false);
762  453 al = new ActionListener()
763    {
 
764  0 toggle @Override
765    public void actionPerformed(ActionEvent e)
766    {
767  0 redoMenuItem_actionPerformed(e);
768    }
769    };
770  453 addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
771   
772  453 wrapMenuItem.setText(MessageManager.getString("label.wrap"));
773  453 wrapMenuItem.addActionListener(new ActionListener()
774    {
 
775  0 toggle @Override
776    public void actionPerformed(ActionEvent e)
777    {
778  0 wrapMenuItem_actionPerformed(e);
779    }
780    });
781   
782  453 JMenuItem printMenuItem = new JMenuItem(
783    MessageManager.getString("action.print"));
784  453 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
785    jalview.util.ShortcutKeyMaskExWrapper
786    .getMenuShortcutKeyMaskEx(),
787    false);
788  453 al = new ActionListener()
789    {
 
790  0 toggle @Override
791    public void actionPerformed(ActionEvent e)
792    {
793  0 printMenuItem_actionPerformed(e);
794    }
795    };
796  453 addMenuActionAndAccelerator(keyStroke, printMenuItem, al);
797   
798  453 renderGapsMenuItem
799    .setText(MessageManager.getString("action.show_gaps"));
800  453 renderGapsMenuItem.setState(true);
801  453 renderGapsMenuItem.addActionListener(new ActionListener()
802    {
 
803  0 toggle @Override
804    public void actionPerformed(ActionEvent e)
805    {
806  0 renderGapsMenuItem_actionPerformed(e);
807    }
808    });
809   
810  453 JMenuItem findMenuItem = new JMenuItem(
811    MessageManager.getString("action.find"));
812  453 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
813    jalview.util.ShortcutKeyMaskExWrapper
814    .getMenuShortcutKeyMaskEx(),
815    false);
816  453 findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
817    MessageManager.getString("label.find_tip")));
818  453 al = new ActionListener()
819    {
 
820  0 toggle @Override
821    public void actionPerformed(ActionEvent e)
822    {
823  0 findMenuItem_actionPerformed(e);
824    }
825    };
826  453 addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
827   
828  453 showSeqFeatures.setText(
829    MessageManager.getString("label.show_sequence_features"));
830  453 showSeqFeatures.addActionListener(new ActionListener()
831    {
 
832  0 toggle @Override
833    public void actionPerformed(ActionEvent actionEvent)
834    {
835  0 showSeqFeatures_actionPerformed(actionEvent);
836    }
837    });
838    /*
839    * showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
840    * showSeqFeaturesHeight.addActionListener(new ActionListener() { public
841    * void actionPerformed(ActionEvent actionEvent) {
842    * showSeqFeaturesHeight_actionPerformed(actionEvent); } });
843    */
844  452 showDbRefsMenuitem
845    .setText(MessageManager.getString("label.show_database_refs"));
846  452 showDbRefsMenuitem.addActionListener(new ActionListener()
847    {
848   
 
849  0 toggle @Override
850    public void actionPerformed(ActionEvent e)
851    {
852  0 showDbRefs_actionPerformed(e);
853    }
854   
855    });
856  452 showNpFeatsMenuitem.setText(
857    MessageManager.getString("label.show_non_positional_features"));
858  452 showNpFeatsMenuitem.addActionListener(new ActionListener()
859    {
860   
 
861  0 toggle @Override
862    public void actionPerformed(ActionEvent e)
863    {
864  0 showNpFeats_actionPerformed(e);
865    }
866   
867    });
868  452 showGroupConservation
869    .setText(MessageManager.getString("label.group_conservation"));
870  452 showGroupConservation.addActionListener(new ActionListener()
871    {
872   
 
873  0 toggle @Override
874    public void actionPerformed(ActionEvent e)
875    {
876  0 showGroupConservation_actionPerformed(e);
877    }
878   
879    });
880   
881  452 showSSConsensus.setText(MessageManager
882    .getString("label.show_secondary_structure_consensus"));
883  452 showSSConsensus.addActionListener(new ActionListener()
884    {
885   
 
886  0 toggle @Override
887    public void actionPerformed(ActionEvent e)
888    {
889  0 showSSConsensus_actionPerformed(e);
890    }
891   
892    });
893   
894  452 showGroupSSConsensus
895    .setText(MessageManager.getString("label.group_ss_consensus"));
896  452 showGroupSSConsensus.addActionListener(new ActionListener()
897    {
898   
 
899  0 toggle @Override
900    public void actionPerformed(ActionEvent e)
901    {
902  0 showGroupSSConsensus_actionPerformed(e);
903    }
904   
905    });
906   
907  452 showGroupConsensus
908    .setText(MessageManager.getString("label.group_consensus"));
909  452 showGroupConsensus.addActionListener(new ActionListener()
910    {
911   
 
912  0 toggle @Override
913    public void actionPerformed(ActionEvent e)
914    {
915  0 showGroupConsensus_actionPerformed(e);
916    }
917   
918    });
919  452 showConsensusHistogram.setText(
920    MessageManager.getString("label.show_consensus_histogram"));
921  452 showConsensusHistogram.addActionListener(new ActionListener()
922    {
923   
 
924  0 toggle @Override
925    public void actionPerformed(ActionEvent e)
926    {
927  0 showConsensusHistogram_actionPerformed(e);
928    }
929   
930    });
931   
932  452 showSequenceLogo
933    .setText(MessageManager.getString("label.show_consensus_logo"));
934  452 showSequenceLogo.addActionListener(new ActionListener()
935    {
936   
 
937  0 toggle @Override
938    public void actionPerformed(ActionEvent e)
939    {
940  0 showSequenceLogo_actionPerformed(e);
941    }
942   
943    });
944  452 normaliseSequenceLogo
945    .setText(MessageManager.getString("label.norm_consensus_logo"));
946  452 normaliseSequenceLogo.addActionListener(new ActionListener()
947    {
948   
 
949  0 toggle @Override
950    public void actionPerformed(ActionEvent e)
951    {
952  0 normaliseSequenceLogo_actionPerformed(e);
953    }
954   
955    });
956  452 applyAutoAnnotationSettings
957    .setText(MessageManager.getString("label.apply_all_groups"));
958  452 applyAutoAnnotationSettings.setState(false);
959  452 applyAutoAnnotationSettings.setVisible(true);
960  452 applyAutoAnnotationSettings.addActionListener(new ActionListener()
961    {
 
962  0 toggle @Override
963    public void actionPerformed(ActionEvent e)
964    {
965  0 applyAutoAnnotationSettings_actionPerformed(e);
966    }
967    });
968   
969  452 ButtonGroup buttonGroup = new ButtonGroup();
970  452 final JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem(
971    MessageManager.getString("label.show_first"));
972  452 final JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem(
973    MessageManager.getString("label.show_last"));
974  452 buttonGroup.add(showAutoFirst);
975  452 buttonGroup.add(showAutoLast);
976  452 final boolean autoFirst = Cache
977    .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
978  452 showAutoFirst.setSelected(autoFirst);
979  452 setShowAutoCalculatedAbove(autoFirst);
980  452 showAutoFirst.addActionListener(new ActionListener()
981    {
 
982  0 toggle @Override
983    public void actionPerformed(ActionEvent e)
984    {
985  0 setShowAutoCalculatedAbove(showAutoFirst.isSelected());
986  0 sortAnnotations_actionPerformed();
987    }
988    });
989  452 showAutoLast.setSelected(!showAutoFirst.isSelected());
990  452 showAutoLast.addActionListener(new ActionListener()
991    {
 
992  0 toggle @Override
993    public void actionPerformed(ActionEvent e)
994    {
995  0 setShowAutoCalculatedAbove(!showAutoLast.isSelected());
996  0 sortAnnotations_actionPerformed();
997    }
998    });
999   
1000  452 JMenuItem deleteGroups = new JMenuItem(
1001    MessageManager.getString("action.undefine_groups"));
1002  452 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
1003    jalview.util.ShortcutKeyMaskExWrapper
1004    .getMenuShortcutKeyMaskEx(),
1005    false);
1006  452 al = new ActionListener()
1007    {
 
1008  0 toggle @Override
1009    public void actionPerformed(ActionEvent e)
1010    {
1011  0 deleteGroups_actionPerformed(e);
1012    }
1013    };
1014  452 addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
1015   
1016  452 JMenuItem annotationColumn = new JMenuItem(
1017    MessageManager.getString("action.select_by_annotation"));
1018  452 annotationColumn.addActionListener(new ActionListener()
1019    {
 
1020  0 toggle @Override
1021    public void actionPerformed(ActionEvent e)
1022    {
1023  0 annotationColumn_actionPerformed(e);
1024    }
1025    });
1026   
1027  452 JMenuItem createGroup = new JMenuItem(
1028    MessageManager.getString("action.create_group"));
1029  452 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
1030    jalview.util.ShortcutKeyMaskExWrapper
1031    .getMenuShortcutKeyMaskEx(),
1032    false);
1033  452 al = new ActionListener()
1034    {
 
1035  0 toggle @Override
1036    public void actionPerformed(ActionEvent e)
1037    {
1038  0 createGroup_actionPerformed(e);
1039    }
1040    };
1041  452 addMenuActionAndAccelerator(keyStroke, createGroup, al);
1042   
1043  452 JMenuItem unGroup = new JMenuItem(
1044    MessageManager.getString("action.remove_group"));
1045  452 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
1046    jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1047    | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1048    false);
1049  452 al = new ActionListener()
1050    {
 
1051  0 toggle @Override
1052    public void actionPerformed(ActionEvent e)
1053    {
1054  0 unGroup_actionPerformed(e);
1055    }
1056    };
1057  452 addMenuActionAndAccelerator(keyStroke, unGroup, al);
1058   
1059  452 copy.setText(MessageManager.getString("action.copy"));
1060  452 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
1061    jalview.util.ShortcutKeyMaskExWrapper
1062    .getMenuShortcutKeyMaskEx(),
1063    false);
1064   
1065  452 al = new ActionListener()
1066    {
 
1067  0 toggle @Override
1068    public void actionPerformed(ActionEvent e)
1069    {
1070  0 copy_actionPerformed();
1071    }
1072    };
1073  452 addMenuActionAndAccelerator(keyStroke, copy, al);
1074   
1075  452 cut.setText(MessageManager.getString("action.cut"));
1076  452 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
1077    jalview.util.ShortcutKeyMaskExWrapper
1078    .getMenuShortcutKeyMaskEx(),
1079    false);
1080  452 al = new ActionListener()
1081    {
 
1082  0 toggle @Override
1083    public void actionPerformed(ActionEvent e)
1084    {
1085  0 cut_actionPerformed();
1086    }
1087    };
1088  452 addMenuActionAndAccelerator(keyStroke, cut, al);
1089   
1090  452 JMenuItem delete = new JMenuItem(
1091    MessageManager.getString("action.delete"));
1092  452 delete.addActionListener(new ActionListener()
1093    {
 
1094  0 toggle @Override
1095    public void actionPerformed(ActionEvent e)
1096    {
1097  0 delete_actionPerformed();
1098    }
1099    });
1100   
1101  452 pasteMenu.setText(MessageManager.getString("action.paste"));
1102  452 JMenuItem pasteNew = new JMenuItem(
1103    MessageManager.getString("label.to_new_alignment"));
1104  452 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1105    jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1106    | jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1107    false);
1108  452 al = new ActionListener()
1109    {
 
1110  0 toggle @Override
1111    public void actionPerformed(ActionEvent e)
1112    {
1113  0 pasteNew_actionPerformed(e);
1114    }
1115    };
1116  452 addMenuActionAndAccelerator(keyStroke, pasteNew, al);
1117   
1118  452 JMenuItem pasteThis = new JMenuItem(
1119    MessageManager.getString("label.to_this_alignment"));
1120  452 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
1121    jalview.util.ShortcutKeyMaskExWrapper
1122    .getMenuShortcutKeyMaskEx(),
1123    false);
1124  452 al = new ActionListener()
1125    {
 
1126  0 toggle @Override
1127    public void actionPerformed(ActionEvent e)
1128    {
1129  0 pasteThis_actionPerformed(e);
1130    }
1131    };
1132  452 addMenuActionAndAccelerator(keyStroke, pasteThis, al);
1133   
1134  452 JMenuItem createPNG = new JMenuItem("PNG");
1135  452 createPNG.addActionListener(new ActionListener()
1136    {
 
1137  0 toggle @Override
1138    public void actionPerformed(ActionEvent e)
1139    {
1140  0 createPNG_actionPerformed(e);
1141    }
1142    });
1143  452 createPNG.setActionCommand(
1144    MessageManager.getString("label.save_png_image"));
1145   
1146  452 JMenuItem font = new JMenuItem(MessageManager.getString("action.font"));
1147  452 font.addActionListener(new ActionListener()
1148    {
 
1149  0 toggle @Override
1150    public void actionPerformed(ActionEvent e)
1151    {
1152  0 font_actionPerformed(e);
1153    }
1154    });
1155  452 seqLimits.setText(
1156    MessageManager.getString("label.show_sequence_limits"));
1157  452 seqLimits.setState(Cache.getDefault("SHOW_JVSUFFIX", true));
1158  452 seqLimits.addActionListener(new ActionListener()
1159    {
 
1160  0 toggle @Override
1161    public void actionPerformed(ActionEvent e)
1162    {
1163  0 seqLimit_actionPerformed(e);
1164    }
1165    });
1166  452 JMenuItem epsFile = new JMenuItem("EPS");
1167  452 epsFile.addActionListener(new ActionListener()
1168    {
 
1169  0 toggle @Override
1170    public void actionPerformed(ActionEvent e)
1171    {
1172  0 createEPS_actionPerformed(e);
1173    }
1174    });
1175   
1176  452 JMenuItem createSVG = new JMenuItem("SVG");
1177  452 createSVG.addActionListener(new ActionListener()
1178    {
 
1179  0 toggle @Override
1180    public void actionPerformed(ActionEvent e)
1181    {
1182  0 createSVG_actionPerformed(e);
1183    }
1184    });
1185   
1186  452 JMenuItem loadTreeMenuItem = new JMenuItem(
1187    MessageManager.getString("label.load_associated_tree"));
1188  452 loadTreeMenuItem.setActionCommand(
1189    MessageManager.getString("label.load_tree_for_sequence_set"));
1190  452 loadTreeMenuItem.addActionListener(new ActionListener()
1191    {
 
1192  0 toggle @Override
1193    public void actionPerformed(ActionEvent e)
1194    {
1195  0 loadTreeMenuItem_actionPerformed(e);
1196    }
1197    });
1198   
1199  452 scaleAbove.setVisible(false);
1200  452 scaleAbove.setText(MessageManager.getString("action.scale_above"));
1201  452 scaleAbove.addActionListener(new ActionListener()
1202    {
 
1203  0 toggle @Override
1204    public void actionPerformed(ActionEvent e)
1205    {
1206  0 scaleAbove_actionPerformed(e);
1207    }
1208    });
1209  452 scaleLeft.setVisible(false);
1210  452 scaleLeft.setSelected(true);
1211  452 scaleLeft.setText(MessageManager.getString("action.scale_left"));
1212  452 scaleLeft.addActionListener(new ActionListener()
1213    {
 
1214  0 toggle @Override
1215    public void actionPerformed(ActionEvent e)
1216    {
1217  0 scaleLeft_actionPerformed(e);
1218    }
1219    });
1220  452 scaleRight.setVisible(false);
1221  452 scaleRight.setSelected(true);
1222  452 scaleRight.setText(MessageManager.getString("action.scale_right"));
1223  452 scaleRight.addActionListener(new ActionListener()
1224    {
 
1225  0 toggle @Override
1226    public void actionPerformed(ActionEvent e)
1227    {
1228  0 scaleRight_actionPerformed(e);
1229    }
1230    });
1231  452 centreColumnLabelsMenuItem.setVisible(true);
1232  452 centreColumnLabelsMenuItem.setState(false);
1233  452 centreColumnLabelsMenuItem.setText(
1234    MessageManager.getString("label.centre_column_labels"));
1235  452 centreColumnLabelsMenuItem.addActionListener(new ActionListener()
1236    {
 
1237  0 toggle @Override
1238    public void actionPerformed(ActionEvent e)
1239    {
1240  0 centreColumnLabels_actionPerformed(e);
1241    }
1242    });
1243  452 followHighlightMenuItem.setVisible(true);
1244  452 followHighlightMenuItem.setState(true);
1245  452 followHighlightMenuItem
1246    .setText(MessageManager.getString("label.automatic_scrolling"));
1247  452 followHighlightMenuItem.addActionListener(new ActionListener()
1248    {
1249   
 
1250  0 toggle @Override
1251    public void actionPerformed(ActionEvent e)
1252    {
1253  0 followHighlight_actionPerformed();
1254    }
1255   
1256    });
1257   
1258  452 sortByTreeMenu
1259    .setText(MessageManager.getString("action.by_tree_order"));
1260  452 sort.setText(MessageManager.getString("action.sort"));
1261  452 sort.addMenuListener(new MenuListener()
1262    {
 
1263  0 toggle @Override
1264    public void menuSelected(MenuEvent e)
1265    {
1266  0 buildTreeSortMenu();
1267    }
1268   
 
1269  0 toggle @Override
1270    public void menuDeselected(MenuEvent e)
1271    {
1272    }
1273   
 
1274  0 toggle @Override
1275    public void menuCanceled(MenuEvent e)
1276    {
1277    }
1278    });
1279  452 sortByAnnotScore
1280    .setText(MessageManager.getString("label.sort_by_score"));
1281  452 sort.add(sortByAnnotScore);
1282  452 sort.addMenuListener(new javax.swing.event.MenuListener()
1283    {
1284   
 
1285  0 toggle @Override
1286    public void menuCanceled(MenuEvent e)
1287    {
1288    }
1289   
 
1290  0 toggle @Override
1291    public void menuDeselected(MenuEvent e)
1292    {
1293    }
1294   
 
1295  0 toggle @Override
1296    public void menuSelected(MenuEvent e)
1297    {
1298  0 buildSortByAnnotationScoresMenu();
1299    }
1300    });
1301  452 sortByAnnotScore.setVisible(false);
1302   
1303  452 calculateTree
1304    .setText(MessageManager.getString("action.calculate_tree_pca"));
1305   
1306  452 padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
1307  452 padGapsMenuitem.setState(Cache.getDefault("PAD_GAPS", false));
1308  452 padGapsMenuitem.addActionListener(new ActionListener()
1309    {
 
1310  0 toggle @Override
1311    public void actionPerformed(ActionEvent e)
1312    {
1313  0 padGapsMenuitem_actionPerformed(e);
1314    }
1315    });
1316  452 JMenuItem vamsasStore = new JMenuItem(
1317    MessageManager.getString("label.vamsas_store"));
1318  452 vamsasStore.setVisible(false);
1319  452 vamsasStore.addActionListener(new ActionListener()
1320    {
 
1321  0 toggle @Override
1322    public void actionPerformed(ActionEvent e)
1323    {
1324  0 vamsasStore_actionPerformed(e);
1325    }
1326    });
1327   
1328    /*
1329    * Translate as cDNA with sub-menu of translation tables
1330    */
1331  452 showTranslation
1332    .setText(MessageManager.getString("label.translate_cDNA"));
1333  452 boolean first = true;
1334  452 for (final GeneticCodeI table : GeneticCodes.getInstance()
1335    .getCodeTables())
1336    {
1337  11300 JMenuItem item = new JMenuItem(table.getId() + " " + table.getName());
1338  11300 showTranslation.add(item);
1339  11300 item.addActionListener(new ActionListener()
1340    {
 
1341  0 toggle @Override
1342    public void actionPerformed(ActionEvent e)
1343    {
1344  0 showTranslation_actionPerformed(table);
1345    }
1346    });
1347  11300 if (first)
1348    {
1349  452 showTranslation.addSeparator();
1350    }
1351  11300 first = false;
1352    }
1353   
1354  452 showReverse.setText(MessageManager.getString("label.reverse"));
1355  452 showReverse.addActionListener(new ActionListener()
1356    {
 
1357  0 toggle @Override
1358    public void actionPerformed(ActionEvent e)
1359    {
1360  0 showReverse_actionPerformed(false);
1361    }
1362    });
1363  452 showReverseComplement
1364    .setText(MessageManager.getString("label.reverse_complement"));
1365  452 showReverseComplement.addActionListener(new ActionListener()
1366    {
 
1367  0 toggle @Override
1368    public void actionPerformed(ActionEvent e)
1369    {
1370  0 showReverse_actionPerformed(true);
1371    }
1372    });
1373   
1374  452 JMenuItem extractScores = new JMenuItem(
1375    MessageManager.getString("label.extract_scores"));
1376  452 extractScores.addActionListener(new ActionListener()
1377    {
 
1378  0 toggle @Override
1379    public void actionPerformed(ActionEvent e)
1380    {
1381  0 extractScores_actionPerformed(e);
1382    }
1383    });
1384  452 extractScores.setVisible(true);
1385    // JBPNote: TODO: make gui for regex based score extraction
1386   
1387    // for show products actions see AlignFrame.canShowProducts
1388  452 showProducts.setText(MessageManager.getString("label.get_cross_refs"));
1389   
1390  452 runGroovy.setText(MessageManager.getString("label.run_groovy"));
1391  452 runGroovy.setToolTipText(
1392    MessageManager.getString("label.run_groovy_tip"));
1393  452 runGroovy.addActionListener(new ActionListener()
1394    {
 
1395  0 toggle @Override
1396    public void actionPerformed(ActionEvent e)
1397    {
1398  0 runGroovy_actionPerformed();
1399    }
1400    });
1401   
1402  452 openFeatureSettings = new JMenuItem(
1403    MessageManager.getString("action.feature_settings"));
1404  452 openFeatureSettings.addActionListener(new ActionListener()
1405    {
 
1406  0 toggle @Override
1407    public void actionPerformed(ActionEvent e)
1408    {
1409  0 featureSettings_actionPerformed(e);
1410    }
1411    });
1412   
1413    /*
1414    * add sub-menu of database we can fetch from
1415    */
1416  452 JMenuItem fetchSequence = new JMenuItem(
1417    MessageManager.getString("label.fetch_sequences"));
1418  452 fetchSequence.addActionListener(new ActionListener()
1419    {
 
1420  0 toggle @Override
1421    public void actionPerformed(ActionEvent e)
1422    {
1423  0 fetchSequence_actionPerformed();
1424    }
1425    });
1426   
1427  452 JMenuItem associatedData = new JMenuItem(
1428    MessageManager.getString("label.load_features_annotations"));
1429  452 associatedData.addActionListener(new ActionListener()
1430    {
 
1431  0 toggle @Override
1432    public void actionPerformed(ActionEvent e)
1433    {
1434  0 associatedData_actionPerformed(e);
1435    }
1436    });
1437  452 loadVcf = new JMenuItem(
1438    MessageManager.getString("label.load_vcf_file"));
1439  452 loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
1440  452 loadVcf.addActionListener(new ActionListener()
1441    {
 
1442  0 toggle @Override
1443    public void actionPerformed(ActionEvent e)
1444    {
1445  0 loadVcf_actionPerformed();
1446    }
1447    });
1448  452 autoCalculate.setText(
1449    MessageManager.getString("label.autocalculate_consensus"));
1450  452 autoCalculate.setState(Cache.getDefault("AUTO_CALC_CONSENSUS", true));
1451  452 autoCalculate.addActionListener(new ActionListener()
1452    {
 
1453  0 toggle @Override
1454    public void actionPerformed(ActionEvent e)
1455    {
1456  0 autoCalculate_actionPerformed(e);
1457    }
1458    });
1459  452 sortByTree.setText(
1460    MessageManager.getString("label.sort_alignment_new_tree"));
1461  452 sortByTree.setToolTipText("<html>" + MessageManager.getString(
1462    "label.enable_automatically_sort_alignment_when_open_new_tree"));
1463  452 sortByTree.setState(Cache.getDefault("SORT_BY_TREE", false));
1464  452 sortByTree.addActionListener(new ActionListener()
1465    {
 
1466  0 toggle @Override
1467    public void actionPerformed(ActionEvent e)
1468    {
1469  0 sortByTreeOption_actionPerformed(e);
1470    }
1471    });
1472   
1473  452 listenToViewSelections.setText(
1474    MessageManager.getString("label.listen_for_selections"));
1475  452 listenToViewSelections
1476    .setToolTipText("<html>" + MessageManager.getString(
1477    "label.selections_mirror_selections_made_same_sequences_other_views"));
1478  452 listenToViewSelections.setState(false);
1479  452 listenToViewSelections.addActionListener(new ActionListener()
1480    {
 
1481  0 toggle @Override
1482    public void actionPerformed(ActionEvent e)
1483    {
1484  0 listenToViewSelections_actionPerformed(e);
1485    }
1486    });
1487   
1488  452 JMenu addSequenceMenu = new JMenu(
1489    MessageManager.getString("label.add_sequences"));
1490  452 JMenuItem addFromFile = new JMenuItem(
1491    MessageManager.getString("label.from_file"));
1492  452 addFromFile.addActionListener(new ActionListener()
1493    {
 
1494  0 toggle @Override
1495    public void actionPerformed(ActionEvent e)
1496    {
1497  0 addFromFile_actionPerformed(e);
1498    }
1499    });
1500  452 JMenuItem addFromText = new JMenuItem(
1501    MessageManager.getString("label.from_textbox"));
1502  452 addFromText.addActionListener(new ActionListener()
1503    {
 
1504  0 toggle @Override
1505    public void actionPerformed(ActionEvent e)
1506    {
1507  0 addFromText_actionPerformed(e);
1508    }
1509    });
1510  452 JMenuItem addFromURL = new JMenuItem(
1511    MessageManager.getString("label.from_url"));
1512  452 addFromURL.addActionListener(new ActionListener()
1513    {
 
1514  0 toggle @Override
1515    public void actionPerformed(ActionEvent e)
1516    {
1517  0 addFromURL_actionPerformed(e);
1518    }
1519    });
1520  452 JMenuItem exportFeatures = new JMenuItem(
1521    MessageManager.getString("label.export_features"));
1522  452 exportFeatures.addActionListener(new ActionListener()
1523    {
 
1524  0 toggle @Override
1525    public void actionPerformed(ActionEvent e)
1526    {
1527  0 exportFeatures_actionPerformed(e);
1528    }
1529    });
1530  452 JMenuItem exportAnnotations = new JMenuItem(
1531    MessageManager.getString("label.export_annotations"));
1532  452 exportAnnotations.addActionListener(new ActionListener()
1533    {
 
1534  0 toggle @Override
1535    public void actionPerformed(ActionEvent e)
1536    {
1537  0 exportAnnotations_actionPerformed(e);
1538    }
1539    });
1540  452 statusPanel.setLayout(new GridLayout());
1541  452 JMenuItem showAllSeqs = new JMenuItem(
1542    MessageManager.getString("label.all_sequences"));
1543  452 showAllSeqs.setToolTipText(
1544    MessageManager.getString("label.toggle_sequence_visibility"));
1545  452 showAllSeqs.addActionListener(new ActionListener()
1546    {
 
1547  0 toggle @Override
1548    public void actionPerformed(ActionEvent e)
1549    {
1550  0 showAllSeqs_actionPerformed(e);
1551    }
1552    });
1553  452 JMenuItem showAllColumns = new JMenuItem(
1554    MessageManager.getString("label.all_columns"));
1555  452 showAllColumns.setToolTipText(
1556    MessageManager.getString("label.toggle_columns_visibility"));
1557  452 showAllColumns.addActionListener(new ActionListener()
1558    {
 
1559  0 toggle @Override
1560    public void actionPerformed(ActionEvent e)
1561    {
1562  0 showAllColumns_actionPerformed(e);
1563    }
1564    });
1565  452 JMenu hideMenu = new JMenu(MessageManager.getString("action.hide"));
1566  452 JMenuItem hideSelSequences = new JMenuItem(
1567    MessageManager.getString("label.selected_sequences"));
1568  452 hideSelSequences.setToolTipText(
1569    MessageManager.getString("label.toggle_sequence_visibility"));
1570  452 hideSelSequences.addActionListener(new ActionListener()
1571    {
 
1572  0 toggle @Override
1573    public void actionPerformed(ActionEvent e)
1574    {
1575  0 hideSelSequences_actionPerformed(e);
1576    }
1577    });
1578  452 JMenuItem hideSelColumns = new JMenuItem(
1579    MessageManager.getString("label.selected_columns"));
1580  452 hideSelColumns.setToolTipText(
1581    MessageManager.getString("label.toggle_columns_visibility"));
1582  452 hideSelColumns.addActionListener(new ActionListener()
1583    {
 
1584  0 toggle @Override
1585    public void actionPerformed(ActionEvent e)
1586    {
1587  0 hideSelColumns_actionPerformed(e);
1588    }
1589    });
1590  452 JMenuItem hideAllSelection = new JMenuItem(
1591    MessageManager.getString("label.selected_region"));
1592  452 hideAllSelection.addActionListener(new ActionListener()
1593    {
 
1594  0 toggle @Override
1595    public void actionPerformed(ActionEvent e)
1596    {
1597  0 hideAllSelection_actionPerformed(e);
1598    }
1599    });
1600    // TODO: should be hidden if no selection exists.
1601  452 JMenuItem hideAllButSelection = new JMenuItem(
1602    MessageManager.getString("label.all_but_selected_region"));
1603  452 hideAllButSelection.addActionListener(new ActionListener()
1604    {
 
1605  0 toggle @Override
1606    public void actionPerformed(ActionEvent e)
1607    {
1608  0 hideAllButSelection_actionPerformed(e);
1609    }
1610    });
1611  452 JMenuItem showAllhidden = new JMenuItem(
1612    MessageManager.getString("label.all_sequences_columns"));
1613  452 showAllhidden.setToolTipText(MessageManager
1614    .getString("label.toggles_visibility_hidden_selected_regions"));
1615  452 showAllhidden.addActionListener(new ActionListener()
1616    {
 
1617  0 toggle @Override
1618    public void actionPerformed(ActionEvent e)
1619    {
1620  0 showAllhidden_actionPerformed(e);
1621    }
1622    });
1623  452 hiddenMarkers.setText(
1624    MessageManager.getString("action.show_hidden_markers"));
1625  452 hiddenMarkers.addActionListener(new ActionListener()
1626    {
 
1627  0 toggle @Override
1628    public void actionPerformed(ActionEvent e)
1629    {
1630  0 hiddenMarkers_actionPerformed(e);
1631    }
1632    });
1633   
1634  452 JMenuItem invertColSel = new JMenuItem(
1635    MessageManager.getString("action.invert_column_selection"));
1636  452 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
1637    jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1638    | jalview.util.ShortcutKeyMaskExWrapper.ALT_DOWN_MASK,
1639    false);
1640  452 al = new ActionListener()
1641    {
 
1642  0 toggle @Override
1643    public void actionPerformed(ActionEvent e)
1644    {
1645  0 invertColSel_actionPerformed(e);
1646    }
1647    };
1648  452 addMenuActionAndAccelerator(keyStroke, invertColSel, al);
1649   
1650  452 showComplementMenuItem.setVisible(false);
1651  452 showComplementMenuItem.addActionListener(new ActionListener()
1652    {
 
1653  0 toggle @Override
1654    public void actionPerformed(ActionEvent e)
1655    {
1656  0 showComplement_actionPerformed(showComplementMenuItem.getState());
1657    }
1658    });
1659   
1660  452 tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
1661    {
 
1662  157 toggle @Override
1663    public void stateChanged(ChangeEvent evt)
1664    {
1665  157 JTabbedPane pane = (JTabbedPane) evt.getSource();
1666  157 int sel = pane.getSelectedIndex();
1667  157 tabSelectionChanged(sel);
1668    }
1669    });
1670  452 tabbedPane.addMouseListener(new MouseAdapter()
1671    {
 
1672  0 toggle @Override
1673    public void mousePressed(MouseEvent e)
1674    {
1675  0 if (e.isPopupTrigger()) // Mac
1676    {
1677  0 tabbedPane_mousePressed(e);
1678    }
1679    }
1680   
 
1681  0 toggle @Override
1682    public void mouseReleased(MouseEvent e)
1683    {
1684  0 if (e.isPopupTrigger()) // Windows
1685    {
1686  0 tabbedPane_mousePressed(e);
1687    }
1688    }
1689    });
1690  452 tabbedPane.addFocusListener(new FocusAdapter()
1691    {
 
1692  62 toggle @Override
1693    public void focusGained(FocusEvent e)
1694    {
1695  62 tabbedPane_focusGained(e);
1696    }
1697    });
1698   
1699  452 JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
1700  452 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
1701    jalview.util.ShortcutKeyMaskExWrapper
1702    .getMenuShortcutKeyMaskEx(),
1703    false);
1704  452 al = new ActionListener()
1705    {
 
1706  0 toggle @Override
1707    public void actionPerformed(ActionEvent e)
1708    {
1709  0 save_actionPerformed(e);
1710    }
1711    };
1712  452 addMenuActionAndAccelerator(keyStroke, save, al);
1713   
1714  452 reload.setEnabled(false);
1715  452 reload.setText(MessageManager.getString("action.reload"));
1716  452 reload.addActionListener(new ActionListener()
1717    {
 
1718  0 toggle @Override
1719    public void actionPerformed(ActionEvent e)
1720    {
1721  0 reload_actionPerformed(e);
1722    }
1723    });
1724   
1725  452 JMenuItem newView = new JMenuItem(
1726    MessageManager.getString("action.new_view"));
1727  452 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
1728    jalview.util.ShortcutKeyMaskExWrapper
1729    .getMenuShortcutKeyMaskEx(),
1730    false);
1731  452 al = new ActionListener()
1732    {
 
1733  0 toggle @Override
1734    public void actionPerformed(ActionEvent e)
1735    {
1736  0 newView_actionPerformed(e);
1737    }
1738    };
1739  452 addMenuActionAndAccelerator(keyStroke, newView, al);
1740   
1741  452 tabbedPane.setToolTipText("<html><i>"
1742    + MessageManager.getString("label.rename_tab_eXpand_reGroup")
1743    + "</i></html>");
1744   
1745  452 formatMenu.setText(MessageManager.getString("action.format"));
1746  452 JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
1747   
1748  452 idRightAlign.setText(
1749    MessageManager.getString("label.right_align_sequence_id"));
1750  452 idRightAlign.addActionListener(new ActionListener()
1751    {
 
1752  0 toggle @Override
1753    public void actionPerformed(ActionEvent e)
1754    {
1755  0 idRightAlign_actionPerformed(e);
1756    }
1757    });
1758   
1759  452 gatherViews.setEnabled(false);
1760  452 gatherViews.setText(MessageManager.getString("action.gather_views"));
1761  452 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, 0, false);
1762  452 al = new ActionListener()
1763    {
 
1764  0 toggle @Override
1765    public void actionPerformed(ActionEvent e)
1766    {
1767  0 gatherViews_actionPerformed(e);
1768    }
1769    };
1770  452 addMenuActionAndAccelerator(keyStroke, gatherViews, al);
1771   
1772  452 expandViews.setEnabled(false);
1773  452 expandViews.setText(MessageManager.getString("action.expand_views"));
1774  452 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X, 0, false);
1775  452 al = new ActionListener()
1776    {
 
1777  0 toggle @Override
1778    public void actionPerformed(ActionEvent e)
1779    {
1780  0 expandViews_actionPerformed(e);
1781    }
1782    };
1783  452 addMenuActionAndAccelerator(keyStroke, expandViews, al);
1784   
1785  452 JMenuItem pageSetup = new JMenuItem(
1786    MessageManager.getString("action.page_setup"));
1787  452 pageSetup.addActionListener(new ActionListener()
1788    {
 
1789  0 toggle @Override
1790    public void actionPerformed(ActionEvent e)
1791    {
1792  0 pageSetup_actionPerformed(e);
1793    }
1794    });
1795  452 JMenuItem alignmentProperties = new JMenuItem(
1796    MessageManager.getString("label.alignment_props"));
1797  452 alignmentProperties.addActionListener(new ActionListener()
1798    {
 
1799  0 toggle @Override
1800    public void actionPerformed(ActionEvent actionEvent)
1801    {
1802  0 alignmentProperties();
1803    }
1804    });
1805  452 JMenuItem selectHighlighted = new JMenuItem(
1806    MessageManager.getString("action.select_highlighted_columns"));
1807  452 selectHighlighted.setToolTipText(
1808    MessageManager.getString("tooltip.select_highlighted_columns"));
1809  452 al = new ActionListener()
1810    {
 
1811  0 toggle @Override
1812    public void actionPerformed(ActionEvent actionEvent)
1813    {
1814  0 selectHighlightedColumns_actionPerformed(actionEvent);
1815    }
1816    };
1817  452 selectHighlighted.addActionListener(al);
1818   
1819  452 copyHighlighted = new JMenuItem(
1820    MessageManager.getString("action.copy_highlighted_regions"));
1821  452 keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
1822    jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx()
1823    + jalview.util.ShortcutKeyMaskExWrapper.SHIFT_DOWN_MASK,
1824    false);
1825  452 copyHighlighted.setToolTipText(
1826    MessageManager.getString("tooltip.copy_highlighted_regions"));
1827  452 al = new ActionListener()
1828    {
 
1829  0 toggle @Override
1830    public void actionPerformed(ActionEvent actionEvent)
1831    {
1832  0 copyHighlightedColumns_actionPerformed(actionEvent);
1833    }
1834    };
1835  452 addMenuActionAndAccelerator(keyStroke, copyHighlighted, al);
1836  452 copyHighlighted.addActionListener(al);
1837   
1838  452 ButtonGroup ssButtonGroup = new ButtonGroup();
1839   
1840  452 JMenu tooltipSettingsMenu = new JMenu(
1841    MessageManager.getString("label.sequence_id_tooltip"));
1842  452 JMenu autoAnnMenu = new JMenu(
1843    MessageManager.getString("label.autocalculated_annotation"));
1844   
1845  452 JMenu showSS = new JMenu(
1846    MessageManager.getString("label.show_secondary_structure"));
1847   
1848  452 JRadioButtonMenuItem radioButtonAllSS = new JRadioButtonMenuItem(
1849    MessageManager.getString("option.ss_providers_all"));
1850  452 radioButtonAllSS.addActionListener(new ActionListener()
1851    {
 
1852  0 toggle @Override
1853    public void actionPerformed(ActionEvent e)
1854    {
1855  0 showOrHideSecondaryStructureForSource(
1856    MessageManager.getString("option.ss_providers_all"), true);
1857    // Select all checkboxes if "All" is selected
1858  0 Component[] components = showSS.getMenuComponents();
1859  0 for (Component component : components)
1860    {
1861  0 if (component instanceof JCheckBoxMenuItem)
1862    {
1863  0 ((JCheckBoxMenuItem) component).setSelected(true);
1864    }
1865    }
1866    }
1867    });
1868  452 ssButtonGroup.add(radioButtonAllSS);
1869  452 showSS.add(radioButtonAllSS);
1870   
1871  452 JRadioButtonMenuItem radioButtonNoneSS = new JRadioButtonMenuItem(
1872    MessageManager.getString("option.ss_providers_none"));
1873  452 radioButtonNoneSS.addActionListener(new ActionListener()
1874    {
 
1875  0 toggle @Override
1876    public void actionPerformed(ActionEvent e)
1877    {
1878  0 showOrHideSecondaryStructureForSource(
1879    MessageManager.getString("option.ss_providers_none"),
1880    false);
1881    // Remove selection of all checkboxes if "None" is selected
1882  0 Component[] components = showSS.getMenuComponents();
1883  0 for (Component component : components)
1884    {
1885  0 if (component instanceof JCheckBoxMenuItem)
1886    {
1887  0 ((JCheckBoxMenuItem) component).setSelected(false);
1888    }
1889    }
1890    }
1891    });
1892  452 ssButtonGroup.add(radioButtonNoneSS);
1893  452 showSS.add(radioButtonNoneSS);
1894  452 showSS.addSeparator();
1895   
1896  452 annotationsMenu.addMouseListener(new MouseAdapter()
1897    {
1898   
 
1899  0 toggle @Override
1900    public void mouseEntered(MouseEvent e)
1901    {
1902   
1903  0 updateShowSecondaryStructureMenu(showSS, ssButtonGroup); // Update radio
1904    // buttons
1905    // every time
1906    // the menu is
1907    // clicked
1908   
1909    }
1910    });
1911   
1912  452 JMenu exportImageMenu = new JMenu(
1913    MessageManager.getString("label.export_image"));
1914  452 JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
1915  452 alignFrameMenuBar.add(fileMenu);
1916  452 alignFrameMenuBar.add(editMenu);
1917  452 alignFrameMenuBar.add(selectMenu);
1918  452 alignFrameMenuBar.add(viewMenu);
1919  452 alignFrameMenuBar.add(annotationsMenu);
1920  452 alignFrameMenuBar.add(formatMenu);
1921  452 alignFrameMenuBar.add(colourMenu);
1922  452 alignFrameMenuBar.add(calculateMenu);
1923  452 if (!Platform.isJS())
1924    {
1925  452 alignFrameMenuBar.add(webService);
1926    }
1927   
1928  452 fileMenu.add(fetchSequence);
1929  452 fileMenu.add(addSequenceMenu);
1930  452 fileMenu.add(reload);
1931  452 fileMenu.addSeparator();
1932  452 fileMenu.add(vamsasStore);
1933  452 fileMenu.add(save);
1934  452 fileMenu.add(saveAs);
1935  452 fileMenu.add(outputTextboxMenu);
1936  452 fileMenu.add(pageSetup);
1937  452 fileMenu.add(printMenuItem);
1938  452 fileMenu.addSeparator();
1939  452 fileMenu.add(exportImageMenu);
1940  452 fileMenu.add(exportFeatures);
1941  452 fileMenu.add(exportAnnotations);
1942  452 fileMenu.add(loadTreeMenuItem);
1943  452 fileMenu.add(associatedData);
1944  452 if (!Platform.isJS())
1945    {
1946  452 fileMenu.add(loadVcf);
1947    }
1948  452 fileMenu.addSeparator();
1949  452 fileMenu.add(closeMenuItem);
1950   
1951  452 pasteMenu.add(pasteNew);
1952  452 pasteMenu.add(pasteThis);
1953  452 editMenu.add(undoMenuItem);
1954  452 editMenu.add(redoMenuItem);
1955  452 editMenu.add(cut);
1956  452 editMenu.add(copy);
1957  452 editMenu.add(copyHighlighted);
1958  452 editMenu.add(pasteMenu);
1959  452 editMenu.add(delete);
1960  452 editMenu.addSeparator();
1961  452 editMenu.add(remove2LeftMenuItem);
1962  452 editMenu.add(remove2RightMenuItem);
1963  452 editMenu.add(removeGappedColumnMenuItem);
1964  452 editMenu.add(removeAllGapsMenuItem);
1965  452 editMenu.add(removeRedundancyMenuItem);
1966  452 editMenu.addSeparator();
1967   
1968  452 editMenu.add(justifyLeftMenuItem);
1969  452 editMenu.add(justifyRightMenuItem);
1970   
1971  452 editMenu.addSeparator();
1972  452 editMenu.add(padGapsMenuitem);
1973   
1974  452 showMenu.add(showAllColumns);
1975  452 showMenu.add(showAllSeqs);
1976  452 showMenu.add(showAllhidden);
1977  452 hideMenu.add(hideSelColumns);
1978  452 hideMenu.add(hideSelSequences);
1979  452 hideMenu.add(hideAllSelection);
1980  452 hideMenu.add(hideAllButSelection);
1981  452 viewMenu.add(newView);
1982  452 viewMenu.add(expandViews);
1983  452 viewMenu.add(gatherViews);
1984  452 viewMenu.addSeparator();
1985  452 viewMenu.add(showMenu);
1986  452 viewMenu.add(hideMenu);
1987  452 viewMenu.add(showComplementMenuItem);
1988  452 viewMenu.addSeparator();
1989  452 viewMenu.add(followHighlightMenuItem);
1990  452 viewMenu.addSeparator();
1991  452 viewMenu.add(showSeqFeatures);
1992    // viewMenu.add(showSeqFeaturesHeight);
1993  452 viewMenu.add(openFeatureSettings);
1994  452 tooltipSettingsMenu.add(showDbRefsMenuitem);
1995  452 tooltipSettingsMenu.add(showNpFeatsMenuitem);
1996  452 viewMenu.add(tooltipSettingsMenu);
1997  452 viewMenu.addSeparator();
1998  452 viewMenu.add(alignmentProperties);
1999  452 viewMenu.addSeparator();
2000  452 viewMenu.add(overviewMenuItem);
2001   
2002  452 annotationsMenu.add(annotationPanelMenuItem);
2003  452 annotationsMenu.addSeparator();
2004  452 annotationsMenu.add(showAllAlAnnotations);
2005  452 annotationsMenu.add(hideAllAlAnnotations);
2006  452 annotationsMenu.addSeparator();
2007  452 annotationsMenu.add(showAllSeqAnnotations);
2008  452 annotationsMenu.add(hideAllSeqAnnotations);
2009  452 annotationsMenu.add(sortAnnBySequence);
2010  452 annotationsMenu.add(sortAnnByLabel);
2011  452 annotationsMenu.addSeparator();
2012  452 annotationsMenu.add(showSS);
2013  452 annotationsMenu.add(showStrucProvider);
2014  452 annotationsMenu.addSeparator();
2015  452 autoAnnMenu.add(showAutoFirst);
2016  452 autoAnnMenu.add(showAutoLast);
2017  452 autoAnnMenu.addSeparator();
2018  452 autoAnnMenu.add(applyAutoAnnotationSettings);
2019  452 autoAnnMenu.add(showConsensusHistogram);
2020  452 autoAnnMenu.add(showSequenceLogo);
2021  452 autoAnnMenu.add(normaliseSequenceLogo);
2022    // autoAnnMenu.add(showSSConsensus);
2023  452 autoAnnMenu.addSeparator();
2024  452 autoAnnMenu.add(showGroupConservation);
2025  452 autoAnnMenu.add(showGroupConsensus);
2026  452 autoAnnMenu.add(showGroupSSConsensus);
2027  452 annotationsMenu.add(autoAnnMenu);
2028   
2029  452 sort.add(sortIDMenuItem);
2030  452 sort.add(sortLengthMenuItem);
2031  452 sort.add(sortGroupMenuItem);
2032  452 sort.add(sortPairwiseMenuItem);
2033  452 sort.add(sortByTreeMenu);
2034  452 calculateMenu.add(sort);
2035  452 calculateMenu.add(calculateTree);
2036  452 calculateMenu.addSeparator();
2037  452 calculateMenu.add(pairwiseAlignmentMenuItem);
2038  452 calculateMenu.addSeparator();
2039  452 calculateMenu.add(showTranslation);
2040  452 calculateMenu.add(showReverse);
2041  452 calculateMenu.add(showReverseComplement);
2042  452 calculateMenu.add(showProducts);
2043  452 calculateMenu.add(autoCalculate);
2044  452 calculateMenu.add(sortByTree);
2045  452 calculateMenu.addSeparator();
2046  452 calculateMenu.add(expandAlignment);
2047  452 calculateMenu.add(extractScores);
2048  452 if (!Platform.isJS())
2049    {
2050  452 calculateMenu.addSeparator();
2051  452 calculateMenu.add(runGroovy);
2052    }
2053   
2054  452 webServiceNoServices = new JMenuItem(
2055    MessageManager.getString("label.no_services"));
2056  452 webService.add(webServiceNoServices);
2057  452 if (!Platform.isJS())
2058    {
2059  452 exportImageMenu.add(htmlMenuItem);
2060    }
2061  452 exportImageMenu.add(epsFile);
2062  452 exportImageMenu.add(createPNG);
2063  452 if (!Platform.isJS())
2064    {
2065  452 exportImageMenu.add(createBioJS);
2066  452 exportImageMenu.add(createSVG);
2067    }
2068  452 addSequenceMenu.add(addFromFile);
2069  452 addSequenceMenu.add(addFromText);
2070  452 addSequenceMenu.add(addFromURL);
2071  452 this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
2072  452 statusPanel.add(statusBar, null);
2073  452 this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
2074   
2075  452 formatMenu.add(font);
2076  452 formatMenu.addSeparator();
2077  452 formatMenu.add(wrapMenuItem);
2078  452 formatMenu.add(scaleAbove);
2079  452 formatMenu.add(scaleLeft);
2080  452 formatMenu.add(scaleRight);
2081  452 formatMenu.add(seqLimits);
2082  452 formatMenu.add(idRightAlign);
2083  452 formatMenu.add(hiddenMarkers);
2084  452 formatMenu.add(viewBoxesMenuItem);
2085  452 formatMenu.add(viewTextMenuItem);
2086  452 formatMenu.add(colourTextMenuItem);
2087  452 formatMenu.add(renderGapsMenuItem);
2088  452 formatMenu.add(centreColumnLabelsMenuItem);
2089  452 formatMenu.add(showNonconservedMenuItem);
2090  452 selectMenu.add(findMenuItem);
2091  452 selectMenu.addSeparator();
2092  452 selectMenu.add(selectAllSequenceMenuItem);
2093  452 selectMenu.add(deselectAllSequenceMenuItem);
2094  452 selectMenu.add(invertSequenceMenuItem);
2095  452 selectMenu.add(invertColSel);
2096  452 selectMenu.add(createGroup);
2097  452 selectMenu.add(unGroup);
2098  452 selectMenu.add(grpsFromSelection);
2099  452 selectMenu.add(deleteGroups);
2100  452 selectMenu.add(annotationColumn);
2101  452 selectMenu.add(selectHighlighted);
2102    // TODO - determine if the listenToViewSelections button is needed : see bug
2103    // JAL-574
2104    // selectMenu.addSeparator();
2105    // selectMenu.add(listenToViewSelections);
2106    }
2107   
 
2108  0 toggle protected void showStructureProvider_actionPerformed(ActionEvent e)
2109    {
2110    // TODO Auto-generated method stub
2111   
2112    }
2113   
 
2114  0 toggle protected void showSSConsensus_actionPerformed(ActionEvent e)
2115    {
2116    // TODO Auto-generated method stub
2117   
2118    }
2119   
 
2120  0 toggle protected void createPNG_actionPerformed(ActionEvent object)
2121    {
2122    // TODO Auto-generated method stub
2123   
2124    }
2125   
 
2126  0 toggle protected void createEPS_actionPerformed(ActionEvent object)
2127    {
2128    // TODO Auto-generated method stub
2129   
2130    }
2131   
 
2132  0 toggle protected void createSVG_actionPerformed(ActionEvent object)
2133    {
2134    // TODO Auto-generated method stub
2135   
2136    }
2137   
 
2138  0 toggle protected void copyHighlightedColumns_actionPerformed(
2139    ActionEvent actionEvent)
2140    {
2141   
2142    }
2143   
 
2144  0 toggle protected void loadVcf_actionPerformed()
2145    {
2146    }
2147   
2148    /**
2149    * Constructs the entries on the Colour menu (but does not add them to the
2150    * menu).
2151    */
 
2152  454 toggle protected void initColourMenu()
2153    {
2154  454 applyToAllGroups = new JCheckBoxMenuItem(
2155    MessageManager.getString("label.apply_colour_to_all_groups"));
2156  454 applyToAllGroups.addActionListener(new ActionListener()
2157    {
 
2158  0 toggle @Override
2159    public void actionPerformed(ActionEvent e)
2160    {
2161  0 applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
2162    }
2163    });
2164   
2165  454 textColour = new JMenuItem(
2166    MessageManager.getString("label.text_colour"));
2167  454 textColour.addActionListener(new ActionListener()
2168    {
 
2169  0 toggle @Override
2170    public void actionPerformed(ActionEvent e)
2171    {
2172  0 textColour_actionPerformed();
2173    }
2174    });
2175   
2176  454 conservationMenuItem = new JCheckBoxMenuItem(
2177    MessageManager.getString("action.by_conservation"));
2178  454 conservationMenuItem.addActionListener(new ActionListener()
2179    {
 
2180  0 toggle @Override
2181    public void actionPerformed(ActionEvent e)
2182    {
2183  0 conservationMenuItem_actionPerformed(
2184    conservationMenuItem.isSelected());
2185    }
2186    });
2187   
2188  454 byConsensusSecondaryStructureMenuItem = new JCheckBoxMenuItem(
2189    MessageManager.getString(
2190    "action.by_secondary_structure_conservation"));
2191  454 byConsensusSecondaryStructureMenuItem
2192    .addActionListener(new ActionListener()
2193    {
 
2194  0 toggle @Override
2195    public void actionPerformed(ActionEvent e)
2196    {
2197  0 colourByConsensusSecondaryStructureMenuItem_actionPerformed(
2198    byConsensusSecondaryStructureMenuItem.isSelected());
2199    }
2200    });
2201   
2202  454 abovePIDThreshold = new JCheckBoxMenuItem(
2203    MessageManager.getString("label.above_identity_threshold"));
2204  454 abovePIDThreshold.addActionListener(new ActionListener()
2205    {
 
2206  0 toggle @Override
2207    public void actionPerformed(ActionEvent e)
2208    {
2209  0 abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
2210    }
2211    });
2212  454 modifyPID = new JMenuItem(
2213    MessageManager.getString("label.modify_identity_threshold"));
2214  454 modifyPID.addActionListener(new ActionListener()
2215    {
 
2216  0 toggle @Override
2217    public void actionPerformed(ActionEvent e)
2218    {
2219  0 modifyPID_actionPerformed();
2220    }
2221    });
2222  454 modifyConservation = new JMenuItem(MessageManager
2223    .getString("label.modify_conservation_threshold"));
2224  454 modifyConservation.addActionListener(new ActionListener()
2225    {
 
2226  0 toggle @Override
2227    public void actionPerformed(ActionEvent e)
2228    {
2229  0 modifyConservation_actionPerformed();
2230    }
2231    });
2232   
2233  454 modifyConsensusSecondaryStructureThreshold = new JMenuItem(
2234    MessageManager.getString(
2235    "label.modify_secondary_structure_conservation_threshold"));
2236  454 modifyConsensusSecondaryStructureThreshold
2237    .addActionListener(new ActionListener()
2238    {
 
2239  0 toggle @Override
2240    public void actionPerformed(ActionEvent e)
2241    {
2242  0 modifyConsensusSecondaryStructureThreshold_actionPerformed();
2243    }
2244    });
2245   
2246  454 annotationColour = new JRadioButtonMenuItem(
2247    MessageManager.getString("action.by_annotation"));
2248  454 annotationColour.setName(ResidueColourScheme.ANNOTATION_COLOUR);
2249  454 annotationColour.addActionListener(new ActionListener()
2250    {
 
2251  0 toggle @Override
2252    public void actionPerformed(ActionEvent e)
2253    {
2254  0 annotationColour_actionPerformed();
2255    }
2256    });
2257    }
2258   
 
2259  0 toggle protected void selectHighlightedColumns_actionPerformed(
2260    ActionEvent actionEvent)
2261    {
2262    // TODO Auto-generated method stub
2263   
2264    }
2265   
2266    /**
2267    * Generate the reverse sequence (or reverse complement if the flag is true)
2268    * and add it to the alignment
2269    *
2270    * @param complement
2271    */
 
2272  0 toggle protected void showReverse_actionPerformed(boolean complement)
2273    {
2274    }
2275   
2276    /**
2277    * Try to run script in a Groovy console, having first ensured that this
2278    * alignframe is set as currentAlignFrame in Desktop
2279    */
 
2280  0 toggle protected void runGroovy_actionPerformed()
2281    {
2282   
2283    }
2284   
2285    /**
2286    * Adds the given action listener and key accelerator to the given menu item.
2287    * Also saves in a lookup table to support lookup of action by key stroke.
2288    *
2289    * @param keyStroke
2290    * @param menuItem
2291    * @param actionListener
2292    */
 
2293  12227 toggle protected void addMenuActionAndAccelerator(KeyStroke keyStroke,
2294    JMenuItem menuItem, ActionListener actionListener)
2295    {
2296  12227 menuItem.setAccelerator(keyStroke);
2297  12227 accelerators.put(keyStroke, menuItem);
2298  12227 menuItem.addActionListener(actionListener);
2299    }
2300   
2301    /**
2302    * Action on clicking sort annotations by type.
2303    *
2304    * @param sortOrder
2305    */
 
2306  0 toggle protected void sortAnnotations_actionPerformed()
2307    {
2308    }
2309   
2310    /**
2311    * Action on clicking Show all annotations.
2312    *
2313    * @param forSequences
2314    * update sequence-related annotations
2315    * @param forAlignment
2316    * update non-sequence-related annotations
2317    */
 
2318  0 toggle protected void showAllAnnotations_actionPerformed(boolean forSequences,
2319    boolean forAlignment)
2320    {
2321  0 setAnnotationsVisibility(true, forSequences, forAlignment);
2322    }
2323   
2324    /**
2325    * Action on clicking Hide all annotations.
2326    *
2327    * @param forSequences
2328    * update sequence-related annotations
2329    * @param forAlignment
2330    * update non-sequence-related annotations
2331    */
 
2332  0 toggle protected void hideAllAnnotations_actionPerformed(boolean forSequences,
2333    boolean forAlignment)
2334    {
2335  0 setAnnotationsVisibility(false, forSequences, forAlignment);
2336    }
2337   
2338    /**
2339    * Set the visibility of annotations to true or false. Can act on
2340    * sequence-related annotations, or alignment-related, or both.
2341    *
2342    * @param visible
2343    * @param forSequences
2344    * update sequence-related annotations
2345    * @param forAlignment
2346    * update non-sequence-related annotations
2347    */
 
2348  0 toggle public void setAnnotationsVisibility(boolean visible,
2349    boolean forSequences, boolean forAlignment)
2350    {
2351   
2352    }
2353   
 
2354  0 toggle protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
2355    {
2356    // TODO Auto-generated method stub
2357   
2358    }
2359   
 
2360  0 toggle protected void listenToViewSelections_actionPerformed(ActionEvent e)
2361    {
2362    // TODO Auto-generated method stub
2363   
2364    }
2365   
 
2366  0 toggle protected void showAllhidden_actionPerformed(ActionEvent e)
2367    {
2368    // TODO Auto-generated method stub
2369   
2370    }
2371   
 
2372  0 toggle protected void hideAllButSelection_actionPerformed(ActionEvent e)
2373    {
2374    // TODO Auto-generated method stub
2375   
2376    }
2377   
 
2378  0 toggle protected void hideAllSelection_actionPerformed(ActionEvent e)
2379    {
2380    // TODO Auto-generated method stub
2381   
2382    }
2383   
 
2384  0 toggle protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
2385    {
2386    // TODO Auto-generated method stub
2387   
2388    }
2389   
 
2390  0 toggle protected void showConsensusHistogram_actionPerformed(ActionEvent e)
2391    {
2392    // TODO Auto-generated method stub
2393   
2394    }
2395   
 
2396  0 toggle protected void showSequenceLogo_actionPerformed(ActionEvent e)
2397    {
2398    // TODO Auto-generated method stub
2399   
2400    }
2401   
 
2402  0 toggle protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
2403    {
2404    // TODO Auto-generated method stub
2405   
2406    }
2407   
 
2408  0 toggle protected void showGroupConsensus_actionPerformed(ActionEvent e)
2409    {
2410    // TODO Auto-generated method stub
2411   
2412    }
2413   
 
2414  0 toggle protected void showGroupSSConsensus_actionPerformed(ActionEvent e)
2415    {
2416    // TODO Auto-generated method stub
2417   
2418    }
2419   
 
2420  0 toggle protected void showGroupConservation_actionPerformed(ActionEvent e)
2421    {
2422    // TODO Auto-generated method stub
2423   
2424    }
2425   
 
2426  0 toggle protected void showUnconservedMenuItem_actionPerformed(ActionEvent e)
2427    {
2428    // TODO Auto-generated method stub
2429   
2430    }
2431   
 
2432  0 toggle protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
2433    {
2434    // TODO Auto-generated method stub
2435   
2436    }
2437   
 
2438  0 toggle protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
2439    {
2440    // TODO Auto-generated method stub
2441   
2442    }
2443   
 
2444  0 toggle protected void followHighlight_actionPerformed()
2445    {
2446    // TODO Auto-generated method stub
2447   
2448    }
2449   
 
2450  0 toggle protected void showNpFeats_actionPerformed(ActionEvent e)
2451    {
2452    // TODO Auto-generated method stub
2453   
2454    }
2455   
 
2456  0 toggle protected void showDbRefs_actionPerformed(ActionEvent e)
2457    {
2458    // TODO Auto-generated method stub
2459   
2460    }
2461   
 
2462  0 toggle protected void centreColumnLabels_actionPerformed(ActionEvent e)
2463    {
2464    }
2465   
 
2466  0 toggle protected void buildSortByAnnotationScoresMenu()
2467    {
2468    }
2469   
 
2470  0 toggle protected void extractScores_actionPerformed(ActionEvent e)
2471    {
2472    }
2473   
 
2474  0 toggle protected void outputText_actionPerformed(String formatName)
2475    {
2476    }
2477   
 
2478  0 toggle public void addFromFile_actionPerformed(ActionEvent e)
2479    {
2480   
2481    }
2482   
 
2483  0 toggle public void addFromText_actionPerformed(ActionEvent e)
2484    {
2485   
2486    }
2487   
 
2488  0 toggle public void addFromURL_actionPerformed(ActionEvent e)
2489    {
2490   
2491    }
2492   
 
2493  0 toggle public void exportFeatures_actionPerformed(ActionEvent e)
2494    {
2495   
2496    }
2497   
 
2498  0 toggle public void exportAnnotations_actionPerformed(ActionEvent e)
2499    {
2500   
2501    }
2502   
 
2503  0 toggle protected void htmlMenuItem_actionPerformed(ActionEvent e)
2504    {
2505    }
2506   
 
2507  0 toggle protected void bioJSMenuItem_actionPerformed(ActionEvent e)
2508    {
2509   
2510    }
2511   
 
2512  0 toggle protected void closeMenuItem_actionPerformed(boolean b)
2513    {
2514    }
2515   
 
2516  0 toggle protected void redoMenuItem_actionPerformed(ActionEvent e)
2517    {
2518    }
2519   
 
2520  0 toggle protected void undoMenuItem_actionPerformed(ActionEvent e)
2521    {
2522    }
2523   
 
2524  0 toggle protected void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2525    {
2526    }
2527   
 
2528  0 toggle protected void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)
2529    {
2530    }
2531   
 
2532  0 toggle protected void invertSequenceMenuItem_actionPerformed(ActionEvent e)
2533    {
2534    }
2535   
 
2536  0 toggle protected void remove2LeftMenuItem_actionPerformed(ActionEvent e)
2537    {
2538    }
2539   
 
2540  0 toggle protected void remove2RightMenuItem_actionPerformed(ActionEvent e)
2541    {
2542    }
2543   
 
2544  0 toggle protected void removeGappedColumnMenuItem_actionPerformed(ActionEvent e)
2545    {
2546    }
2547   
 
2548  0 toggle protected void removeAllGapsMenuItem_actionPerformed(ActionEvent e)
2549    {
2550    }
2551   
 
2552  0 toggle protected void wrapMenuItem_actionPerformed(ActionEvent e)
2553    {
2554    }
2555   
 
2556  0 toggle protected void viewBoxesMenuItem_actionPerformed(ActionEvent e)
2557    {
2558    }
2559   
 
2560  0 toggle protected void viewTextMenuItem_actionPerformed(ActionEvent e)
2561    {
2562    }
2563   
 
2564  0 toggle protected void colourTextMenuItem_actionPerformed(ActionEvent e)
2565    {
2566    }
2567   
 
2568  0 toggle protected void annotationPanelMenuItem_actionPerformed(ActionEvent e)
2569    {
2570    }
2571   
 
2572  0 toggle protected void overviewMenuItem_actionPerformed(ActionEvent e)
2573    {
2574    }
2575   
 
2576  0 toggle protected void sortPairwiseMenuItem_actionPerformed(ActionEvent e)
2577    {
2578    }
2579   
 
2580  0 toggle protected void sortIDMenuItem_actionPerformed(ActionEvent e)
2581    {
2582    }
2583   
 
2584  0 toggle protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
2585    {
2586    }
2587   
 
2588  0 toggle protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
2589    {
2590    }
2591   
 
2592  0 toggle protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
2593    {
2594    }
2595   
 
2596  0 toggle protected void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
2597    {
2598    }
2599   
 
2600  0 toggle protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
2601    {
2602    }
2603   
 
2604  0 toggle protected void conservationMenuItem_actionPerformed(boolean selected)
2605    {
2606    }
2607   
 
2608  0 toggle public void colourByConsensusSecondaryStructureMenuItem_actionPerformed(
2609    boolean selected)
2610    {
2611    }
2612   
 
2613  0 toggle protected void printMenuItem_actionPerformed(ActionEvent e)
2614    {
2615    }
2616   
 
2617  0 toggle protected void renderGapsMenuItem_actionPerformed(ActionEvent e)
2618    {
2619    }
2620   
 
2621  0 toggle protected void findMenuItem_actionPerformed(ActionEvent e)
2622    {
2623    }
2624   
 
2625  0 toggle protected void abovePIDThreshold_actionPerformed(boolean selected)
2626    {
2627    }
2628   
 
2629  0 toggle public void showSeqFeatures_actionPerformed(ActionEvent actionEvent)
2630    {
2631    }
2632   
 
2633  0 toggle protected void deleteGroups_actionPerformed(ActionEvent e)
2634    {
2635    }
2636   
 
2637  0 toggle protected void createGroup_actionPerformed(ActionEvent e)
2638    {
2639    }
2640   
 
2641  0 toggle protected void unGroup_actionPerformed(ActionEvent e)
2642    {
2643    }
2644   
 
2645  0 toggle protected void copy_actionPerformed()
2646    {
2647    }
2648   
 
2649  0 toggle protected void cut_actionPerformed()
2650    {
2651    }
2652   
 
2653  0 toggle protected void delete_actionPerformed()
2654    {
2655    }
2656   
 
2657  0 toggle protected void pasteNew_actionPerformed(ActionEvent e)
2658    {
2659    }
2660   
 
2661  0 toggle protected void pasteThis_actionPerformed(ActionEvent e)
2662    {
2663    }
2664   
 
2665  0 toggle protected void applyToAllGroups_actionPerformed(boolean selected)
2666    {
2667    }
2668   
 
2669  0 toggle protected void font_actionPerformed(ActionEvent e)
2670    {
2671    }
2672   
 
2673  0 toggle protected void seqLimit_actionPerformed(ActionEvent e)
2674    {
2675    }
2676   
 
2677  0 toggle public void seqDBRef_actionPerformed(ActionEvent e)
2678    {
2679   
2680    }
2681   
 
2682  0 toggle protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
2683    {
2684   
2685    }
2686   
2687    /**
2688    * Template method to handle the 'load T-Coffee scores' menu event.
2689    * <p>
2690    * Subclasses override this method to provide a custom action.
2691    *
2692    * @param event
2693    * The raised event
2694    */
 
2695  0 toggle protected void loadScores_actionPerformed(ActionEvent event)
2696    {
2697   
2698    }
2699   
 
2700  0 toggle protected void scaleAbove_actionPerformed(ActionEvent e)
2701    {
2702    }
2703   
 
2704  0 toggle protected void scaleLeft_actionPerformed(ActionEvent e)
2705    {
2706    }
2707   
 
2708  0 toggle protected void scaleRight_actionPerformed(ActionEvent e)
2709    {
2710    }
2711   
 
2712  0 toggle protected void modifyPID_actionPerformed()
2713    {
2714    }
2715   
 
2716  0 toggle protected void modifyConservation_actionPerformed()
2717    {
2718    }
2719   
 
2720  0 toggle protected void modifyConsensusSecondaryStructureThreshold_actionPerformed()
2721    {
2722    }
2723   
 
2724  0 toggle protected void saveAs_actionPerformed()
2725    {
2726    }
2727   
 
2728  0 toggle protected void padGapsMenuitem_actionPerformed(ActionEvent e)
2729    {
2730    }
2731   
 
2732  0 toggle public void vamsasStore_actionPerformed(ActionEvent e)
2733    {
2734   
2735    }
2736   
 
2737  0 toggle public void vamsasLoad_actionPerformed(ActionEvent e)
2738    {
2739   
2740    }
2741   
 
2742  0 toggle public void showTranslation_actionPerformed(GeneticCodeI codeTable)
2743    {
2744   
2745    }
2746   
 
2747  0 toggle public void featureSettings_actionPerformed(ActionEvent e)
2748    {
2749   
2750    }
2751   
 
2752  0 toggle public void fetchSequence_actionPerformed()
2753    {
2754   
2755    }
2756   
 
2757  0 toggle public void smoothFont_actionPerformed(ActionEvent e)
2758    {
2759   
2760    }
2761   
 
2762  0 toggle public void annotationColour_actionPerformed()
2763    {
2764    }
2765   
 
2766  0 toggle public void annotationColumn_actionPerformed(ActionEvent e)
2767    {
2768    }
2769   
 
2770  0 toggle public void associatedData_actionPerformed(ActionEvent e)
2771    {
2772   
2773    }
2774   
 
2775  0 toggle public void autoCalculate_actionPerformed(ActionEvent e)
2776    {
2777   
2778    }
2779   
 
2780  0 toggle public void sortByTreeOption_actionPerformed(ActionEvent e)
2781    {
2782   
2783    }
2784   
 
2785  0 toggle public void showAllSeqs_actionPerformed(ActionEvent e)
2786    {
2787   
2788    }
2789   
 
2790  0 toggle public void showAllColumns_actionPerformed(ActionEvent e)
2791    {
2792   
2793    }
2794   
 
2795  0 toggle public void hideSelSequences_actionPerformed(ActionEvent e)
2796    {
2797   
2798    }
2799   
 
2800  0 toggle public void hideSelColumns_actionPerformed(ActionEvent e)
2801    {
2802   
2803    }
2804   
 
2805  0 toggle public void hiddenMarkers_actionPerformed(ActionEvent e)
2806    {
2807   
2808    }
2809   
 
2810  0 toggle public void findPdbId_actionPerformed(ActionEvent e)
2811    {
2812   
2813    }
2814   
 
2815  0 toggle public void enterPdbId_actionPerformed(ActionEvent e)
2816    {
2817   
2818    }
2819   
 
2820  0 toggle public void pdbFile_actionPerformed(ActionEvent e)
2821    {
2822   
2823    }
2824   
 
2825  0 toggle public void invertColSel_actionPerformed(ActionEvent e)
2826    {
2827   
2828    }
2829   
 
2830  0 toggle public void tabSelectionChanged(int sel)
2831    {
2832   
2833    }
2834   
 
2835  0 toggle public void tabbedPane_mousePressed(MouseEvent e)
2836    {
2837   
2838    }
2839   
 
2840  62 toggle public void tabbedPane_focusGained(FocusEvent e)
2841    {
2842  62 requestFocus();
2843    }
2844   
 
2845  0 toggle public void save_actionPerformed(ActionEvent e)
2846    {
2847   
2848    }
2849   
 
2850  0 toggle public void reload_actionPerformed(ActionEvent e)
2851    {
2852   
2853    }
2854   
 
2855  0 toggle public void newView_actionPerformed(ActionEvent e)
2856    {
2857   
2858    }
2859   
 
2860  0 toggle public void textColour_actionPerformed()
2861    {
2862   
2863    }
2864   
 
2865  0 toggle public void idRightAlign_actionPerformed(ActionEvent e)
2866    {
2867   
2868    }
2869   
 
2870  0 toggle public void expandViews_actionPerformed(ActionEvent e)
2871    {
2872   
2873    }
2874   
 
2875  0 toggle public void gatherViews_actionPerformed(ActionEvent e)
2876    {
2877   
2878    }
2879   
 
2880  0 toggle public void buildTreeSortMenu()
2881    {
2882   
2883    }
2884   
 
2885  0 toggle public void pageSetup_actionPerformed(ActionEvent e)
2886    {
2887   
2888    }
2889   
 
2890  0 toggle public void alignmentProperties()
2891    {
2892   
2893    }
2894   
 
2895  0 toggle protected void expand_newalign(ActionEvent e)
2896    {
2897    // TODO Auto-generated method stub
2898   
2899    }
2900   
 
2901  452 toggle protected boolean isShowAutoCalculatedAbove()
2902    {
2903  452 return showAutoCalculatedAbove;
2904    }
2905   
 
2906  452 toggle protected void setShowAutoCalculatedAbove(boolean showAutoCalculatedAbove)
2907    {
2908  452 this.showAutoCalculatedAbove = showAutoCalculatedAbove;
2909    }
2910   
 
2911  0 toggle protected SequenceAnnotationOrder getAnnotationSortOrder()
2912    {
2913  0 return annotationSortOrder;
2914    }
2915   
 
2916  0 toggle protected void setAnnotationSortOrder(
2917    SequenceAnnotationOrder annotationSortOrder)
2918    {
2919  0 this.annotationSortOrder = annotationSortOrder;
2920    }
2921   
 
2922  33 toggle public Map<KeyStroke, JMenuItem> getAccelerators()
2923    {
2924  33 return this.accelerators;
2925    }
2926   
2927    /**
2928    * Returns the selected index of the tabbed pane, or -1 if none selected
2929    * (including the case where the tabbed pane has not been made visible).
2930    *
2931    * @return
2932    */
 
2933  0 toggle public int getTabIndex()
2934    {
2935  0 return tabbedPane.getSelectedIndex();
2936    }
2937   
 
2938  0 toggle public JPanel getStatusPanel()
2939    {
2940  0 return statusPanel;
2941    }
2942   
2943    /**
2944    * Sets a reference to the containing split frame. Also makes the 'toggle
2945    * split view' menu item visible and checked.
2946    *
2947    * @param sf
2948    */
 
2949  6 toggle public void setSplitFrame(SplitContainerI sf)
2950    {
2951  6 this.splitFrame = sf;
2952  6 if (sf != null)
2953    {
2954  6 this.showComplementMenuItem.setVisible(true);
2955  6 this.showComplementMenuItem.setState(true);
2956    }
2957    }
2958   
 
2959  3 toggle public SplitContainerI getSplitViewContainer()
2960    {
2961  3 return this.splitFrame;
2962    }
2963   
 
2964  0 toggle protected void showComplement_actionPerformed(boolean complement)
2965    {
2966    }
2967   
 
2968  0 toggle protected List<String> updateShowSSRadioButtons()
2969    {
2970    // TODO Auto-generated method stub
2971  0 return null;
2972    }
2973   
 
2974  0 toggle protected void showOrHideSecondaryStructureForSource(
2975    String ssSourceSelection, boolean visible)
2976    {
2977    // TODO Auto-generated method stub
2978   
2979    }
2980   
 
2981  0 toggle protected void updateShowSecondaryStructureMenu(JMenu showSS,
2982    ButtonGroup ssButtonGroup)
2983    {
2984    // TODO Auto-generated method stub
2985   
2986    }
2987    }