Search in sources :

Example 6 with ParameterSetupDialog

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

Example 7 with ParameterSetupDialog

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

Example 8 with ParameterSetupDialog

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

Example 9 with ParameterSetupDialog

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

Example 10 with ParameterSetupDialog

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

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