use of net.sf.mzmine.parameters.dialogs.ParameterSetupDialog in project mzmine2 by mzmine.
the class SimpleParameterSet method showSetupDialog.
@Override
public ExitCode showSetupDialog(Window parent, boolean valueCheckRequired) {
if ((parameters == null) || (parameters.length == 0))
return ExitCode.OK;
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 IsotopePeakScannerParameters method showSetupDialog.
@Override
public ExitCode showSetupDialog(Window parent, boolean valueCheckRequired) {
if ((getParameters() == null) || (getParameters().length == 0))
return ExitCode.OK;
ParameterSetupDialog dialog = new IsotopePeakScannerSetupDialog(parent, valueCheckRequired, this);
dialog.setVisible(true);
return dialog.getExitCode();
}
use of net.sf.mzmine.parameters.dialogs.ParameterSetupDialog in project mzmine2 by mzmine.
the class BaselineCorrectionParameters method showSetupDialog.
/**
* Use an InstantUpdateSetupDialog setup dialog instead of the regular one.
*/
@Override
public ExitCode showSetupDialog(Window parent, boolean valueCheckRequired) {
Parameter<?>[] parameters = this.getParameters();
if ((parameters == null) || (parameters.length == 0))
return ExitCode.OK;
thisParameters = this;
ParameterSetupDialog dialog = new InstantUpdateSetupDialog(parent, valueCheckRequired, this);
dialog.setVisible(true);
return dialog.getExitCode();
}
use of net.sf.mzmine.parameters.dialogs.ParameterSetupDialog in project mzmine2 by mzmine.
the class RTRangeComponent method actionPerformed.
@Override
public void actionPerformed(ActionEvent event) {
Object src = event.getSource();
if (src == setAutoButton) {
RawDataFile[] currentFiles = MZmineCore.getProjectManager().getCurrentProject().getDataFiles();
try {
ParameterSetupDialog setupDialog = (ParameterSetupDialog) SwingUtilities.getWindowAncestor(this);
RawDataFilesComponent rdc = (RawDataFilesComponent) setupDialog.getComponentForParameter(new RawDataFilesParameter());
// is probably in the parent dialog, so let's check it
if (rdc == null) {
setupDialog = (ParameterSetupDialog) setupDialog.getParent();
if (setupDialog != null) {
rdc = (RawDataFilesComponent) setupDialog.getComponentForParameter(new RawDataFilesParameter());
}
}
if (rdc != null) {
RawDataFile[] matchingFiles = rdc.getValue().getMatchingRawDataFiles();
if (matchingFiles.length > 0)
currentFiles = matchingFiles;
}
} catch (Exception e) {
e.printStackTrace();
}
Range<Double> rtRange = null;
for (RawDataFile file : currentFiles) {
Range<Double> fileRange = file.getDataRTRange();
if (rtRange == null)
rtRange = fileRange;
else
rtRange = rtRange.span(fileRange);
}
setValue(rtRange);
}
}
Aggregations