X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGAlignFrame.java;h=16e78f546ed8babed9b14fa2452476c9b44215c8;hb=47168f025aefdaa044802bd5f8f510ffe43a4808;hp=9260b231b758c73c82b27989efa63aed7019e440;hpb=8a6fa9ea9900d0f106529c3f6283e7f9d76dd2cb;p=jalview.git diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index 9260b23..16e78f5 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -1,29 +1,55 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6) - * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) + * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - * + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.jbgui; -import java.awt.*; -import java.awt.event.*; - -import javax.swing.*; -import javax.swing.event.*; - -import jalview.schemes.*; +import jalview.schemes.ColourSchemeProperty; +import jalview.util.MessageManager; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.GridLayout; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +import javax.swing.BorderFactory; +import javax.swing.ButtonGroup; +import javax.swing.JCheckBoxMenuItem; +import javax.swing.JInternalFrame; +import javax.swing.JLabel; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JRadioButtonMenuItem; +import javax.swing.JTabbedPane; +import javax.swing.SwingUtilities; +import javax.swing.event.ChangeEvent; +import javax.swing.event.MenuEvent; +import javax.swing.event.MenuListener; public class GAlignFrame extends JInternalFrame { @@ -113,6 +139,17 @@ public class GAlignFrame extends JInternalFrame protected JRadioButtonMenuItem BLOSUM62Colour = new JRadioButtonMenuItem(); + protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem(); + + protected JRadioButtonMenuItem purinePyrimidineColour = new JRadioButtonMenuItem(); + + protected JRadioButtonMenuItem RNAInteractionColour = new JRadioButtonMenuItem(); + + // protected JRadioButtonMenuItem covariationColour = new + // JRadioButtonMenuItem(); + + protected JRadioButtonMenuItem tcoffeeColour = new JRadioButtonMenuItem(); + JMenuItem njTreeBlosumMenuItem = new JMenuItem(); JMenuItem avDistanceTreeBlosumMenuItem = new JMenuItem(); @@ -149,9 +186,10 @@ public class GAlignFrame extends JInternalFrame public JCheckBoxMenuItem showSeqFeaturesHeight = new JCheckBoxMenuItem(); - protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem(); - JMenuItem deleteGroups = new JMenuItem(); + + JMenuItem createGroup = new JMenuItem(); + JMenuItem unGroup = new JMenuItem(); JMenuItem delete = new JMenuItem(); @@ -208,19 +246,27 @@ public class GAlignFrame extends JInternalFrame protected JMenuItem showTranslation = new JMenuItem(); protected JMenuItem extractScores = new JMenuItem(); + + protected JMenuItem expandAlignment = new JMenuItem(); protected JMenu showProducts = new JMenu(); - public JMenuItem featureSettings = new JMenuItem(); + public JMenuItem openFeatureSettings = new JMenuItem(); JMenuItem fetchSequence = new JMenuItem(); JMenuItem annotationColour = new JMenuItem(); + protected JMenuItem rnahelicesColour = new JMenuItem(); + JMenuItem associatedData = new JMenuItem(); protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem(); + protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem(); + + protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem(); + JMenu addSequenceMenu = new JMenu(); JMenuItem addFromFile = new JMenuItem(); @@ -303,6 +349,8 @@ public class GAlignFrame extends JInternalFrame protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem(); + protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem(); + protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem(); private JMenuItem grpsFromSelection = new JMenuItem(); @@ -367,8 +415,8 @@ public class GAlignFrame extends JInternalFrame int option = JOptionPane.showInternalConfirmDialog( jalview.gui.Desktop.desktop, - "Remove from default list?", - "Remove user defined colour", + MessageManager.getString("label.remove_from_default_list"), + MessageManager.getString("label.remove_user_defined_colour"), JOptionPane.YES_NO_OPTION); if (option == JOptionPane.YES_OPTION) { @@ -413,7 +461,10 @@ public class GAlignFrame extends JInternalFrame colours.add(PIDColour); colours.add(BLOSUM62Colour); colours.add(nucleotideColour); - + colours.add(purinePyrimidineColour); + // colours.add(covariationColour); + colours.add(tcoffeeColour); + colours.add(RNAInteractionColour); setColourSelected(jalview.bin.Cache .getDefault("DEFAULT_COLOUR", "None")); @@ -483,6 +534,25 @@ public class GAlignFrame extends JInternalFrame break; + case ColourSchemeProperty.TCOFFEE: + tcoffeeColour.setSelected(true); + break; + + case ColourSchemeProperty.PURINEPYRIMIDINE: + purinePyrimidineColour.setSelected(true); + + break; + + case ColourSchemeProperty.RNAINTERACTION: + RNAInteractionColour.setSelected(true); + + break; + /* + * case ColourSchemeProperty.COVARIATION: + * covariationColour.setSelected(true); + * + * break; + */ case ColourSchemeProperty.USER_DEFINED: userDefinedColour.setSelected(true); @@ -499,8 +569,8 @@ public class GAlignFrame extends JInternalFrame private void jbInit() throws Exception { - fileMenu.setText("File"); - saveAs.setText("Save As..."); + fileMenu.setText(MessageManager.getString("action.file")); + saveAs.setText(MessageManager.getString("action.save_as") + "..."); saveAs.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_S, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask() @@ -512,7 +582,7 @@ public class GAlignFrame extends JInternalFrame saveAs_actionPerformed(e); } }); - closeMenuItem.setText("Close"); + closeMenuItem.setText(MessageManager.getString("action.close")); closeMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_W, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask(), false)); @@ -523,12 +593,12 @@ public class GAlignFrame extends JInternalFrame closeMenuItem_actionPerformed(false); } }); - editMenu.setText("Edit"); - viewMenu.setText("View"); - colourMenu.setText("Colour"); - calculateMenu.setText("Calculate"); - webService.setText("Web Service"); - selectAllSequenceMenuItem.setText("Select All"); + editMenu.setText(MessageManager.getString("action.edit")); + viewMenu.setText(MessageManager.getString("action.view")); + colourMenu.setText(MessageManager.getString("action.colour")); + calculateMenu.setText(MessageManager.getString("action.calculate")); + webService.setText(MessageManager.getString("action.web_service")); + selectAllSequenceMenuItem.setText(MessageManager.getString("action.select_all")); selectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke .getKeyStroke(java.awt.event.KeyEvent.VK_A, Toolkit .getDefaultToolkit().getMenuShortcutKeyMask(), false)); @@ -540,7 +610,7 @@ public class GAlignFrame extends JInternalFrame selectAllSequenceMenuItem_actionPerformed(e); } }); - deselectAllSequenceMenuItem.setText("Deselect All"); + deselectAllSequenceMenuItem.setText(MessageManager.getString("action.deselect_all")); deselectAllSequenceMenuItem.setAccelerator(javax.swing.KeyStroke .getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0, false)); deselectAllSequenceMenuItem @@ -551,7 +621,7 @@ public class GAlignFrame extends JInternalFrame deselectAllSequenceMenuItem_actionPerformed(e); } }); - invertSequenceMenuItem.setText("Invert Sequence Selection"); + invertSequenceMenuItem.setText(MessageManager.getString("action.invert_sequence_selection")); invertSequenceMenuItem.setAccelerator(javax.swing.KeyStroke .getKeyStroke(java.awt.event.KeyEvent.VK_I, Toolkit .getDefaultToolkit().getMenuShortcutKeyMask(), false)); @@ -563,7 +633,7 @@ public class GAlignFrame extends JInternalFrame invertSequenceMenuItem_actionPerformed(e); } }); - grpsFromSelection.setText("Make Groups for selection"); + grpsFromSelection.setText(MessageManager.getString("action.make_groups_selection")); grpsFromSelection.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -571,8 +641,16 @@ public class GAlignFrame extends JInternalFrame makeGrpsFromSelection_actionPerformed(e); } }); - - remove2LeftMenuItem.setText("Remove Left"); + expandAlignment.setText(MessageManager.getString("action.view_flanking_regions")); + expandAlignment.setToolTipText(MessageManager.getString("label.view_flanking_regions")); + expandAlignment.addActionListener(new java.awt.event.ActionListener() { + @Override + public void actionPerformed(ActionEvent e) + { + expand_newalign(e); + } + }); + remove2LeftMenuItem.setText(MessageManager.getString("action.remove_left")); remove2LeftMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_L, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask(), false)); @@ -584,7 +662,7 @@ public class GAlignFrame extends JInternalFrame remove2LeftMenuItem_actionPerformed(e); } }); - remove2RightMenuItem.setText("Remove Right"); + remove2RightMenuItem.setText(MessageManager.getString("action.remove_right")); remove2RightMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_R, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask(), false)); @@ -596,7 +674,7 @@ public class GAlignFrame extends JInternalFrame remove2RightMenuItem_actionPerformed(e); } }); - removeGappedColumnMenuItem.setText("Remove Empty Columns"); + removeGappedColumnMenuItem.setText(MessageManager.getString("action.remove_empty_columns")); removeGappedColumnMenuItem.setAccelerator(javax.swing.KeyStroke .getKeyStroke(java.awt.event.KeyEvent.VK_E, Toolkit .getDefaultToolkit().getMenuShortcutKeyMask(), false)); @@ -608,7 +686,7 @@ public class GAlignFrame extends JInternalFrame removeGappedColumnMenuItem_actionPerformed(e); } }); - removeAllGapsMenuItem.setText("Remove All Gaps"); + removeAllGapsMenuItem.setText(MessageManager.getString("action.remove_all_gaps")); removeAllGapsMenuItem.setAccelerator(javax.swing.KeyStroke .getKeyStroke(java.awt.event.KeyEvent.VK_E, Toolkit .getDefaultToolkit().getMenuShortcutKeyMask() @@ -621,7 +699,7 @@ public class GAlignFrame extends JInternalFrame removeAllGapsMenuItem_actionPerformed(e); } }); - justifyLeftMenuItem.setText("Left Justify Alignment"); + justifyLeftMenuItem.setText(MessageManager.getString("action.left_justify_alignment")); justifyLeftMenuItem .addActionListener(new java.awt.event.ActionListener() { @@ -630,7 +708,7 @@ public class GAlignFrame extends JInternalFrame justifyLeftMenuItem_actionPerformed(e); } }); - justifyRightMenuItem.setText("Right Justify Alignment"); + justifyRightMenuItem.setText(MessageManager.getString("action.right_justify_alignment")); justifyRightMenuItem .addActionListener(new java.awt.event.ActionListener() { @@ -639,7 +717,7 @@ public class GAlignFrame extends JInternalFrame justifyRightMenuItem_actionPerformed(e); } }); - viewBoxesMenuItem.setText("Boxes"); + viewBoxesMenuItem.setText(MessageManager.getString("action.boxes")); viewBoxesMenuItem.setState(true); viewBoxesMenuItem.addActionListener(new java.awt.event.ActionListener() { @@ -648,7 +726,7 @@ public class GAlignFrame extends JInternalFrame viewBoxesMenuItem_actionPerformed(e); } }); - viewTextMenuItem.setText("Text"); + viewTextMenuItem.setText(MessageManager.getString("action.text")); viewTextMenuItem.setState(true); viewTextMenuItem.addActionListener(new java.awt.event.ActionListener() { @@ -657,7 +735,7 @@ public class GAlignFrame extends JInternalFrame viewTextMenuItem_actionPerformed(e); } }); - showNonconservedMenuItem.setText("Show nonconserved"); + showNonconservedMenuItem.setText(MessageManager.getString("label.show_non_conversed")); showNonconservedMenuItem.setState(false); showNonconservedMenuItem .addActionListener(new java.awt.event.ActionListener() @@ -667,7 +745,7 @@ public class GAlignFrame extends JInternalFrame showUnconservedMenuItem_actionPerformed(e); } }); - sortPairwiseMenuItem.setText("by Pairwise Identity"); + sortPairwiseMenuItem.setText(MessageManager.getString("action.by_pairwise_id")); sortPairwiseMenuItem .addActionListener(new java.awt.event.ActionListener() { @@ -676,7 +754,7 @@ public class GAlignFrame extends JInternalFrame sortPairwiseMenuItem_actionPerformed(e); } }); - sortIDMenuItem.setText("by ID"); + sortIDMenuItem.setText(MessageManager.getString("action.by_id")); sortIDMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -684,7 +762,7 @@ public class GAlignFrame extends JInternalFrame sortIDMenuItem_actionPerformed(e); } }); - sortLengthMenuItem.setText("By Length"); + sortLengthMenuItem.setText(MessageManager.getString("action.by_length")); sortLengthMenuItem .addActionListener(new java.awt.event.ActionListener() { @@ -693,7 +771,7 @@ public class GAlignFrame extends JInternalFrame sortLengthMenuItem_actionPerformed(e); } }); - sortGroupMenuItem.setText("by Group"); + sortGroupMenuItem.setText(MessageManager.getString("action.by_group")); sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -701,7 +779,7 @@ public class GAlignFrame extends JInternalFrame sortGroupMenuItem_actionPerformed(e); } }); - removeRedundancyMenuItem.setText("Remove Redundancy..."); + removeRedundancyMenuItem.setText(MessageManager.getString("action.remove_redundancy")); removeRedundancyMenuItem.setAccelerator(javax.swing.KeyStroke .getKeyStroke(java.awt.event.KeyEvent.VK_D, Toolkit .getDefaultToolkit().getMenuShortcutKeyMask(), false)); @@ -713,7 +791,7 @@ public class GAlignFrame extends JInternalFrame removeRedundancyMenuItem_actionPerformed(e); } }); - pairwiseAlignmentMenuItem.setText("Pairwise Alignments..."); + pairwiseAlignmentMenuItem.setText(MessageManager.getString("action.pairwise_alignment")); pairwiseAlignmentMenuItem .addActionListener(new java.awt.event.ActionListener() { @@ -722,7 +800,7 @@ public class GAlignFrame extends JInternalFrame pairwiseAlignmentMenuItem_actionPerformed(e); } }); - PCAMenuItem.setText("Principal Component Analysis"); + PCAMenuItem.setText(MessageManager.getString("label.principal_component_analysis")); PCAMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -731,7 +809,7 @@ public class GAlignFrame extends JInternalFrame } }); averageDistanceTreeMenuItem - .setText("Average Distance Using % Identity"); + .setText(MessageManager.getString("label.average_distance_identity")); averageDistanceTreeMenuItem .addActionListener(new java.awt.event.ActionListener() { @@ -740,7 +818,7 @@ public class GAlignFrame extends JInternalFrame averageDistanceTreeMenuItem_actionPerformed(e); } }); - neighbourTreeMenuItem.setText("Neighbour Joining Using % Identity"); + neighbourTreeMenuItem.setText(MessageManager.getString("label.neighbour_joining_identity")); neighbourTreeMenuItem .addActionListener(new java.awt.event.ActionListener() { @@ -754,9 +832,9 @@ public class GAlignFrame extends JInternalFrame statusBar.setBackground(Color.white); statusBar.setFont(new java.awt.Font("Verdana", 0, 11)); statusBar.setBorder(BorderFactory.createLineBorder(Color.black)); - statusBar.setText("Status bar"); - outputTextboxMenu.setText("Output to Textbox"); - clustalColour.setText("Clustalx"); + statusBar.setText(MessageManager.getString("label.status_bar")); + outputTextboxMenu.setText(MessageManager.getString("label.out_to_textbox")); + clustalColour.setText(MessageManager.getString("label.clustalx")); clustalColour.addActionListener(new java.awt.event.ActionListener() { @@ -765,7 +843,7 @@ public class GAlignFrame extends JInternalFrame clustalColour_actionPerformed(e); } }); - zappoColour.setText("Zappo"); + zappoColour.setText(MessageManager.getString("label.zappo")); zappoColour.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -773,7 +851,7 @@ public class GAlignFrame extends JInternalFrame zappoColour_actionPerformed(e); } }); - taylorColour.setText("Taylor"); + taylorColour.setText(MessageManager.getString("label.taylor")); taylorColour.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -781,7 +859,7 @@ public class GAlignFrame extends JInternalFrame taylorColour_actionPerformed(e); } }); - hydrophobicityColour.setText("Hydrophobicity"); + hydrophobicityColour.setText(MessageManager.getString("label.hydrophobicity")); hydrophobicityColour .addActionListener(new java.awt.event.ActionListener() { @@ -790,7 +868,7 @@ public class GAlignFrame extends JInternalFrame hydrophobicityColour_actionPerformed(e); } }); - helixColour.setText("Helix Propensity"); + helixColour.setText(MessageManager.getString("label.helix_propensity")); helixColour.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -798,7 +876,7 @@ public class GAlignFrame extends JInternalFrame helixColour_actionPerformed(e); } }); - strandColour.setText("Strand Propensity"); + strandColour.setText(MessageManager.getString("label.strand_propensity")); strandColour.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -806,7 +884,7 @@ public class GAlignFrame extends JInternalFrame strandColour_actionPerformed(e); } }); - turnColour.setText("Turn Propensity"); + turnColour.setText(MessageManager.getString("label.turn_propensity")); turnColour.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -814,7 +892,7 @@ public class GAlignFrame extends JInternalFrame turnColour_actionPerformed(e); } }); - buriedColour.setText("Buried Index"); + buriedColour.setText(MessageManager.getString("label.buried_index")); buriedColour.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -822,7 +900,7 @@ public class GAlignFrame extends JInternalFrame buriedColour_actionPerformed(e); } }); - userDefinedColour.setText("User Defined..."); + userDefinedColour.setText(MessageManager.getString("action.user_defined")); userDefinedColour.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -830,7 +908,7 @@ public class GAlignFrame extends JInternalFrame userDefinedColour_actionPerformed(e); } }); - PIDColour.setText("Percentage Identity"); + PIDColour.setText(MessageManager.getString("label.percentage_identity")); PIDColour.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -838,7 +916,7 @@ public class GAlignFrame extends JInternalFrame PIDColour_actionPerformed(e); } }); - BLOSUM62Colour.setText("BLOSUM62 Score"); + BLOSUM62Colour.setText(MessageManager.getString("label.blosum62_score")); BLOSUM62Colour.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -846,7 +924,41 @@ public class GAlignFrame extends JInternalFrame BLOSUM62Colour_actionPerformed(e); } }); - avDistanceTreeBlosumMenuItem.setText("Average Distance Using BLOSUM62"); + nucleotideColour.setText(MessageManager.getString("label.nucleotide")); + nucleotideColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + nucleotideColour_actionPerformed(e); + } + }); + + purinePyrimidineColour.setText(MessageManager.getString("label.purine_pyrimidine")); + purinePyrimidineColour + .addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + purinePyrimidineColour_actionPerformed(e); + } + }); + + RNAInteractionColour.setText("RNA Interaction type"); + RNAInteractionColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + RNAInteractionColour_actionPerformed(e); + } + }); + /* + * covariationColour.setText("Covariation"); + * covariationColour.addActionListener(new java.awt.event.ActionListener() { + * public void actionPerformed(ActionEvent e) { + * covariationColour_actionPerformed(e); } }); + */ + + avDistanceTreeBlosumMenuItem.setText(MessageManager.getString("label.average_distance_bloslum62")); avDistanceTreeBlosumMenuItem .addActionListener(new java.awt.event.ActionListener() { @@ -855,7 +967,7 @@ public class GAlignFrame extends JInternalFrame avTreeBlosumMenuItem_actionPerformed(e); } }); - njTreeBlosumMenuItem.setText("Neighbour Joining using BLOSUM62"); + njTreeBlosumMenuItem.setText(MessageManager.getString("label.neighbour_blosum62")); njTreeBlosumMenuItem .addActionListener(new java.awt.event.ActionListener() { @@ -865,7 +977,7 @@ public class GAlignFrame extends JInternalFrame } }); annotationPanelMenuItem.setActionCommand(""); - annotationPanelMenuItem.setText("Show Annotations"); + annotationPanelMenuItem.setText(MessageManager.getString("label.show_annotations")); annotationPanelMenuItem.setState(jalview.bin.Cache.getDefault( "SHOW_ANNOTATIONS", true)); annotationPanelMenuItem @@ -876,7 +988,7 @@ public class GAlignFrame extends JInternalFrame annotationPanelMenuItem_actionPerformed(e); } }); - colourTextMenuItem.setText("Colour Text"); + colourTextMenuItem.setText(MessageManager.getString("label.colour_text")); colourTextMenuItem .addActionListener(new java.awt.event.ActionListener() { @@ -885,7 +997,7 @@ public class GAlignFrame extends JInternalFrame colourTextMenuItem_actionPerformed(e); } }); - htmlMenuItem.setText("HTML"); + htmlMenuItem.setText(MessageManager.getString("label.html")); htmlMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -893,7 +1005,7 @@ public class GAlignFrame extends JInternalFrame htmlMenuItem_actionPerformed(e); } }); - overviewMenuItem.setText("Overview Window"); + overviewMenuItem.setText(MessageManager.getString("label.overview_window")); overviewMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -902,7 +1014,7 @@ public class GAlignFrame extends JInternalFrame } }); undoMenuItem.setEnabled(false); - undoMenuItem.setText("Undo"); + undoMenuItem.setText(MessageManager.getString("action.undo")); undoMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_Z, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask(), false)); @@ -914,7 +1026,7 @@ public class GAlignFrame extends JInternalFrame } }); redoMenuItem.setEnabled(false); - redoMenuItem.setText("Redo"); + redoMenuItem.setText(MessageManager.getString("action.redo")); redoMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_Y, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask(), false)); @@ -925,7 +1037,7 @@ public class GAlignFrame extends JInternalFrame redoMenuItem_actionPerformed(e); } }); - conservationMenuItem.setText("By Conservation"); + conservationMenuItem.setText(MessageManager.getString("action.by_conservation")); conservationMenuItem .addActionListener(new java.awt.event.ActionListener() { @@ -934,7 +1046,7 @@ public class GAlignFrame extends JInternalFrame conservationMenuItem_actionPerformed(e); } }); - noColourmenuItem.setText("None"); + noColourmenuItem.setText(MessageManager.getString("label.none")); noColourmenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -942,7 +1054,7 @@ public class GAlignFrame extends JInternalFrame noColourmenuItem_actionPerformed(e); } }); - wrapMenuItem.setText("Wrap"); + wrapMenuItem.setText(MessageManager.getString("label.wrap")); wrapMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -950,7 +1062,7 @@ public class GAlignFrame extends JInternalFrame wrapMenuItem_actionPerformed(e); } }); - printMenuItem.setText("Print ..."); + printMenuItem.setText(MessageManager.getString("action.print") + "..."); printMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_P, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask(), false)); @@ -961,7 +1073,7 @@ public class GAlignFrame extends JInternalFrame printMenuItem_actionPerformed(e); } }); - renderGapsMenuItem.setText("Show Gaps"); + renderGapsMenuItem.setText(MessageManager.getString("action.show_gaps")); renderGapsMenuItem.setState(true); renderGapsMenuItem .addActionListener(new java.awt.event.ActionListener() @@ -971,7 +1083,7 @@ public class GAlignFrame extends JInternalFrame renderGapsMenuItem_actionPerformed(e); } }); - findMenuItem.setText("Find..."); + findMenuItem.setText(MessageManager.getString("action.find")); findMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_F, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask(), false)); @@ -982,7 +1094,7 @@ public class GAlignFrame extends JInternalFrame findMenuItem_actionPerformed(e); } }); - abovePIDThreshold.setText("Above Identity Threshold"); + abovePIDThreshold.setText(MessageManager.getString("label.above_identity_threshold")); abovePIDThreshold.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -990,7 +1102,7 @@ public class GAlignFrame extends JInternalFrame abovePIDThreshold_actionPerformed(e); } }); - showSeqFeatures.setText("Show Sequence Features"); + showSeqFeatures.setText(MessageManager.getString("label.show_sequence_features")); showSeqFeatures.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) @@ -1004,7 +1116,7 @@ public class GAlignFrame extends JInternalFrame * void actionPerformed(ActionEvent actionEvent) { * showSeqFeaturesHeight_actionPerformed(actionEvent); } }); */ - showDbRefsMenuitem.setText("Show Database Refs"); + showDbRefsMenuitem.setText(MessageManager.getString("label.show_database_refs")); showDbRefsMenuitem.addActionListener(new ActionListener() { @@ -1014,7 +1126,7 @@ public class GAlignFrame extends JInternalFrame } }); - showNpFeatsMenuitem.setText("Show Non-Positional Features"); + showNpFeatsMenuitem.setText(MessageManager.getString("label.show_non_positional_features")); showNpFeatsMenuitem.addActionListener(new ActionListener() { @@ -1024,7 +1136,7 @@ public class GAlignFrame extends JInternalFrame } }); - showGroupConservation.setText("Group Conservation"); + showGroupConservation.setText(MessageManager.getString("label.group_conservation")); showGroupConservation.addActionListener(new ActionListener() { @@ -1035,7 +1147,7 @@ public class GAlignFrame extends JInternalFrame }); - showGroupConsensus.setText("Group Consensus"); + showGroupConsensus.setText(MessageManager.getString("label.group_consensus")); showGroupConsensus.addActionListener(new ActionListener() { @@ -1045,7 +1157,7 @@ public class GAlignFrame extends JInternalFrame } }); - showConsensusHistogram.setText("Show Consensus Histogram"); + showConsensusHistogram.setText(MessageManager.getString("label.show_consensus_histogram")); showConsensusHistogram.addActionListener(new ActionListener() { @@ -1055,7 +1167,7 @@ public class GAlignFrame extends JInternalFrame } }); - showSequenceLogo.setText("Show Consensus Logo"); + showSequenceLogo.setText(MessageManager.getString("label.show_consensus_logo")); showSequenceLogo.addActionListener(new ActionListener() { @@ -1065,7 +1177,17 @@ public class GAlignFrame extends JInternalFrame } }); - applyAutoAnnotationSettings.setText("Apply to all groups"); + normaliseSequenceLogo.setText(MessageManager.getString("label.norm_consensus_logo")); + normaliseSequenceLogo.addActionListener(new ActionListener() + { + + public void actionPerformed(ActionEvent e) + { + normaliseSequenceLogo_actionPerformed(e); + } + + }); + applyAutoAnnotationSettings.setText(MessageManager.getString("label.apply_all_groups")); applyAutoAnnotationSettings.setState(false); applyAutoAnnotationSettings.setVisible(true); applyAutoAnnotationSettings.addActionListener(new ActionListener() @@ -1078,7 +1200,7 @@ public class GAlignFrame extends JInternalFrame }); - nucleotideColour.setText("Nucleotide"); + nucleotideColour.setText(MessageManager.getString("label.nucleotide")); nucleotideColour.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -1086,7 +1208,20 @@ public class GAlignFrame extends JInternalFrame nucleotideColour_actionPerformed(e); } }); - deleteGroups.setText("Undefine groups"); + + tcoffeeColour.setText(MessageManager.getString("label.tcoffee_scores")); + tcoffeeColour.setEnabled(false); + tcoffeeColour.addActionListener(new ActionListener() + { + + @Override + public void actionPerformed(ActionEvent e) + { + tcoffeeColorScheme_actionPerformed(e); + } + }); + + deleteGroups.setText(MessageManager.getString("action.undefine_groups")); deleteGroups.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_U, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask(), false)); @@ -1097,7 +1232,29 @@ public class GAlignFrame extends JInternalFrame deleteGroups_actionPerformed(e); } }); - copy.setText("Copy"); + createGroup.setText(MessageManager.getString("action.create_groups")); + createGroup.setAccelerator(javax.swing.KeyStroke.getKeyStroke( + java.awt.event.KeyEvent.VK_G, Toolkit.getDefaultToolkit() + .getMenuShortcutKeyMask(), false)); + createGroup.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + createGroup_actionPerformed(e); + } + }); + unGroup.setText(MessageManager.getString("action.remove_group")); + unGroup.setAccelerator(javax.swing.KeyStroke.getKeyStroke( + java.awt.event.KeyEvent.VK_G,Toolkit.getDefaultToolkit() + .getMenuShortcutKeyMask() | java.awt.event.KeyEvent.SHIFT_MASK, false)); + unGroup.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + unGroup_actionPerformed(e); + } + }); + copy.setText(MessageManager.getString("action.copy")); copy.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_C, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask(), false)); @@ -1109,7 +1266,7 @@ public class GAlignFrame extends JInternalFrame copy_actionPerformed(e); } }); - cut.setText("Cut"); + cut.setText(MessageManager.getString("action.cut")); cut.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_X, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask(), false)); @@ -1120,7 +1277,7 @@ public class GAlignFrame extends JInternalFrame cut_actionPerformed(e); } }); - delete.setText("Delete"); + delete.setText(MessageManager.getString("action.delete")); delete.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_BACK_SPACE, 0, false)); delete.addActionListener(new java.awt.event.ActionListener() @@ -1130,8 +1287,8 @@ public class GAlignFrame extends JInternalFrame delete_actionPerformed(e); } }); - pasteMenu.setText("Paste"); - pasteNew.setText("To New Alignment"); + pasteMenu.setText(MessageManager.getString("action.paste")); + pasteNew.setText(MessageManager.getString("label.to_new_alignment")); pasteNew.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_V, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask() @@ -1143,7 +1300,7 @@ public class GAlignFrame extends JInternalFrame pasteNew_actionPerformed(e); } }); - pasteThis.setText("Add To This Alignment"); + pasteThis.setText(MessageManager.getString("label.to_this_alignment")); pasteThis.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_V, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask(), false)); @@ -1154,7 +1311,7 @@ public class GAlignFrame extends JInternalFrame pasteThis_actionPerformed(e); } }); - applyToAllGroups.setText("Apply Colour To All Groups"); + applyToAllGroups.setText(MessageManager.getString("label.apply_colour_to_all_groups")); applyToAllGroups.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -1169,9 +1326,9 @@ public class GAlignFrame extends JInternalFrame createPNG(null); } }); - createPNG.setActionCommand("Save As PNG Image"); + createPNG.setActionCommand(MessageManager.getString("label.save_png_image")); createPNG.setText("PNG"); - font.setText("Font..."); + font.setText(MessageManager.getString("action.font")); font.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -1180,7 +1337,7 @@ public class GAlignFrame extends JInternalFrame } }); - seqLimits.setText("Show Sequence Limits"); + seqLimits.setText(MessageManager.getString("label.show_sequence_limits")); seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true)); seqLimits.addActionListener(new java.awt.event.ActionListener() { @@ -1197,8 +1354,8 @@ public class GAlignFrame extends JInternalFrame createEPS(null); } }); - LoadtreeMenuItem.setActionCommand("Load a tree for this sequence set"); - LoadtreeMenuItem.setText("Load Associated Tree"); + LoadtreeMenuItem.setActionCommand(MessageManager.getString("label.load_tree_for_sequence_set")); + LoadtreeMenuItem.setText(MessageManager.getString("label.load_associated_tree")); LoadtreeMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -1206,8 +1363,9 @@ public class GAlignFrame extends JInternalFrame LoadtreeMenuItem_actionPerformed(e); } }); + scaleAbove.setVisible(false); - scaleAbove.setText("Scale Above"); + scaleAbove.setText(MessageManager.getString("action.scale_above")); scaleAbove.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -1217,7 +1375,7 @@ public class GAlignFrame extends JInternalFrame }); scaleLeft.setVisible(false); scaleLeft.setSelected(true); - scaleLeft.setText("Scale Left"); + scaleLeft.setText(MessageManager.getString("action.scale_left")); scaleLeft.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -1227,7 +1385,7 @@ public class GAlignFrame extends JInternalFrame }); scaleRight.setVisible(false); scaleRight.setSelected(true); - scaleRight.setText("Scale Right"); + scaleRight.setText(MessageManager.getString("action.scale_right")); scaleRight.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -1237,7 +1395,7 @@ public class GAlignFrame extends JInternalFrame }); centreColumnLabelsMenuItem.setVisible(true); centreColumnLabelsMenuItem.setState(false); - centreColumnLabelsMenuItem.setText("Centre Column Labels"); + centreColumnLabelsMenuItem.setText(MessageManager.getString("label.centre_column_labels")); centreColumnLabelsMenuItem .addActionListener(new java.awt.event.ActionListener() { @@ -1248,7 +1406,7 @@ public class GAlignFrame extends JInternalFrame }); followHighlightMenuItem.setVisible(true); followHighlightMenuItem.setState(true); - followHighlightMenuItem.setText("Automatic Scrolling"); + followHighlightMenuItem.setText(MessageManager.getString("label.automatic_scrolling")); followHighlightMenuItem.addActionListener(new ActionListener() { @@ -1259,7 +1417,7 @@ public class GAlignFrame extends JInternalFrame }); - modifyPID.setText("Modify Identity Threshold..."); + modifyPID.setText(MessageManager.getString("label.modify_identity_thereshold")); modifyPID.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -1267,7 +1425,7 @@ public class GAlignFrame extends JInternalFrame modifyPID_actionPerformed(e); } }); - modifyConservation.setText("Modify Conservation Threshold..."); + modifyConservation.setText(MessageManager.getString("label.modify_conservation_thereshold")); modifyConservation .addActionListener(new java.awt.event.ActionListener() { @@ -1276,8 +1434,8 @@ public class GAlignFrame extends JInternalFrame modifyConservation_actionPerformed(e); } }); - sortByTreeMenu.setText("By Tree Order"); - sort.setText("Sort"); + sortByTreeMenu.setText(MessageManager.getString("action.by_tree_order")); + sort.setText(MessageManager.getString("action.sort")); sort.addMenuListener(new MenuListener() { public void menuSelected(MenuEvent e) @@ -1293,7 +1451,7 @@ public class GAlignFrame extends JInternalFrame { } }); - sortByAnnotScore.setText("by Score"); + sortByAnnotScore.setText(MessageManager.getString("label.sort_by_score")); sort.add(sortByAnnotScore); sortByAnnotScore.addMenuListener(new javax.swing.event.MenuListener() { @@ -1313,10 +1471,10 @@ public class GAlignFrame extends JInternalFrame }); sortByAnnotScore.setVisible(false); - calculateTree.setText("Calculate Tree"); + calculateTree.setText(MessageManager.getString("action.calculate_tree")); - jMenu2.setText("Export Image"); - padGapsMenuitem.setText("Pad Gaps"); + jMenu2.setText(MessageManager.getString("label.export_image")); + padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps")); padGapsMenuitem.setState(jalview.bin.Cache .getDefault("PAD_GAPS", false)); padGapsMenuitem.addActionListener(new ActionListener() @@ -1327,7 +1485,7 @@ public class GAlignFrame extends JInternalFrame } }); vamsasStore.setVisible(false); - vamsasStore.setText("VAMSAS store"); + vamsasStore.setText(MessageManager.getString("label.vamsas_store")); vamsasStore.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1335,7 +1493,7 @@ public class GAlignFrame extends JInternalFrame vamsasStore_actionPerformed(e); } }); - showTranslation.setText("Translate cDNA"); + showTranslation.setText(MessageManager.getString("label.translate_cDNA")); showTranslation.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1343,7 +1501,7 @@ public class GAlignFrame extends JInternalFrame showTranslation_actionPerformed(e); } }); - extractScores.setText("Extract Scores..."); + extractScores.setText(MessageManager.getString("label.extract_scores") + "..."); extractScores.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1353,22 +1511,22 @@ public class GAlignFrame extends JInternalFrame }); extractScores.setVisible(true); // JBPNote: TODO: make gui for regex based // score extraction - showProducts.setText("Get Cross References"); + showProducts.setText(MessageManager.getString("label.get_cross_refs")); /* * showProducts.addActionListener(new ActionListener() { * * public void actionPerformed(ActionEvent e) { * showProducts_actionPerformed(e); } }); */ - featureSettings.setText("Feature Settings..."); - featureSettings.addActionListener(new ActionListener() + openFeatureSettings.setText(MessageManager.getString("label.feature_settings")); + openFeatureSettings.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { featureSettings_actionPerformed(e); } }); - fetchSequence.setText("Fetch Sequence(s)..."); + fetchSequence.setText(MessageManager.getString("label.fetch_sequences")); fetchSequence.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1377,7 +1535,7 @@ public class GAlignFrame extends JInternalFrame } }); - annotationColour.setText("By Annotation..."); + annotationColour.setText(MessageManager.getString("action.by_annotation")); annotationColour.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1385,7 +1543,17 @@ public class GAlignFrame extends JInternalFrame annotationColour_actionPerformed(e); } }); - associatedData.setText("Load Features / Annotations"); + + rnahelicesColour.setText(MessageManager.getString("action.by_rna_helixes")); + rnahelicesColour.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + rnahelicesColour_actionPerformed(e); + } + }); + + associatedData.setText(MessageManager.getString("label.load_features_annotations")); associatedData.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1393,7 +1561,7 @@ public class GAlignFrame extends JInternalFrame associatedData_actionPerformed(e); } }); - autoCalculate.setText("Autocalculate Consensus"); + autoCalculate.setText(MessageManager.getString("label.autocalculate_consensus")); autoCalculate.setState(jalview.bin.Cache.getDefault( "AUTO_CALC_CONSENSUS", true)); autoCalculate.addActionListener(new ActionListener() @@ -1403,8 +1571,33 @@ public class GAlignFrame extends JInternalFrame autoCalculate_actionPerformed(e); } }); - addSequenceMenu.setText("Add Sequences"); - addFromFile.setText("From File"); + sortByTree.setText(MessageManager.getString("label.sort_alignment_new_tree")); + sortByTree + .setToolTipText("" + MessageManager.getString("label.enable_automatically_sort_alignment_when_open_new_tree")); + sortByTree + .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false)); + sortByTree.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + sortByTreeOption_actionPerformed(e); + } + }); + + listenToViewSelections.setText(MessageManager.getString("label.listen_for_selections")); + listenToViewSelections + .setToolTipText("" + MessageManager.getString("label.selections_mirror_selections_made_same_sequences_other_views")); + listenToViewSelections.setState(false); + listenToViewSelections.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + listenToViewSelections_actionPerformed(e); + } + }); + + addSequenceMenu.setText(MessageManager.getString("label.add_sequences")); + addFromFile.setText(MessageManager.getString("label.from_file")); addFromFile.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1412,7 +1605,7 @@ public class GAlignFrame extends JInternalFrame addFromFile_actionPerformed(e); } }); - addFromText.setText("From Textbox"); + addFromText.setText(MessageManager.getString("label.from_textbox")); addFromText.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1420,7 +1613,7 @@ public class GAlignFrame extends JInternalFrame addFromText_actionPerformed(e); } }); - addFromURL.setText("From URL"); + addFromURL.setText(MessageManager.getString("label.from_url")); addFromURL.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1428,7 +1621,7 @@ public class GAlignFrame extends JInternalFrame addFromURL_actionPerformed(e); } }); - exportFeatures.setText("Export Features..."); + exportFeatures.setText(MessageManager.getString("label.export_features")); exportFeatures.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1436,7 +1629,7 @@ public class GAlignFrame extends JInternalFrame exportFeatures_actionPerformed(e); } }); - exportAnnotations.setText("Export Annotations..."); + exportAnnotations.setText(MessageManager.getString("label.export_annotations")); exportAnnotations.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1445,9 +1638,9 @@ public class GAlignFrame extends JInternalFrame } }); statusPanel.setLayout(gridLayout1); - jMenu3.setText("Show"); - showAllSeqs.setText("All Sequences"); - showAllSeqs.setToolTipText("Shift+H toggles sequence visiblity."); + jMenu3.setText(MessageManager.getString("action.show")); + showAllSeqs.setText(MessageManager.getString("label.all_sequences")); + showAllSeqs.setToolTipText(MessageManager.getString("label.toggle_sequence_visibility")); showAllSeqs.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1455,8 +1648,8 @@ public class GAlignFrame extends JInternalFrame showAllSeqs_actionPerformed(e); } }); - showAllColumns.setText("All Columns"); - showAllColumns.setToolTipText("Ctrl+H toggles column visiblity."); + showAllColumns.setText(MessageManager.getString("label.all_columns")); + showAllColumns.setToolTipText(MessageManager.getString("label.toggle_columns_visibility")); showAllColumns.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1464,9 +1657,9 @@ public class GAlignFrame extends JInternalFrame showAllColumns_actionPerformed(e); } }); - hideMenu.setText("Hide"); - hideSelSequences.setText("Selected Sequences"); - hideSelSequences.setToolTipText("Shift+H toggles sequence visiblity."); + hideMenu.setText(MessageManager.getString("action.hide")); + hideSelSequences.setText(MessageManager.getString("label.selected_sequences")); + hideSelSequences.setToolTipText(MessageManager.getString("label.toggle_sequence_visibility")); hideSelSequences.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1474,8 +1667,8 @@ public class GAlignFrame extends JInternalFrame hideSelSequences_actionPerformed(e); } }); - hideSelColumns.setText("Selected Columns"); - hideSelColumns.setToolTipText("Ctrl+H toggles column visiblity."); + hideSelColumns.setText(MessageManager.getString("label.selected_columns")); + hideSelColumns.setToolTipText(MessageManager.getString("label.toggle_columns_visibility")); hideSelColumns.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1483,7 +1676,7 @@ public class GAlignFrame extends JInternalFrame hideSelColumns_actionPerformed(e); } }); - hideAllSelection.setText("Selected Region"); + hideAllSelection.setText(MessageManager.getString("label.selected_region")); hideAllSelection.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1492,7 +1685,7 @@ public class GAlignFrame extends JInternalFrame } }); // TODO: should be hidden if no selection exists. - hideAllButSelection.setText("All but Selected Region (Shift+Ctrl+H)"); + hideAllButSelection.setText(MessageManager.getString("label.all_but_selected_region")); hideAllButSelection.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1500,9 +1693,9 @@ public class GAlignFrame extends JInternalFrame hideAllButSelection_actionPerformed(e); } }); - showAllhidden.setText("All Sequences and Columns"); + showAllhidden.setText(MessageManager.getString("label.all_sequences_columns")); showAllhidden - .setToolTipText("H toggles visibility of hidden or selected regions."); + .setToolTipText(MessageManager.getString("label.toggles_visibility_hidden_selected_regions")); showAllhidden.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1511,7 +1704,7 @@ public class GAlignFrame extends JInternalFrame } }); - hiddenMarkers.setText("Show Hidden Markers"); + hiddenMarkers.setText(MessageManager.getString("action.show_hidden_markers")); hiddenMarkers.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1519,7 +1712,7 @@ public class GAlignFrame extends JInternalFrame hiddenMarkers_actionPerformed(e); } }); - invertColSel.setText("Invert Column Selection"); + invertColSel.setText(MessageManager.getString("action.invert_column_selection")); invertColSel.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_I, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask() @@ -1554,7 +1747,7 @@ public class GAlignFrame extends JInternalFrame tabbedPane_focusGained(e); } }); - save.setText("Save"); + save.setText(MessageManager.getString("action.save")); save.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_S, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask(), false)); @@ -1566,7 +1759,7 @@ public class GAlignFrame extends JInternalFrame } }); reload.setEnabled(false); - reload.setText("Reload"); + reload.setText(MessageManager.getString("action.reload")); reload.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1574,7 +1767,7 @@ public class GAlignFrame extends JInternalFrame reload_actionPerformed(e); } }); - newView.setText("New View"); + newView.setText(MessageManager.getString("action.new_view")); newView.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_T, Toolkit.getDefaultToolkit() .getMenuShortcutKeyMask(), false)); @@ -1585,9 +1778,8 @@ public class GAlignFrame extends JInternalFrame newView_actionPerformed(e); } }); - tabbedPane.setToolTipText(" Right-click to rename tab" - + "
Press X to eXpand tabs, G to reGroup.
"); - textColour.setText("Colour Text ..."); + tabbedPane.setToolTipText("" + MessageManager.getString("label.rename_tab_eXpand_reGroup") + ""); + textColour.setText(MessageManager.getString("label.colour_text") + "..."); textColour.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1595,9 +1787,9 @@ public class GAlignFrame extends JInternalFrame textColour_actionPerformed(e); } }); - formatMenu.setText("Format"); - selectMenu.setText("Select"); - idRightAlign.setText("Right Align Sequence Id"); + formatMenu.setText(MessageManager.getString("action.format")); + selectMenu.setText(MessageManager.getString("action.select")); + idRightAlign.setText(MessageManager.getString("label.right_align_sequence_id")); idRightAlign.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1606,7 +1798,7 @@ public class GAlignFrame extends JInternalFrame } }); gatherViews.setEnabled(false); - gatherViews.setText("Gather Views"); + gatherViews.setText(MessageManager.getString("action.gather_views")); gatherViews.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_G, 0, false)); gatherViews.addActionListener(new ActionListener() @@ -1617,7 +1809,7 @@ public class GAlignFrame extends JInternalFrame } }); expandViews.setEnabled(false); - expandViews.setText("Expand Views"); + expandViews.setText(MessageManager.getString("action.expand_views")); expandViews.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_X, 0, false)); expandViews.addActionListener(new ActionListener() @@ -1627,7 +1819,7 @@ public class GAlignFrame extends JInternalFrame expandViews_actionPerformed(e); } }); - pageSetup.setText("Page Setup ..."); + pageSetup.setText(MessageManager.getString("action.page_setup") + "..."); pageSetup.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1635,7 +1827,7 @@ public class GAlignFrame extends JInternalFrame pageSetup_actionPerformed(e); } }); - alignmentProperties.setText("Alignment Properties..."); + alignmentProperties.setText(MessageManager.getString("label.alignment_props") + "..."); alignmentProperties.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) @@ -1643,8 +1835,8 @@ public class GAlignFrame extends JInternalFrame alignmentProperties(); } }); - tooltipSettingsMenu.setText("Sequence ID Tooltip"); - autoAnnMenu.setText("Autocalculated Annotation"); + tooltipSettingsMenu.setText(MessageManager.getString("label.sequence_id_tooltip")); + autoAnnMenu.setText(MessageManager.getString("label.autocalculated_annotation")); alignFrameMenuBar.add(fileMenu); alignFrameMenuBar.add(editMenu); alignFrameMenuBar.add(selectMenu); @@ -1702,6 +1894,7 @@ public class GAlignFrame extends JInternalFrame autoAnnMenu.add(applyAutoAnnotationSettings); autoAnnMenu.add(showConsensusHistogram); autoAnnMenu.add(showSequenceLogo); + autoAnnMenu.add(normaliseSequenceLogo); autoAnnMenu.addSeparator(); autoAnnMenu.add(showGroupConservation); autoAnnMenu.add(showGroupConsensus); @@ -1710,7 +1903,7 @@ public class GAlignFrame extends JInternalFrame viewMenu.add(showSeqFeatures); // viewMenu.add(showSeqFeaturesHeight); - viewMenu.add(featureSettings); + viewMenu.add(openFeatureSettings); tooltipSettingsMenu.add(showDbRefsMenuitem); tooltipSettingsMenu.add(showNpFeatsMenuitem); viewMenu.add(tooltipSettingsMenu); @@ -1733,6 +1926,10 @@ public class GAlignFrame extends JInternalFrame colourMenu.add(turnColour); colourMenu.add(buriedColour); colourMenu.add(nucleotideColour); + colourMenu.add(purinePyrimidineColour); + colourMenu.add(RNAInteractionColour); + // colourMenu.add(covariationColour); + colourMenu.add(tcoffeeColour); colourMenu.add(userDefinedColour); colourMenu.addSeparator(); colourMenu.add(conservationMenuItem); @@ -1740,6 +1937,7 @@ public class GAlignFrame extends JInternalFrame colourMenu.add(abovePIDThreshold); colourMenu.add(modifyPID); colourMenu.add(annotationColour); + colourMenu.add(rnahelicesColour); calculateMenu.add(sort); calculateMenu.add(calculateTree); calculateMenu.addSeparator(); @@ -1749,9 +1947,10 @@ public class GAlignFrame extends JInternalFrame calculateMenu.add(showTranslation); calculateMenu.add(showProducts); calculateMenu.add(autoCalculate); + calculateMenu.add(sortByTree); calculateMenu.addSeparator(); calculateMenu.add(extractScores); - webServiceNoServices = new JMenuItem(""); + webServiceNoServices = new JMenuItem(MessageManager.getString("label.no_services")); webService.add(webServiceNoServices); pasteMenu.add(pasteNew); pasteMenu.add(pasteThis); @@ -1760,10 +1959,6 @@ public class GAlignFrame extends JInternalFrame sort.add(sortGroupMenuItem); sort.add(sortPairwiseMenuItem); sort.add(sortByTreeMenu); - calculateTree.add(averageDistanceTreeMenuItem); - calculateTree.add(neighbourTreeMenuItem); - calculateTree.add(avDistanceTreeBlosumMenuItem); - calculateTree.add(njTreeBlosumMenuItem); jMenu2.add(htmlMenuItem); jMenu2.add(epsFile); jMenu2.add(createPNG); @@ -1802,8 +1997,27 @@ public class GAlignFrame extends JInternalFrame selectMenu.add(deselectAllSequenceMenuItem); selectMenu.add(invertSequenceMenuItem); selectMenu.add(invertColSel); - selectMenu.add(deleteGroups); + selectMenu.add(createGroup); + selectMenu.add(unGroup); selectMenu.add(grpsFromSelection); + selectMenu.add(deleteGroups); + calculateMenu.add(expandAlignment); + // TODO - determine if the listenToViewSelections button is needed : see bug + // JAL-574 + // selectMenu.addSeparator(); + // selectMenu.add(listenToViewSelections); + } + + protected void normaliseSequenceLogo_actionPerformed(ActionEvent e) + { + // TODO Auto-generated method stub + + } + + protected void listenToViewSelections_actionPerformed(ActionEvent e) + { + // TODO Auto-generated method stub + } protected void showAllhidden_actionPerformed(ActionEvent e) @@ -2104,6 +2318,19 @@ public class GAlignFrame extends JInternalFrame { } + protected void purinePyrimidineColour_actionPerformed(ActionEvent e) + { + } + + protected void RNAInteractionColour_actionPerformed(ActionEvent e) + { + } + + + /* + * protected void covariationColour_actionPerformed(ActionEvent e) { } + */ + protected void noColourmenuItem_actionPerformed(ActionEvent e) { } @@ -2139,6 +2366,14 @@ public class GAlignFrame extends JInternalFrame protected void deleteGroups_actionPerformed(ActionEvent e) { } + + protected void createGroup_actionPerformed(ActionEvent e) + { + } + + protected void unGroup_actionPerformed(ActionEvent e) + { + } protected void copy_actionPerformed(ActionEvent e) { @@ -2187,6 +2422,33 @@ public class GAlignFrame extends JInternalFrame protected void LoadtreeMenuItem_actionPerformed(ActionEvent e) { + + } + + /** + * Template method to handle the 'load T-Coffee scores' menu event. + *

+ * Subclasses override this method to provide a custom action. + * + * @param event + * The raised event + */ + protected void loadScores_actionPerformed(ActionEvent event) + { + + } + + /** + * Template method to handle the 'Color T-Coffee scores' menu event. + *

+ * Subclasses override this method to provide a custom action. + * + * @param event + * The raised event + */ + protected void tcoffeeColorScheme_actionPerformed(ActionEvent event) + { + } protected void jpred_actionPerformed(ActionEvent e) @@ -2256,6 +2518,11 @@ public class GAlignFrame extends JInternalFrame } + public void rnahelicesColour_actionPerformed(ActionEvent e) + { + + } + public void associatedData_actionPerformed(ActionEvent e) { @@ -2266,6 +2533,11 @@ public class GAlignFrame extends JInternalFrame } + public void sortByTreeOption_actionPerformed(ActionEvent e) + { + + } + public void showAllSeqs_actionPerformed(ActionEvent e) { @@ -2375,4 +2647,10 @@ public class GAlignFrame extends JInternalFrame { } + + protected void expand_newalign(ActionEvent e) + { + // TODO Auto-generated method stub + + } }