suppress popup

This commit is contained in:
Greg DiCristofaro 2020-09-22 11:53:15 -04:00
parent 61ed97adff
commit 3514579c16

View File

@ -148,17 +148,12 @@ public class PieChartPanel extends AbstractLoadableComponent<List<PieChartPanel.
this.chart = ChartFactory.createPieChart( this.chart = ChartFactory.createPieChart(
title, title,
dataset, dataset,
true, false,
true, false,
false); false);
chart.setBackgroundPaint(null); chart.setBackgroundPaint(null);
chart.getLegend().setItemFont(DEFAULT_FONT);
chart.getTitle().setFont(DEFAULT_HEADER_FONT); chart.getTitle().setFont(DEFAULT_HEADER_FONT);
// don't show a legend by default
chart.removeLegend();
PiePlot plot = ((PiePlot) chart.getPlot()); PiePlot plot = ((PiePlot) chart.getPlot());
plot.setLabelGenerator(DEFAULT_LABEL_GENERATOR); plot.setLabelGenerator(DEFAULT_LABEL_GENERATOR);
@ -169,6 +164,8 @@ public class PieChartPanel extends AbstractLoadableComponent<List<PieChartPanel.
// Create Panel // Create Panel
ChartPanel panel = new ChartPanel(chart); ChartPanel panel = new ChartPanel(chart);
panel.addOverlay(overlay); panel.addOverlay(overlay);
panel.setPopupMenu(null);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);
} }