import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
+@SuppressWarnings("serial")
public class GAlignFrame extends JInternalFrame
{
protected JMenuBar alignFrameMenuBar = new JMenuBar();
protected JMenuItem closeMenuItem = new JMenuItem();
- protected JMenu webService = new JMenu();
+ public JMenu webService = new JMenu();// BH 2019 was protected, but not
+ // sufficient for AlignFrame thread run
+ // JBP - followed suite for these other service related GUI elements.
+ // TODO: check we really need these to be public
+ public JMenu hmmerMenu = new JMenu();
- protected JMenu hmmerMenu = new JMenu();
-
- protected JMenuItem webServiceNoServices;
+ public JMenuItem webServiceNoServices;
protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
protected JMenu sortByAnnotScore = new JMenu();
- protected JLabel statusBar = new JLabel();
+ public JLabel statusBar = new JLabel(); // BH 2019 was protected, but not
+ // sufficient for
+ // AlignFrame.printWriter
protected JMenu outputTextboxMenu = new JMenu();
protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
+ protected JMenuItem openFeatureSettings;
+
private SequenceAnnotationOrder annotationSortOrder;
private boolean showAutoCalculatedAbove = false;
{
try
{
+
+ // for Web-page embedding using id=align-frame-div
+ setName("jalview-alignment");
+
jbInit();
setJMenuBar(alignFrameMenuBar);
@Override
public void actionPerformed(ActionEvent e)
{
- outputText_actionPerformed(e);
+ outputText_actionPerformed(e.getActionCommand());
}
});
System.err.println(e.toString());
}
- if (!Platform.isAMac())
+ if (Platform.allowMnemonics()) // was "not mac and not JS"
{
closeMenuItem.setMnemonic('C');
outputTextboxMenu.setMnemonic('T');
@Override
public void actionPerformed(ActionEvent e)
{
- saveAs_actionPerformed(e);
+ saveAs_actionPerformed();
}
};
sortGroupMenuItem_actionPerformed(e);
}
});
+ JMenuItem sortEValueMenuItem = new JMenuItem(
+ MessageManager.getString("action.by_evalue"));
+ sortEValueMenuItem.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ sortEValueMenuItem_actionPerformed(e);
+ }
+ });
+ JMenuItem sortBitScoreMenuItem = new JMenuItem(
+ MessageManager.getString("action.by_bit_score"));
+ sortBitScoreMenuItem.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ sortBitScoreMenuItem_actionPerformed(e);
+ }
+ });
JMenuItem removeRedundancyMenuItem = new JMenuItem(
MessageManager.getString("action.remove_redundancy"));
}
};
addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
+
+ JMenuItem filterByEValue = new JMenuItem(
+ MessageManager.getString("action.filter_by_evalue"));
+ filterByEValue.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ filterByEValue_actionPerformed();
+ }
+
+ });
+
+ JMenuItem filterByScore = new JMenuItem(
+ MessageManager.getString("action.filter_by_score"));
+ filterByScore.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ filterByScore_actionPerformed();
+ }
+
+ });
JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
MessageManager.getString("action.pairwise_alignment"));
@Override
public void actionPerformed(ActionEvent e)
{
- copy_actionPerformed(e);
+ copy_actionPerformed();
}
};
addMenuActionAndAccelerator(keyStroke, copy, al);
@Override
public void actionPerformed(ActionEvent e)
{
- cut_actionPerformed(e);
+ cut_actionPerformed();
}
};
addMenuActionAndAccelerator(keyStroke, cut, al);
@Override
public void actionPerformed(ActionEvent e)
{
- delete_actionPerformed(e);
+ delete_actionPerformed();
}
});
/*
* Translate as cDNA with sub-menu of translation tables
*/
- showTranslation.setText(MessageManager
- .getString("label.translate_cDNA"));
+ showTranslation
+ .setText(MessageManager.getString("label.translate_cDNA"));
boolean first = true;
for (final GeneticCodeI table : GeneticCodes.getInstance()
.getCodeTables())
runGroovy_actionPerformed();
}
});
-
- JMenuItem openFeatureSettings = new JMenuItem(
+
+ openFeatureSettings = new JMenuItem(
MessageManager.getString("action.feature_settings"));
openFeatureSettings.addActionListener(new ActionListener()
{
featureSettings_actionPerformed(e);
}
});
+
+ /*
+ * add sub-menu of database we can fetch from
+ */
JMenuItem fetchSequence = new JMenuItem(
MessageManager.getString("label.fetch_sequences"));
fetchSequence.addActionListener(new ActionListener()
@Override
public void actionPerformed(ActionEvent e)
{
- fetchSequence_actionPerformed(e);
+ fetchSequence_actionPerformed();
}
});
}
}
});
- loadVcf = new JMenuItem(MessageManager.getString("label.load_vcf_file"));
+ loadVcf = new JMenuItem(
+ MessageManager.getString("label.load_vcf_file"));
loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
loadVcf.addActionListener(new ActionListener()
{
selectHighlightedColumns_actionPerformed(actionEvent);
}
};
+ JMenuItem Filter = 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"));
alignFrameMenuBar.add(colourMenu);
alignFrameMenuBar.add(calculateMenu);
alignFrameMenuBar.add(webService);
- alignFrameMenuBar.add(hmmerMenu);
+ if (!Platform.isJS())
+ {
+ alignFrameMenuBar.add(hmmerMenu);
+ }
fileMenu.add(fetchSequence);
fileMenu.add(addSequenceMenu);
fileMenu.add(exportAnnotations);
fileMenu.add(loadTreeMenuItem);
fileMenu.add(associatedData);
- fileMenu.add(loadVcf);
+ if (!Platform.isJS())
+ {
+ fileMenu.add(loadVcf);
+ }
fileMenu.addSeparator();
fileMenu.add(closeMenuItem);
// editMenu.add(justifyRightMenuItem);
// editMenu.addSeparator();
editMenu.add(padGapsMenuitem);
+ editMenu.addSeparator();
+ editMenu.add(filterByEValue);
+ editMenu.add(filterByScore);
showMenu.add(showAllColumns);
showMenu.add(showAllSeqs);
sort.add(sortLengthMenuItem);
sort.add(sortGroupMenuItem);
sort.add(sortPairwiseMenuItem);
+ sort.add(sortEValueMenuItem);
+ sort.add(sortBitScoreMenuItem);
sort.add(sortByTreeMenu);
calculateMenu.add(sort);
calculateMenu.add(calculateTree);
calculateMenu.addSeparator();
calculateMenu.add(expandAlignment);
calculateMenu.add(extractScores);
- calculateMenu.addSeparator();
- calculateMenu.add(runGroovy);
-
+ if (!Platform.isJS())
+ {
+ calculateMenu.addSeparator();
+ calculateMenu.add(runGroovy);
+ }
webServiceNoServices = new JMenuItem(
MessageManager.getString("label.no_services"));
webService.add(webServiceNoServices);
- exportImageMenu.add(htmlMenuItem);
+ if (!Platform.isJS())
+ {
+ exportImageMenu.add(htmlMenuItem);
+ }
exportImageMenu.add(epsFile);
exportImageMenu.add(createPNG);
- exportImageMenu.add(createBioJS);
- exportImageMenu.add(createSVG);
+ if (!Platform.isJS())
+ {
+ exportImageMenu.add(createBioJS);
+ exportImageMenu.add(createSVG);
+ }
addSequenceMenu.add(addFromFile);
addSequenceMenu.add(addFromText);
addSequenceMenu.add(addFromURL);
{
}
- protected void outputText_actionPerformed(ActionEvent e)
+ protected void outputText_actionPerformed(String formatName)
{
}
{
}
+ protected void sortEValueMenuItem_actionPerformed(ActionEvent e)
+ {
+ }
+
+ protected void sortBitScoreMenuItem_actionPerformed(ActionEvent e)
+ {
+ }
+
protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
{
}
{
}
- protected void copy_actionPerformed(ActionEvent e)
+ protected void copy_actionPerformed()
{
}
- protected void cut_actionPerformed(ActionEvent e)
+ protected void cut_actionPerformed()
{
}
- protected void delete_actionPerformed(ActionEvent e)
+ protected void delete_actionPerformed()
{
}
{
}
+ protected void filterByEValue_actionPerformed()
+ {
+ }
+
+ protected void filterByScore_actionPerformed()
+ {
+ }
+
protected void scaleRight_actionPerformed(ActionEvent e)
{
}
{
}
- protected void saveAs_actionPerformed(ActionEvent e)
+ protected void saveAs_actionPerformed()
{
}
}
- public void fetchSequence_actionPerformed(ActionEvent e)
+ public void fetchSequence_actionPerformed()
{
}