Search in sources :

Example 1 with LegendMarker

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);
    }
}
Also used : LegendMarker(org.eclipse.swtchart.extensions.internal.marker.LegendMarker) IPlotArea(org.eclipse.swtchart.IPlotArea)

Aggregations

IPlotArea (org.eclipse.swtchart.IPlotArea)1 LegendMarker (org.eclipse.swtchart.extensions.internal.marker.LegendMarker)1