use of net.sf.mzmine.parameters.dialogs.ParameterSetupDialog in project mzmine2 by mzmine.
the class BatchModeParameters method showSetupDialog.
@Override
public ExitCode showSetupDialog(Window parent, boolean valueCheckRequired) {
ParameterSetupDialog dialog = new ParameterSetupDialog(parent, valueCheckRequired, this);
// set lastUsed files list
final BatchSetupComponent batchComponent = ((BatchSetupComponent) dialog.getComponentForParameter(batchQueue));
// new last used files are inserted to this list in the component
batchComponent.setLastFiles(lastFiles.getValue());
dialog.setVisible(true);
return dialog.getExitCode();
}
use of net.sf.mzmine.parameters.dialogs.ParameterSetupDialog in project mzmine2 by mzmine.
the class RowsFilterParameters method showSetupDialog.
@Override
public ExitCode showSetupDialog(Window parent, boolean valueCheckRequired) {
// Update the parameter choices
UserParameter<?, ?>[] newChoices = MZmineCore.getProjectManager().getCurrentProject().getParameters();
String[] choices;
if (newChoices == null || newChoices.length == 0) {
choices = new String[1];
choices[0] = "No parameters defined";
} else {
choices = new String[newChoices.length + 1];
choices[0] = "Ignore groups";
for (int i = 0; i < newChoices.length; i++) {
choices[i + 1] = "Filtering by " + newChoices[i].getName();
}
}
getParameter(RowsFilterParameters.GROUPSPARAMETER).setChoices(choices);
ParameterSetupDialog dialog = new ParameterSetupDialog(parent, valueCheckRequired, this);
dialog.setVisible(true);
return dialog.getExitCode();
}
use of net.sf.mzmine.parameters.dialogs.ParameterSetupDialog in project mzmine2 by mzmine.
the class IsotopePatternPreviewParameters method showSetupDialog.
@Override
public ExitCode showSetupDialog(Window parent, boolean valueCheckRequired) {
if ((getParameters() == null) || (getParameters().length == 0))
return ExitCode.OK;
ParameterSetupDialog dialog = new IsotopePatternPreviewDialog(parent, valueCheckRequired, this);
dialog.setVisible(true);
return dialog.getExitCode();
}
use of net.sf.mzmine.parameters.dialogs.ParameterSetupDialog in project mzmine2 by mzmine.
the class XICManualPickerParameters method showSetupDialog.
@Override
public ExitCode showSetupDialog(Window parent, boolean valueCheckRequired) {
ParameterSetupDialog dialog = new XICManualPickerDialog(MZmineCore.getDesktop().getMainWindow(), true, this);
dialog.setVisible(true);
return dialog.getExitCode();
}
use of net.sf.mzmine.parameters.dialogs.ParameterSetupDialog in project mzmine2 by mzmine.
the class ModuleComboComponent method actionPerformed.
public void actionPerformed(ActionEvent event) {
Object src = event.getSource();
MZmineProcessingStep<?> selected = (MZmineProcessingStep<?>) comboBox.getSelectedItem();
if (src == comboBox) {
if (selected == null) {
setButton.setEnabled(false);
return;
}
ParameterSet parameterSet = selected.getParameterSet();
int numOfParameters = parameterSet.getParameters().length;
setButton.setEnabled(numOfParameters > 0);
}
if (src == setButton) {
if (selected == null)
return;
ParameterSetupDialog dialog = (ParameterSetupDialog) SwingUtilities.getAncestorOfClass(ParameterSetupDialog.class, this);
if (dialog == null)
return;
ParameterSet parameterSet = selected.getParameterSet();
parameterSet.showSetupDialog(dialog, dialog.isValueCheckRequired());
}
}
Aggregations