use of net.sf.mzmine.chartbasics.gui.swing.EChartPanel in project mzmine2 by mzmine.
the class KendrickMassPlotTask method run.
@Override
public void run() {
setStatus(TaskStatus.PROCESSING);
logger.info("Create Kendrick mass plot of " + peakList);
// Task canceled?
if (isCanceled())
return;
JFreeChart chart = null;
// 2D, if no third dimension was selected
if (zAxisLabel.equals("none")) {
chart = create2DKendrickMassPlot();
} else // 3D, if a third dimension was selected
{
chart = create3DKendrickMassPlot();
}
chart.setBackgroundPaint(Color.white);
// create chart JPanel
EChartPanel chartPanel = new EChartPanel(chart, true, true, true, true, false);
// Create Kendrick mass plot Window
KendrickMassPlotWindow frame = new KendrickMassPlotWindow(chart, parameters, chartPanel);
frame.add(chartPanel, BorderLayout.CENTER);
// set title properties
TextTitle chartTitle = chart.getTitle();
chartTitle.setMargin(5, 0, 0, 0);
chartTitle.setFont(titleFont);
LegendTitle legend = chart.getLegend();
legend.setVisible(false);
frame.setTitle(title);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setBackground(Color.white);
frame.setVisible(true);
frame.pack();
setStatus(TaskStatus.FINISHED);
logger.info("Finished creating Kendrick mass plot of " + peakList);
}
Aggregations