use of org.eclipse.swtchart.extensions.internal.marker.LegendMarker in project swtchart by eclipse.
the class ScrollableChart method setLegendMarker.
private void setLegendMarker() {
IPlotArea plotArea = (IPlotArea) baseChart.getPlotArea();
IChartSettings chartSettings = baseChart.getChartSettings();
//
if (legendMarker != null) {
plotArea.removeCustomPaintListener(legendMarker);
}
//
legendMarker = new LegendMarker(baseChart);
legendMarker.setForegroundColor(chartSettings.getColorLegendMarker());
plotArea.addCustomPaintListener(legendMarker);
//
if (chartSettings.isShowLegendMarker()) {
legendMarker.setDraw(true);
} else {
legendMarker.setDraw(false);
}
}
Aggregations