/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
import jalview.bin.Cache;
import jalview.gui.JvSwingUtils;
import jalview.gui.Preferences;
-import jalview.schemes.ColourSchemeProperty;
+import jalview.io.FileFormats;
import jalview.util.MessageManager;
+import jalview.util.Platform;
import java.awt.BorderLayout;
import java.awt.Color;
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;
protected JMenuItem closeMenuItem = new JMenuItem();
- protected JMenu colourMenu = new JMenu();
-
protected JMenu webService = new JMenu();
protected JMenuItem webServiceNoServices;
- public JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
+ protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
- public JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
+ protected JCheckBoxMenuItem viewTextMenuItem = new JCheckBoxMenuItem();
protected JMenu sortByAnnotScore = new JMenu();
protected JMenu outputTextboxMenu = new JMenu();
- protected JRadioButtonMenuItem clustalColour = new JRadioButtonMenuItem();
-
- protected JRadioButtonMenuItem zappoColour = new JRadioButtonMenuItem();
-
- protected JRadioButtonMenuItem taylorColour = new JRadioButtonMenuItem();
-
- protected JRadioButtonMenuItem hydrophobicityColour = new JRadioButtonMenuItem();
-
- protected JRadioButtonMenuItem helixColour = new JRadioButtonMenuItem();
-
- protected JRadioButtonMenuItem strandColour = new JRadioButtonMenuItem();
-
- protected JRadioButtonMenuItem turnColour = new JRadioButtonMenuItem();
-
- protected JRadioButtonMenuItem buriedColour = new JRadioButtonMenuItem();
-
- protected JRadioButtonMenuItem userDefinedColour = new JRadioButtonMenuItem();
-
- protected JRadioButtonMenuItem PIDColour = new JRadioButtonMenuItem();
-
- protected JRadioButtonMenuItem BLOSUM62Colour = new JRadioButtonMenuItem();
-
- protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem();
-
- protected JRadioButtonMenuItem purinePyrimidineColour = new JRadioButtonMenuItem();
-
- protected JRadioButtonMenuItem RNAInteractionColour = new JRadioButtonMenuItem();
+ protected JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
- // protected JRadioButtonMenuItem covariationColour = new
- // JRadioButtonMenuItem();
+ protected JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
- protected JRadioButtonMenuItem tcoffeeColour = new JRadioButtonMenuItem();
-
- public JCheckBoxMenuItem annotationPanelMenuItem = new JCheckBoxMenuItem();
-
- public JCheckBoxMenuItem colourTextMenuItem = new JCheckBoxMenuItem();
-
- public JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
+ protected JCheckBoxMenuItem showNonconservedMenuItem = new JCheckBoxMenuItem();
protected JMenuItem undoMenuItem = new JMenuItem();
protected JMenuItem redoMenuItem = new JMenuItem();
- public JCheckBoxMenuItem conservationMenuItem = new JCheckBoxMenuItem();
-
- JRadioButtonMenuItem noColourmenuItem = new JRadioButtonMenuItem();
+ protected JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
- public JCheckBoxMenuItem wrapMenuItem = new JCheckBoxMenuItem();
-
- public JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
-
- public JCheckBoxMenuItem abovePIDThreshold = new JCheckBoxMenuItem();
+ protected JCheckBoxMenuItem renderGapsMenuItem = new JCheckBoxMenuItem();
public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
JMenu pasteMenu = new JMenu();
- public JCheckBoxMenuItem applyToAllGroups = new JCheckBoxMenuItem();
+ protected JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
+
+ protected JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
- public JCheckBoxMenuItem seqLimits = new JCheckBoxMenuItem();
+ protected JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
- public JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
+ protected JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
- public JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
+ protected JCheckBoxMenuItem applyToAllGroups;
- public JCheckBoxMenuItem scaleRight = new JCheckBoxMenuItem();
+ protected JMenu colourMenu = new JMenu();
+
+ protected JMenuItem textColour;
+
+ protected JCheckBoxMenuItem conservationMenuItem;
+
+ protected JMenuItem modifyConservation;
- protected JMenuItem modifyConservation = new JMenuItem();
+ protected JCheckBoxMenuItem abovePIDThreshold;
+
+ protected JMenuItem modifyPID;
+
+ protected JMenuItem annotationColour;
protected JMenu sortByTreeMenu = new JMenu();
protected JMenu sort = new JMenu();
- protected JMenu calculateTree = new JMenu();
+ protected JMenuItem calculateTree = new JMenuItem();
protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
- protected ButtonGroup colours = new ButtonGroup();
-
protected JMenuItem showTranslation = new JMenuItem();
protected JMenuItem showReverse = new JMenuItem();
protected JMenuItem runGroovy = new JMenuItem();
- protected JMenuItem rnahelicesColour = new JMenuItem();
-
protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
setJMenuBar(alignFrameMenuBar);
// dynamically fill save as menu with available formats
- for (int i = 0; i < jalview.io.FormatAdapter.WRITEABLE_FORMATS.length; i++)
+ for (String ff : FileFormats.getInstance().getWritableFormats(true))
{
- JMenuItem item = new JMenuItem(
- jalview.io.FormatAdapter.WRITEABLE_FORMATS[i]);
+ JMenuItem item = new JMenuItem(ff);
item.addActionListener(new ActionListener()
{
System.err.println(e.toString());
}
- if (!jalview.util.Platform.isAMac())
+ if (!Platform.isAMac())
{
closeMenuItem.setMnemonic('C');
outputTextboxMenu.setMnemonic('T');
pasteMenu.setMnemonic('P');
reload.setMnemonic('R');
}
-
- if (jalview.gui.UserDefinedColours.getUserColourSchemes() != null)
- {
- java.util.Enumeration userColours = jalview.gui.UserDefinedColours
- .getUserColourSchemes().keys();
-
- while (userColours.hasMoreElements())
- {
- final JRadioButtonMenuItem radioItem = new JRadioButtonMenuItem(
- userColours.nextElement().toString());
- radioItem.setName("USER_DEFINED");
- radioItem.addMouseListener(new MouseAdapter()
- {
- @Override
- public void mousePressed(MouseEvent evt)
- {
- if (evt.isPopupTrigger()) // Mac
- {
- offerRemoval(radioItem);
- }
- }
-
- @Override
- public void mouseReleased(MouseEvent evt)
- {
- if (evt.isPopupTrigger()) // Windows
- {
- offerRemoval(radioItem);
- }
- }
-
- /**
- * @param radioItem
- */
- void offerRemoval(final JRadioButtonMenuItem radioItem)
- {
- radioItem.removeActionListener(radioItem.getActionListeners()[0]);
-
- int option = JOptionPane.showInternalConfirmDialog(
- jalview.gui.Desktop.desktop, MessageManager
- .getString("label.remove_from_default_list"),
- MessageManager
- .getString("label.remove_user_defined_colour"),
- JOptionPane.YES_NO_OPTION);
- if (option == JOptionPane.YES_OPTION)
- {
- jalview.gui.UserDefinedColours
- .removeColourFromDefaults(radioItem.getText());
- colourMenu.remove(radioItem);
- }
- else
- {
- radioItem.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent evt)
- {
- userDefinedColour_actionPerformed(evt);
- }
- });
- }
- }
- });
- radioItem.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent evt)
- {
- userDefinedColour_actionPerformed(evt);
- }
- });
- colourMenu.insert(radioItem, 15);
- colours.add(radioItem);
- }
- }
- colours.add(noColourmenuItem);
- colours.add(clustalColour);
- colours.add(zappoColour);
- colours.add(taylorColour);
- colours.add(hydrophobicityColour);
- colours.add(helixColour);
- colours.add(strandColour);
- colours.add(turnColour);
- colours.add(buriedColour);
- colours.add(userDefinedColour);
- 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(
- Preferences.DEFAULT_COLOUR, "None"));
- }
-
- public void setColourSelected(String defaultColour)
- {
-
- if (defaultColour != null)
- {
- int index = ColourSchemeProperty
- .getColourIndexFromName(defaultColour);
-
- switch (index)
- {
- case ColourSchemeProperty.CLUSTAL:
- clustalColour.setSelected(true);
-
- break;
-
- case ColourSchemeProperty.BLOSUM:
- BLOSUM62Colour.setSelected(true);
-
- break;
-
- case ColourSchemeProperty.PID:
- PIDColour.setSelected(true);
-
- break;
-
- case ColourSchemeProperty.ZAPPO:
- zappoColour.setSelected(true);
-
- break;
-
- case ColourSchemeProperty.TAYLOR:
- taylorColour.setSelected(true);
- break;
-
- case ColourSchemeProperty.HYDROPHOBIC:
- hydrophobicityColour.setSelected(true);
-
- break;
-
- case ColourSchemeProperty.HELIX:
- helixColour.setSelected(true);
-
- break;
-
- case ColourSchemeProperty.STRAND:
- strandColour.setSelected(true);
-
- break;
-
- case ColourSchemeProperty.TURN:
- turnColour.setSelected(true);
-
- break;
-
- case ColourSchemeProperty.BURIED:
- buriedColour.setSelected(true);
-
- break;
-
- case ColourSchemeProperty.NUCLEOTIDE:
- nucleotideColour.setSelected(true);
-
- 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);
-
- break;
- case ColourSchemeProperty.NONE:
- default:
- noColourmenuItem.setSelected(true);
- break;
-
- }
- }
-
}
private void jbInit() throws Exception
{
+ initColourMenu();
+
JMenuItem saveAs = new JMenuItem(
MessageManager.getString("action.save_as"));
ActionListener al = new ActionListener()
saveAs_actionPerformed(e);
}
};
+
+ // FIXME getDefaultToolkit throws an exception in Headless mode
KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, Toolkit
.getDefaultToolkit().getMenuShortcutKeyMask()
| KeyEvent.SHIFT_MASK, false);
}
});
showNonconservedMenuItem.setText(MessageManager
- .getString("label.show_non_conversed"));
+ .getString("label.show_non_conserved"));
showNonconservedMenuItem.setState(false);
showNonconservedMenuItem.addActionListener(new ActionListener()
{
PCAMenuItem_actionPerformed(e);
}
});
- JMenuItem averageDistanceTreeMenuItem = new JMenuItem(
- MessageManager.getString("label.average_distance_identity"));
- averageDistanceTreeMenuItem.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- averageDistanceTreeMenuItem_actionPerformed(e);
- }
- });
- JMenuItem neighbourTreeMenuItem = new JMenuItem(
- MessageManager.getString("label.neighbour_joining_identity"));
- neighbourTreeMenuItem.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- neighbourTreeMenuItem_actionPerformed(e);
- }
- });
this.getContentPane().setLayout(new BorderLayout());
alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));
statusBar.setText(MessageManager.getString("label.status_bar"));
outputTextboxMenu.setText(MessageManager
.getString("label.out_to_textbox"));
- clustalColour.setText(MessageManager.getString("label.clustalx"));
- clustalColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- clustalColour_actionPerformed(e);
- }
- });
- zappoColour.setText(MessageManager.getString("label.zappo"));
- zappoColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- zappoColour_actionPerformed(e);
- }
- });
- taylorColour.setText(MessageManager.getString("label.taylor"));
- taylorColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- taylorColour_actionPerformed(e);
- }
- });
- hydrophobicityColour.setText(MessageManager
- .getString("label.hydrophobicity"));
- hydrophobicityColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- hydrophobicityColour_actionPerformed(e);
- }
- });
- helixColour.setText(MessageManager.getString("label.helix_propensity"));
- helixColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- helixColour_actionPerformed(e);
- }
- });
- strandColour.setText(MessageManager
- .getString("label.strand_propensity"));
- strandColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- strandColour_actionPerformed(e);
- }
- });
- turnColour.setText(MessageManager.getString("label.turn_propensity"));
- turnColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- turnColour_actionPerformed(e);
- }
- });
- buriedColour.setText(MessageManager.getString("label.buried_index"));
- buriedColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- buriedColour_actionPerformed(e);
- }
- });
- userDefinedColour.setText(MessageManager
- .getString("action.user_defined"));
- userDefinedColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- userDefinedColour_actionPerformed(e);
- }
- });
- PIDColour
- .setText(MessageManager.getString("label.percentage_identity"));
- PIDColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- PIDColour_actionPerformed(e);
- }
- });
- BLOSUM62Colour
- .setText(MessageManager.getString("label.blosum62_score"));
- BLOSUM62Colour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- BLOSUM62Colour_actionPerformed(e);
- }
- });
- nucleotideColour.setText(MessageManager.getString("label.nucleotide"));
- nucleotideColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- nucleotideColour_actionPerformed(e);
- }
- });
- purinePyrimidineColour.setText(MessageManager
- .getString("label.purine_pyrimidine"));
- purinePyrimidineColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- purinePyrimidineColour_actionPerformed(e);
- }
- });
-
- RNAInteractionColour.setText("RNA Interaction type");
- RNAInteractionColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- RNAInteractionColour_actionPerformed(e);
- }
- });
- /*
- * covariationColour.setText("Covariation");
- * covariationColour.addActionListener(new ActionListener() { public void
- * actionPerformed(ActionEvent e) { covariationColour_actionPerformed(e); }
- * });
- */
-
- JMenuItem avDistanceTreeBlosumMenuItem = new JMenuItem(
- MessageManager.getString("label.average_distance_bloslum62"));
- avDistanceTreeBlosumMenuItem.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- avTreeBlosumMenuItem_actionPerformed(e);
- }
- });
- JMenuItem njTreeBlosumMenuItem = new JMenuItem(
- MessageManager.getString("label.neighbour_blosum62"));
- njTreeBlosumMenuItem.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- njTreeBlosumMenuItem_actionPerformed(e);
- }
- });
annotationPanelMenuItem.setActionCommand("");
annotationPanelMenuItem.setText(MessageManager
.getString("label.show_annotations"));
sortAnnotations_actionPerformed();
}
});
- colourTextMenuItem.setText(MessageManager
+ colourTextMenuItem = new JCheckBoxMenuItem(
+ MessageManager
.getString("label.colour_text"));
colourTextMenuItem.addActionListener(new ActionListener()
{
};
addMenuActionAndAccelerator(keyStroke, redoMenuItem, al);
- conservationMenuItem.setText(MessageManager
- .getString("action.by_conservation"));
- conservationMenuItem.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- conservationMenuItem_actionPerformed(e);
- }
- });
- noColourmenuItem.setText(MessageManager.getString("label.none"));
- noColourmenuItem.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- noColourmenuItem_actionPerformed(e);
- }
- });
wrapMenuItem.setText(MessageManager.getString("label.wrap"));
wrapMenuItem.addActionListener(new ActionListener()
{
};
addMenuActionAndAccelerator(keyStroke, findMenuItem, al);
- abovePIDThreshold.setText(MessageManager
- .getString("label.above_identity_threshold"));
- abovePIDThreshold.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- abovePIDThreshold_actionPerformed(e);
- }
- });
showSeqFeatures.setText(MessageManager
.getString("label.show_sequence_features"));
showSeqFeatures.addActionListener(new ActionListener()
}
});
- nucleotideColour.setText(MessageManager.getString("label.nucleotide"));
- nucleotideColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- nucleotideColour_actionPerformed(e);
- }
- });
-
- tcoffeeColour.setText(MessageManager.getString("label.tcoffee_scores"));
- tcoffeeColour.setEnabled(false);
- tcoffeeColour.addActionListener(new ActionListener()
- {
-
- @Override
- public void actionPerformed(ActionEvent e)
- {
- tcoffeeColorScheme_actionPerformed(e);
- }
- });
-
JMenuItem deleteGroups = new JMenuItem(
MessageManager.getString("action.undefine_groups"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U, Toolkit
};
addMenuActionAndAccelerator(keyStroke, deleteGroups, al);
+ JMenuItem annotationColumn = new JMenuItem(
+ MessageManager.getString("action.select_by_annotation"));
+ annotationColumn.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ annotationColumn_actionPerformed(e);
+ }
+ });
+
JMenuItem createGroup = new JMenuItem(
- MessageManager.getString("action.create_groups"));
+ MessageManager.getString("action.create_group"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, Toolkit
.getDefaultToolkit().getMenuShortcutKeyMask(), false);
al = new ActionListener()
};
addMenuActionAndAccelerator(keyStroke, pasteThis, al);
- applyToAllGroups.setText(MessageManager
- .getString("label.apply_colour_to_all_groups"));
- applyToAllGroups.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- applyToAllGroups_actionPerformed(e);
- }
- });
JMenuItem createPNG = new JMenuItem("PNG");
createPNG.addActionListener(new ActionListener()
{
});
- JMenuItem modifyPID = new JMenuItem(
- MessageManager.getString("label.modify_identity_threshold"));
- modifyPID.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- modifyPID_actionPerformed(e);
- }
- });
- modifyConservation.setText(MessageManager
- .getString("label.modify_conservation_threshold"));
- modifyConservation.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- modifyConservation_actionPerformed(e);
- }
- });
sortByTreeMenu
.setText(MessageManager.getString("action.by_tree_order"));
sort.setText(MessageManager.getString("action.sort"));
@Override
public void menuSelected(MenuEvent e)
{
- buildTreeMenu();
+ buildTreeSortMenu();
}
@Override
});
sortByAnnotScore.setVisible(false);
- calculateTree
- .setText(MessageManager.getString("action.calculate_tree"));
+ calculateTree.setText(MessageManager
+ .getString("action.calculate_tree_pca"));
padGapsMenuitem.setText(MessageManager.getString("label.pad_gaps"));
padGapsMenuitem.setState(jalview.bin.Cache
}
});
- JMenuItem annotationColour = new JMenuItem(
- MessageManager.getString("action.by_annotation"));
- annotationColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- annotationColour_actionPerformed(e);
- }
- });
-
- JMenuItem annotationColumn = new JMenuItem(
- MessageManager.getString("action.select_by_annotation"));
- annotationColumn.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- annotationColumn_actionPerformed(e);
- }
- });
-
- rnahelicesColour.setText(MessageManager
- .getString("action.by_rna_helixes"));
- rnahelicesColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- rnahelicesColour_actionPerformed(e);
- }
- });
-
JMenuItem associatedData = new JMenuItem(
MessageManager.getString("label.load_features_annotations"));
associatedData.addActionListener(new ActionListener()
tabbedPane.setToolTipText("<html><i>"
+ MessageManager.getString("label.rename_tab_eXpand_reGroup")
+ "</i></html>");
- JMenuItem textColour = new JMenuItem(
- MessageManager.getString("action.set_text_colour"));
- textColour.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- textColour_actionPerformed(e);
- }
- });
+
formatMenu.setText(MessageManager.getString("action.format"));
JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
+
idRightAlign.setText(MessageManager
.getString("label.right_align_sequence_id"));
idRightAlign.addActionListener(new ActionListener()
alignmentProperties();
}
});
+ JMenuItem selectHighlighted = new JMenuItem(
+ MessageManager.getString("action.select_highlighted_columns"));
+ selectHighlighted.setToolTipText(MessageManager
+ .getString("tooltip.select_highlighted_columns"));
+ al = new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent actionEvent)
+ {
+ selectHighlightedColumns_actionPerformed(actionEvent);
+ }
+ };
+ selectHighlighted.addActionListener(al);
JMenu tooltipSettingsMenu = new JMenu(
MessageManager.getString("label.sequence_id_tooltip"));
JMenu autoAnnMenu = new JMenu(
autoAnnMenu.add(showGroupConsensus);
annotationsMenu.add(autoAnnMenu);
- colourMenu.add(applyToAllGroups);
- colourMenu.add(textColour);
- colourMenu.addSeparator();
- colourMenu.add(noColourmenuItem);
- colourMenu.add(clustalColour);
- colourMenu.add(BLOSUM62Colour);
- colourMenu.add(PIDColour);
- colourMenu.add(zappoColour);
- colourMenu.add(taylorColour);
- colourMenu.add(hydrophobicityColour);
- colourMenu.add(helixColour);
- colourMenu.add(strandColour);
- 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);
- colourMenu.add(modifyConservation);
- colourMenu.add(abovePIDThreshold);
- colourMenu.add(modifyPID);
- colourMenu.add(annotationColour);
- colourMenu.add(rnahelicesColour);
sort.add(sortIDMenuItem);
sort.add(sortLengthMenuItem);
calculateMenu.add(calculateTree);
calculateMenu.addSeparator();
calculateMenu.add(pairwiseAlignmentMenuItem);
- calculateMenu.add(PCAMenuItem);
+ // calculateMenu.add(PCAMenuItem);
calculateMenu.addSeparator();
calculateMenu.add(showTranslation);
calculateMenu.add(showReverse);
selectMenu.add(grpsFromSelection);
selectMenu.add(deleteGroups);
selectMenu.add(annotationColumn);
+ selectMenu.add(selectHighlighted);
// TODO - determine if the listenToViewSelections button is needed : see bug
// JAL-574
// selectMenu.addSeparator();
// selectMenu.add(listenToViewSelections);
}
+ protected void configureSelectMenu()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * Constructs the entries on the Colour menu (but does not add them to the
+ * menu).
+ */
+ protected void initColourMenu()
+ {
+ applyToAllGroups = new JCheckBoxMenuItem(
+ MessageManager.getString("label.apply_colour_to_all_groups"));
+ applyToAllGroups.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ applyToAllGroups_actionPerformed(applyToAllGroups.isSelected());
+ }
+ });
+
+ textColour = new JMenuItem(
+ MessageManager.getString("label.text_colour"));
+ textColour.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ textColour_actionPerformed();
+ }
+ });
+
+ conservationMenuItem = new JCheckBoxMenuItem(
+ MessageManager.getString("action.by_conservation"));
+ conservationMenuItem.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ conservationMenuItem_actionPerformed(conservationMenuItem
+ .isSelected());
+ }
+ });
+
+ abovePIDThreshold = new JCheckBoxMenuItem(
+ MessageManager.getString("label.above_identity_threshold"));
+ abovePIDThreshold.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ abovePIDThreshold_actionPerformed(abovePIDThreshold.isSelected());
+ }
+ });
+ modifyPID = new JMenuItem(
+ MessageManager.getString("label.modify_identity_threshold"));
+ modifyPID.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ modifyPID_actionPerformed();
+ }
+ });
+ modifyConservation = new JMenuItem(
+ MessageManager
+ .getString("label.modify_conservation_threshold"));
+ modifyConservation.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ modifyConservation_actionPerformed();
+ }
+ });
+
+ annotationColour = new JMenuItem(
+ MessageManager.getString("action.by_annotation"));
+ annotationColour.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ annotationColour_actionPerformed();
+ }
+ });
+ }
+
+ protected void selectHighlightedColumns_actionPerformed(
+ ActionEvent actionEvent)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
/**
* Generate the reverse sequence (or reverse complement if the flag is true)
* and add it to the alignment
{
}
- protected void averageDistanceTreeMenuItem_actionPerformed(ActionEvent e)
- {
- }
-
protected void neighbourTreeMenuItem_actionPerformed(ActionEvent e)
{
}
- protected void njTreeBlosumMenuItem_actionPerformed(ActionEvent e)
- {
- }
-
- protected void avTreeBlosumMenuItem_actionPerformed(ActionEvent e)
- {
- }
-
- protected void clustalColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void zappoColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void taylorColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void hydrophobicityColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void helixColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void strandColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void turnColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void buriedColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void userDefinedColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void PIDColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void BLOSUM62Colour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void purinePyrimidineColour_actionPerformed(ActionEvent e)
- {
- }
-
- protected void RNAInteractionColour_actionPerformed(ActionEvent e)
- {
- }
-
- /*
- * protected void covariationColour_actionPerformed(ActionEvent e) { }
- */
-
- protected void noColourmenuItem_actionPerformed(ActionEvent e)
- {
- }
-
- protected void conservationMenuItem_actionPerformed(ActionEvent e)
+ protected void conservationMenuItem_actionPerformed(boolean selected)
{
}
{
}
- protected void abovePIDThreshold_actionPerformed(ActionEvent e)
+ protected void abovePIDThreshold_actionPerformed(boolean selected)
{
}
{
}
- protected void nucleotideColour_actionPerformed(ActionEvent e)
- {
- }
-
protected void deleteGroups_actionPerformed(ActionEvent e)
{
}
{
}
- protected void applyToAllGroups_actionPerformed(ActionEvent e)
+ protected void applyToAllGroups_actionPerformed(boolean selected)
{
}
}
- /**
- * Template method to handle the 'Color T-Coffee scores' menu event.
- * <p>
- * 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)
{
}
{
}
- protected void modifyPID_actionPerformed(ActionEvent e)
+ protected void modifyPID_actionPerformed()
{
}
- protected void modifyConservation_actionPerformed(ActionEvent e)
+ protected void modifyConservation_actionPerformed()
{
}
}
- public void annotationColour_actionPerformed(ActionEvent e)
+ public void annotationColour_actionPerformed()
{
-
}
public void annotationColumn_actionPerformed(ActionEvent e)
{
-
- }
-
- public void rnahelicesColour_actionPerformed(ActionEvent e)
- {
-
}
public void associatedData_actionPerformed(ActionEvent e)
}
- public void textColour_actionPerformed(ActionEvent e)
+ public void textColour_actionPerformed()
{
}
}
- public void buildTreeMenu()
+ public void buildTreeSortMenu()
{
}