Search in sources :

Example 1 with DPPResultsDataSet

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

the class DPPSumFormulaPredictionTask method displayResults.

@Override
public void displayResults() {
    if (displayResults || getController().isLastTaskRunning()) {
        SpectraPlotUtils.clearDatasetLabelGenerators(getTargetPlot(), DPPResultsDataSet.class);
        DPPResultsLabelGenerator labelGen = new DPPResultsLabelGenerator(getTargetPlot());
        getTargetPlot().addDataSet(new DPPResultsDataSet("Sum formula prediction results (" + getResults().length + ")", getResults()), color, false, labelGen);
    }
}
Also used : DPPResultsDataSet(net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.datamodel.results.DPPResultsDataSet) DPPResultsLabelGenerator(net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.datamodel.results.DPPResultsLabelGenerator)

Example 2 with DPPResultsDataSet

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

the class SpectraPlot method removeDataPointProcessingResultDataSets.

public synchronized void removeDataPointProcessingResultDataSets() {
    for (int i = 0; i < plot.getDatasetCount(); i++) {
        XYDataset dataSet = plot.getDataset(i);
        if (dataSet instanceof DPPResultsDataSet) {
            plot.setDataset(i, null);
        }
    }
    // when adding DPPResultDataSet the label generator is overwritten, revert here
    SpectraItemLabelGenerator labelGenerator = new SpectraItemLabelGenerator(this);
    plot.getRenderer().setDefaultItemLabelGenerator(labelGenerator);
}
Also used : DPPResultsDataSet(net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.datamodel.results.DPPResultsDataSet) SpectraItemLabelGenerator(net.sf.mzmine.modules.visualization.spectra.simplespectra.renderers.SpectraItemLabelGenerator) XYDataset(org.jfree.data.xy.XYDataset)

Aggregations

DPPResultsDataSet (net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.datamodel.results.DPPResultsDataSet)2 DPPResultsLabelGenerator (net.sf.mzmine.modules.visualization.spectra.simplespectra.datapointprocessing.datamodel.results.DPPResultsLabelGenerator)1 SpectraItemLabelGenerator (net.sf.mzmine.modules.visualization.spectra.simplespectra.renderers.SpectraItemLabelGenerator)1 XYDataset (org.jfree.data.xy.XYDataset)1