Search in sources :

Example 1 with PseudoSpectraItemLabelGenerator

use of net.sf.mzmine.modules.visualization.spectra.multimsms.pseudospectra.PseudoSpectraItemLabelGenerator in project mzmine2 by mzmine.

the class SpectrumChartFactory method createChartPanel.

public static EChartPanel createChartPanel(JFreeChart chart) {
    if (chart == null)
        return null;
    // 
    EChartPanel pn = new EChartPanel(chart);
    XYItemRenderer renderer = chart.getXYPlot().getRenderer();
    PseudoSpectraItemLabelGenerator labelGenerator = new PseudoSpectraItemLabelGenerator(pn);
    renderer.setDefaultItemLabelsVisible(true);
    renderer.setDefaultItemLabelPaint(Color.BLACK);
    renderer.setSeriesItemLabelGenerator(0, labelGenerator);
    return pn;
}
Also used : EChartPanel(net.sf.mzmine.chartbasics.gui.swing.EChartPanel) PseudoSpectraItemLabelGenerator(net.sf.mzmine.modules.visualization.spectra.multimsms.pseudospectra.PseudoSpectraItemLabelGenerator) XYItemRenderer(org.jfree.chart.renderer.xy.XYItemRenderer)

Aggregations

EChartPanel (net.sf.mzmine.chartbasics.gui.swing.EChartPanel)1 PseudoSpectraItemLabelGenerator (net.sf.mzmine.modules.visualization.spectra.multimsms.pseudospectra.PseudoSpectraItemLabelGenerator)1 XYItemRenderer (org.jfree.chart.renderer.xy.XYItemRenderer)1