import jalview.bin.Cache;
import jalview.gui.JvSwingUtils;
import jalview.gui.Preferences;
+import jalview.hmmer.HmmerCommand;
+import jalview.io.FileFormatException;
import jalview.io.FileFormats;
import jalview.util.MessageManager;
import jalview.util.Platform;
protected JMenu hmmerMenu = new JMenu();
- protected JMenuItem hmmAlign = new JMenuItem();
-
- protected JMenuItem hmmSearch = new JMenuItem();
-
- protected JMenuItem hmmBuild = new JCheckBoxMenuItem();
-
protected JMenuItem webServiceNoServices;
protected JCheckBoxMenuItem viewBoxesMenuItem = new JCheckBoxMenuItem();
protected JMenuItem runGroovy = new JMenuItem();
+ protected JMenuItem loadVcf;
+
protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
private void jbInit() throws Exception
{
initColourMenu();
- initHMMERMenu();
JMenuItem saveAs = new JMenuItem(
MessageManager.getString("action.save_as"));
JMenu calculateMenu = new JMenu(
MessageManager.getString("action.calculate"));
webService.setText(MessageManager.getString("action.web_service"));
- hmmerMenu.setText(MessageManager.getString("action.hmmer"));
- String status = Cache.getProperty("HMMER_FUNCTIONING");
- if ("false".equals(status) || status == null)
- {
- hmmerMenu.setEnabled(false);
- }
- else
- {
- hmmerMenu.setEnabled(true);
- }
- hmmerMenu.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- hmmerMenu_actionPerformed(e);
- }
- });
+
+ initHMMERMenu();
+
JMenuItem selectAllSequenceMenuItem = new JMenuItem(
MessageManager.getString("action.select_all"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
}
}
});
+ loadVcf = new JMenuItem(MessageManager.getString("label.load_vcf_file"));
+ loadVcf.setToolTipText(MessageManager.getString("label.load_vcf"));
+ loadVcf.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ loadVcf_actionPerformed();
+ }
+ });
autoCalculate.setText(
MessageManager.getString("label.autocalculate_consensus"));
autoCalculate.setState(
selectHighlightedColumns_actionPerformed(actionEvent);
}
};
- hmmBuild.setText(MessageManager.getString("label.hmmbuild"));
- hmmBuild.addActionListener(new ActionListener()
- {
-
- @Override
- public void actionPerformed(ActionEvent e)
- {
- try
- {
- hmmBuild_actionPerformed(e);
- } catch (IOException e1)
- {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- } catch (InterruptedException e1)
- {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- }
-
- });
- hmmAlign.setText(MessageManager.getString("label.hmmalign"));
- hmmAlign.addActionListener(new ActionListener()
- {
-
- @Override
- public void actionPerformed(ActionEvent e)
- {
- try
- {
- hmmAlign_actionPerformed(e);
- } catch (IOException e1)
- {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- } catch (InterruptedException e1)
- {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- }
-
- });
selectHighlighted.addActionListener(al);
JMenu tooltipSettingsMenu = new JMenu(
MessageManager.getString("label.sequence_id_tooltip"));
fileMenu.add(exportAnnotations);
fileMenu.add(loadTreeMenuItem);
fileMenu.add(associatedData);
+ fileMenu.add(loadVcf);
fileMenu.addSeparator();
fileMenu.add(closeMenuItem);
// selectMenu.add(listenToViewSelections);
}
- public void hmmerMenu_actionPerformed(ActionEvent e)
+ /**
+ * Constructs the entries on the HMMER menu
+ */
+ protected void initHMMERMenu()
{
+ /*
+ * hmmbuild
+ */
+ JMenu hmmBuild = new JMenu(MessageManager.getString("label.hmmbuild"));
+ JMenuItem hmmBuildSettings = new JMenuItem(
+ MessageManager.getString("label.edit_settings_and_run"));
+ hmmBuildSettings.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ hmmBuild_actionPerformed(false);
+ }
+ });
+ JMenuItem hmmBuildRun = new JMenuItem(MessageManager.formatMessage(
+ "label.action_with_default_settings", "hmmbuild"));
+ hmmBuildRun.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ hmmBuild_actionPerformed(true);
+ }
+ });
+ hmmBuild.add(hmmBuildRun);
+ hmmBuild.add(hmmBuildSettings);
+
+ /*
+ * hmmalign
+ */
+ JMenu hmmAlign = new JMenu(MessageManager.getString("label.hmmalign"));
+ JMenuItem hmmAlignRun = new JMenuItem(MessageManager.formatMessage(
+ "label.action_with_default_settings", "hmmalign"));
+ hmmAlignRun.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ hmmAlign_actionPerformed(true);
+ }
+ });
+ JMenuItem hmmAlignSettings = new JMenuItem(
+ MessageManager.getString("label.edit_settings_and_run"));
+ hmmAlignSettings.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ hmmAlign_actionPerformed(false);
+ }
+ });
+ hmmAlign.add(hmmAlignRun);
+ hmmAlign.add(hmmAlignSettings);
+
+ /*
+ * hmmsearch
+ */
+ JMenu hmmSearch = new JMenu(
+ MessageManager.getString("label.hmmsearch"));
+ JMenuItem hmmSearchSettings = new JMenuItem(
+ MessageManager.getString("label.edit_settings_and_run"));
+ hmmSearchSettings.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ hmmSearch_actionPerformed(false);
+ }
+ });
+ JMenuItem hmmSearchRun = new JMenuItem(MessageManager.formatMessage(
+ "label.action_with_default_settings", "hmmsearch"));
+ hmmSearchRun.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ hmmSearch_actionPerformed(true);
+ }
+ });
+ JMenuItem addDatabase = new JMenuItem(
+ MessageManager.getString("label.add_database"));
+ addDatabase.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ try
+ {
+ addDatabase_actionPerformed();
+ } catch (IOException e1)
+ {
+ e1.printStackTrace();
+ }
+ }
+ });
+ hmmSearch.add(hmmSearchSettings);
+ hmmSearch.add(hmmSearchRun);
+ hmmSearch.add(addDatabase);
+
+ /*
+ * top level menu
+ */
+ hmmerMenu.setText(MessageManager.getString("action.hmmer"));
+ hmmerMenu.setEnabled(HmmerCommand.isHmmerAvailable());
+ hmmerMenu.add(hmmBuild);
+ hmmerMenu.add(hmmAlign);
+ hmmerMenu.add(hmmSearch);
}
- /**
- * Constructs the entries on the HMMER menu (does not add them to the menu).
- */
- protected void initHMMERMenu()
+ protected void loadVcf_actionPerformed()
{
- hmmAlign = new JMenuItem(MessageManager.getString("label.hmmalign"));
- hmmBuild = new JMenuItem(MessageManager.getString("label.hmmbuild"));
- hmmSearch = new JMenuItem(MessageManager.getString("label.hmmsearch"));
}
/**
{
}
- protected void autoAlignSeqs_actionPerformed(boolean selected)
+ protected void hmmBuild_actionPerformed(boolean withDefaults)
{
}
- protected void hmmAlign_actionPerformed(ActionEvent e)
- throws IOException, InterruptedException
+ protected void hmmSearch_actionPerformed(boolean withDefaults)
{
}
- protected void changeHMMERLocation_actionPerformed(ActionEvent e)
- {
- }
-
- protected void hmmBuild_actionPerformed(ActionEvent e)
- throws IOException, InterruptedException
+ protected void addDatabase_actionPerformed()
+ throws FileFormatException, IOException
{
}
- protected void hmmSearch_actionPerformed(ActionEvent e)
+ protected void hmmAlign_actionPerformed(boolean withDefaults)
{
}
protected void showComplement_actionPerformed(boolean complement)
{
}
-
- protected void showInformationHistogram_actionPerformed(ActionEvent e)
- {
- // TODO Auto-generated method stub
-
- }
-
- protected void showHMMSequenceLogo_actionPerformed(ActionEvent e)
- {
-
- }
-
- protected void normaliseHMMSequenceLogo_actionPerformed(ActionEvent e)
- {
-
- }
}