Search in sources :

Example 1 with DPPParameterValueWrapper

use of net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.datamodel.DPPParameterValueWrapper in project mzmine2 by mzmine.

the class ProcessingComponent method getValueFromComponent.

@Nonnull
public DPPParameterValueWrapper getValueFromComponent() {
    DPPParameterValueWrapper value = new DPPParameterValueWrapper();
    Boolean val = Boolean.valueOf(cbDiffMSn.isSelected());
    value.setDifferentiateMSn(val);
    for (MSLevel mslevel : MSLevel.cropValues()) value.setQueue(mslevel, getProcessingQueueFromNode(getNodeByMSLevel(mslevel)));
    return value;
}
Also used : DPPParameterValueWrapper(net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.datamodel.DPPParameterValueWrapper) MSLevel(net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.datamodel.MSLevel) Nonnull(javax.annotation.Nonnull)

Example 2 with DPPParameterValueWrapper

use of net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.datamodel.DPPParameterValueWrapper in project mzmine2 by mzmine.

the class ProcessingComponent method sendValueWrapper.

/**
 * Sends the queues to the DataPointProcessingManager.
 */
private void sendValueWrapper() {
    // if (((DefaultMutableTreeNode) tvProcessing.getModel().getRoot()).getChildCount() < 1)
    // return;
    List<String> errorMessage = new ArrayList<String>();
    DPPParameterValueWrapper value = getValueFromComponent();
    if (!value.checkValue(errorMessage))
        logger.info(errorMessage.toString());
    DataPointProcessingManager manager = DataPointProcessingManager.getInst();
// manager.clearProcessingSteps();
// manager.setProcessingParameters(value);
}
Also used : DataPointProcessingManager(net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.DataPointProcessingManager) ArrayList(java.util.ArrayList) DPPParameterValueWrapper(net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.datamodel.DPPParameterValueWrapper)

Example 3 with DPPParameterValueWrapper

use of net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.datamodel.DPPParameterValueWrapper in project mzmine2 by mzmine.

the class ProcessingComponent method actionPerformed.

@Override
public void actionPerformed(ActionEvent e) {
    if (e.getActionCommand().equals("BTN_ADD")) {
        addSelectedModule();
    } else if (e.getActionCommand().equals("BTN_REMOVE")) {
        removeModule();
    } else if (e.getActionCommand().equals("BTN_SET_PARAMETERS")) {
        DefaultMutableTreeNode item = getSelectedItem(tvProcessing);
        if (item != null)
            setParameters(item);
    } else if (e.getActionCommand().equals("BTN_LOAD")) {
        final File file = chooser.getLoadFile(this);
        if (file != null) {
            DPPParameterValueWrapper value = new DPPParameterValueWrapper();
            value.loadFromFile(file);
            setValueFromValueWrapper(value);
        }
    } else if (e.getActionCommand().equals("BTN_SAVE")) {
        final File file = chooser.getSaveFile(this, XML_EXTENSION);
        if (file != null) {
            DPPParameterValueWrapper value = getValueFromComponent();
            value.saveToFile(file);
        }
    } else if (e.getActionCommand().equals("CBX_DIFFMSN")) {
        msLevelNodes[MSLevel.MSMS.ordinal()].setEnabled(cbDiffMSn.isSelected());
        ((DefaultTreeModel) tvProcessing.getModel()).reload();
        expandAllNodes(tvProcessing);
    }
}
Also used : DefaultMutableTreeNode(javax.swing.tree.DefaultMutableTreeNode) DPPParameterValueWrapper(net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.datamodel.DPPParameterValueWrapper) File(java.io.File)

Aggregations

DPPParameterValueWrapper (net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.datamodel.DPPParameterValueWrapper)3 File (java.io.File)1 ArrayList (java.util.ArrayList)1 Nonnull (javax.annotation.Nonnull)1 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)1 DataPointProcessingManager (net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.DataPointProcessingManager)1 MSLevel (net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.datamodel.MSLevel)1