Clover icon

Coverage Report

  1. Project Clover database Mon Nov 18 2024 09:38:20 GMT
  2. Package jalview.jbgui

File GAlignFrame.java

 

Coverage histogram

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

Code metrics

28
776
283
1
3,006
2,419
298
0.38
2.74
283
1.05

Classes

Class Line # Actions
GAlignFrame 67 776 298
0.5860165458.6%
 

Contributing tests

This file is covered by 86 tests. .

Source view

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