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;
}
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);
}
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);
}
}
Aggregations