import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridLayout;
+import java.awt.Menu;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusAdapter;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import javax.swing.BorderFactory;
import jalview.analysis.GeneticCodes;
import jalview.api.SplitContainerI;
import jalview.bin.Cache;
+import jalview.bin.Console;
import jalview.gui.JvSwingUtils;
import jalview.gui.Preferences;
import jalview.io.FileFormats;
-import jalview.io.exceptions.ImageOutputException;
+import jalview.log.JLoggerLog4j;
import jalview.schemes.ResidueColourScheme;
+import jalview.util.Log4j;
import jalview.util.MessageManager;
import jalview.util.Platform;
protected JMenuItem gatherViews = new JMenuItem();
protected JMenuItem expandViews = new JMenuItem();
+
+ protected JCheckBoxMenuItem threeDStructure = new JCheckBoxMenuItem();
+
+ protected JCheckBoxMenuItem jPred = new JCheckBoxMenuItem();
protected JCheckBoxMenuItem showGroupConsensus = new JCheckBoxMenuItem();
protected JCheckBoxMenuItem showGroupConservation = new JCheckBoxMenuItem();
- protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
+ protected JCheckBoxMenuItem showConsensusHistogram = new JCheckBoxMenuItem();
+
+ protected JCheckBoxMenuItem showSSConsensusHistogram = new JCheckBoxMenuItem();
protected JCheckBoxMenuItem showSequenceLogo = new JCheckBoxMenuItem();
{
try
{
+ setFrameIcon(null);
// for Web-page embedding using id=align-frame-div
setName("jalview-alignment");
}
} catch (Exception e)
{
- System.err.println(e.toString());
+ jalview.bin.Console.errPrintln(e.toString());
}
if (Platform.allowMnemonics()) // was "not mac and not JS"
addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
JMenuItem justifyLeftMenuItem = new JMenuItem(
- MessageManager.getString("action.left_justify_alignment"));
+ MessageManager.getString("action.left_justify"));
+ justifyLeftMenuItem.setToolTipText(
+ MessageManager.getString("tooltip.left_justify"));
justifyLeftMenuItem.addActionListener(new ActionListener()
{
@Override
}
});
JMenuItem justifyRightMenuItem = new JMenuItem(
- MessageManager.getString("action.right_justify_alignment"));
+ MessageManager.getString("action.right_justify"));
+ justifyRightMenuItem.setToolTipText(
+ MessageManager.getString("action.left_justify"));
+
justifyRightMenuItem.addActionListener(new ActionListener()
{
@Override
showConsensusHistogram_actionPerformed(e);
}
+ });
+ showSSConsensusHistogram.setText(
+ MessageManager.getString("label.show_ssconsensus_histogram"));
+ showSSConsensusHistogram.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ showConsensusHistogram_actionPerformed(e);
+ }
+
});
showSequenceLogo
.setText(MessageManager.getString("label.show_consensus_logo"));
};
addMenuActionAndAccelerator(keyStroke, copyHighlighted, al);
copyHighlighted.addActionListener(al);
+
+
+
+ ButtonGroup ssButtonGroup = new ButtonGroup();
+ final JRadioButtonMenuItem showAll = new JRadioButtonMenuItem(
+ MessageManager.getString("label.show_first"));
+ final JRadioButtonMenuItem showjPred = new JRadioButtonMenuItem(
+ MessageManager.getString("label.show_last"));
+ final JRadioButtonMenuItem show3DSS = new JRadioButtonMenuItem(
+ MessageManager.getString("label.show_last"));
+ ssButtonGroup.add(showAll);
+ ssButtonGroup.add(showjPred);
+ ssButtonGroup.add(show3DSS);
+ final boolean autoFirst1 = Cache
+ .getDefault(Preferences.SHOW_AUTOCALC_ABOVE, false);
+ showAll.setSelected(autoFirst1);
+ setShowAutoCalculatedAbove(autoFirst);
+ showAutoFirst.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ setShowAutoCalculatedAbove(showAutoFirst.isSelected());
+ sortAnnotations_actionPerformed();
+ }
+ });
+ showAutoLast.setSelected(!showAutoFirst.isSelected());
+ showAutoLast.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ setShowAutoCalculatedAbove(!showAutoLast.isSelected());
+ sortAnnotations_actionPerformed();
+ }
+ });
JMenu tooltipSettingsMenu = new JMenu(
MessageManager.getString("label.sequence_id_tooltip"));
JMenu autoAnnMenu = new JMenu(
MessageManager.getString("label.autocalculated_annotation"));
+ JMenu showSS = new JMenu(
+ MessageManager.getString("label.show_secondary_structure"));
+
+ showSS.addMouseListener(new MouseAdapter() {
+
+ @Override
+ public void mouseEntered(MouseEvent e) {
+
+ updateShowSSRadioButtons(showSS, ssButtonGroup); // Update radio buttons every time the menu is clicked
+
+ }
+ });
+
JMenu exportImageMenu = new JMenu(
MessageManager.getString("label.export_image"));
JMenu fileMenu = new JMenu(MessageManager.getString("action.file"));
editMenu.add(removeAllGapsMenuItem);
editMenu.add(removeRedundancyMenuItem);
editMenu.addSeparator();
- // dont add these yet in the CVS build - they cannot be undone!
- // Excluded from Jalview 2.5 release - undo needs to be implemented.
- // editMenu.add(justifyLeftMenuItem);
- // editMenu.add(justifyRightMenuItem);
- // editMenu.addSeparator();
+
+ editMenu.add(justifyLeftMenuItem);
+ editMenu.add(justifyRightMenuItem);
+
+ editMenu.addSeparator();
editMenu.add(padGapsMenuitem);
showMenu.add(showAllColumns);
annotationsMenu.add(sortAnnBySequence);
annotationsMenu.add(sortAnnByLabel);
annotationsMenu.addSeparator();
+ annotationsMenu.add(showSS);
+ annotationsMenu.addSeparator();
autoAnnMenu.add(showAutoFirst);
autoAnnMenu.add(showAutoLast);
autoAnnMenu.addSeparator();
autoAnnMenu.add(applyAutoAnnotationSettings);
autoAnnMenu.add(showConsensusHistogram);
+ autoAnnMenu.add(showSSConsensusHistogram);
autoAnnMenu.add(showSequenceLogo);
autoAnnMenu.add(normaliseSequenceLogo);
autoAnnMenu.addSeparator();
protected void createPNG_actionPerformed(ActionEvent object)
{
// TODO Auto-generated method stub
-
+
}
protected void createEPS_actionPerformed(ActionEvent object)
{
// TODO Auto-generated method stub
-
+
}
protected void createSVG_actionPerformed(ActionEvent object)
{
// TODO Auto-generated method stub
-
+
}
protected void copyHighlightedColumns_actionPerformed(
// TODO Auto-generated method stub
}
+
+ protected void showSSConsensusHistogram_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
protected void showSequenceLogo_actionPerformed(ActionEvent e)
{
{
}
-
protected void font_actionPerformed(ActionEvent e)
{
}
}
-
protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
{
protected void showComplement_actionPerformed(boolean complement)
{
}
+
+ protected List<String> updateShowSSRadioButtons()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ protected void updateShowSSRadioButtons(JMenu showSS,
+ ButtonGroup ssButtonGroup)
+ {
+ // TODO Auto-generated method stub
+ }
+
+ protected void showSS_actionPerformed(String ssSourceSelection)
+ {
+ // TODO Auto-generated method stub
+
+ }
}