Search in sources :

Example 21 with ParameterSetupDialog

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();
}
Also used : ParameterSetupDialog(net.sf.mzmine.parameters.dialogs.ParameterSetupDialog)

Example 22 with ParameterSetupDialog

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();
}
Also used : ParameterSetupDialog(net.sf.mzmine.parameters.dialogs.ParameterSetupDialog)

Example 23 with ParameterSetupDialog

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();
}
Also used : BooleanParameter(net.sf.mzmine.parameters.parametertypes.BooleanParameter) RawDataFilesParameter(net.sf.mzmine.parameters.parametertypes.selectors.RawDataFilesParameter) Parameter(net.sf.mzmine.parameters.Parameter) StringParameter(net.sf.mzmine.parameters.parametertypes.StringParameter) ModuleComboParameter(net.sf.mzmine.parameters.parametertypes.ModuleComboParameter) IntegerParameter(net.sf.mzmine.parameters.parametertypes.IntegerParameter) DoubleParameter(net.sf.mzmine.parameters.parametertypes.DoubleParameter) ComboParameter(net.sf.mzmine.parameters.parametertypes.ComboParameter) ParameterSetupDialog(net.sf.mzmine.parameters.dialogs.ParameterSetupDialog)

Example 24 with ParameterSetupDialog

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);
    }
}
Also used : RawDataFilesComponent(net.sf.mzmine.parameters.parametertypes.selectors.RawDataFilesComponent) RawDataFile(net.sf.mzmine.datamodel.RawDataFile) ParameterSetupDialog(net.sf.mzmine.parameters.dialogs.ParameterSetupDialog) RawDataFilesParameter(net.sf.mzmine.parameters.parametertypes.selectors.RawDataFilesParameter)

Aggregations

ParameterSetupDialog (net.sf.mzmine.parameters.dialogs.ParameterSetupDialog)24 RawDataFile (net.sf.mzmine.datamodel.RawDataFile)3 UserParameter (net.sf.mzmine.parameters.UserParameter)3 RawDataFilesParameter (net.sf.mzmine.parameters.parametertypes.selectors.RawDataFilesParameter)3 Window (java.awt.Window)2 JComponent (javax.swing.JComponent)2 Parameter (net.sf.mzmine.parameters.Parameter)2 BooleanParameter (net.sf.mzmine.parameters.parametertypes.BooleanParameter)2 DoubleParameter (net.sf.mzmine.parameters.parametertypes.DoubleParameter)2 IntegerParameter (net.sf.mzmine.parameters.parametertypes.IntegerParameter)2 ModuleComboParameter (net.sf.mzmine.parameters.parametertypes.ModuleComboParameter)2 RawDataFilesComponent (net.sf.mzmine.parameters.parametertypes.selectors.RawDataFilesComponent)2 Collection (java.util.Collection)1 JButton (javax.swing.JButton)1 MZmineProject (net.sf.mzmine.datamodel.MZmineProject)1 Scan (net.sf.mzmine.datamodel.Scan)1 DelayedDocumentListener (net.sf.mzmine.framework.listener.DelayedDocumentListener)1 MZmineCore (net.sf.mzmine.main.MZmineCore)1 MZmineProcessingStep (net.sf.mzmine.modules.MZmineProcessingStep)1 MassListDeisotoperParameters (net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.isotopes.MassListDeisotoperParameters)1