Clover icon

Coverage Report

  1. Project Clover database Thu Nov 28 2024 18:06:40 GMT
  2. Package jalview.jbgui

File GAlignFrame.java

 

Coverage histogram

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

Code metrics

24
763
278
1
2,934
2,361
291
0.38
2.74
278
1.05

Classes

Class Line # Actions
GAlignFrame 66 763 291
0.5981220659.8%
 

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