Exemplo n.º 1
0
  /*.................................................................................................................*/
  public void actionPerformed(ActionEvent e) {
    if (e.getActionCommand().equalsIgnoreCase("setToDefaults")) {
      setDefaultTNTCommandsSearchOptions();
      searchField.setText(searchArguments);
      bootstrapSearchField.setText(bootstrapSearchArguments);
      harvestOnlyStrictConsensusBox.setState(harvestOnlyStrictConsensus);
      resamplingAllConsensusTreesBox.setState(!resamplingAllConsensusTrees);
      bootStrapRepsField.setValue(bootstrapreps);

    } else if (e.getActionCommand().equalsIgnoreCase("setToDefaultsOtherOptions")) {
      setDefaultTNTCommandsOtherOptions();
      otherOptionsField.setText(otherOptions);
      convertGapsBox.setState(convertGapsToMissing);
    } else if (e.getActionCommand().equalsIgnoreCase("browseSearchScript")
        && searchScriptPathField != null) {
      MesquiteString directoryName = new MesquiteString();
      MesquiteString fileName = new MesquiteString();
      String path =
          MesquiteFile.openFileDialog("Choose Search Script File", directoryName, fileName);
      if (StringUtil.notEmpty(path)) searchScriptPathField.setText(path);
    } else if (e.getActionCommand().equalsIgnoreCase("browseBootSearchScript")
        && bootSearchScriptPathField != null) {

      MesquiteString directoryName = new MesquiteString();
      MesquiteString fileName = new MesquiteString();
      String path =
          MesquiteFile.openFileDialog(
              "Choose Resampling Search Script File", directoryName, fileName);
      if (StringUtil.notEmpty(path)) bootSearchScriptPathField.setText(path);
    }
  }
  /*.................................................................................................................*/
  public void actionPerformed(ActionEvent e) {
    if (e.getActionCommand().equalsIgnoreCase("composeRAxMLCommand")) {

      MultipartEntityBuilder arguments = MultipartEntityBuilder.create();
      StringBuffer sb = new StringBuffer();
      getArguments(
          arguments,
          sb,
          "fileName",
          proteinModelField.getText(),
          dnaModelField.getText(),
          otherOptionsField.getText(),
          bootStrapRepsField.getValue(),
          bootstrapSeed,
          numRunsField.getValue(),
          outgroupTaxSetString,
          null,
          false);
      String command = externalProcRunner.getExecutableCommand() + arguments.toString();
      commandLabel.setText("This command will be used by CIPRes to run RAxML:");
      commandField.setText(command);
    } else if (e.getActionCommand().equalsIgnoreCase("clearCommand")) {
      commandField.setText("");
      commandLabel.setText("");
    }
  }