Search in sources :

Example 1 with PlotCenterMarker

use of org.eclipse.swtchart.extensions.internal.marker.PlotCenterMarker in project swtchart by eclipse.

the class ScrollableChart method setPlotCenterMarker.

private void setPlotCenterMarker() {
    IPlotArea plotArea = (IPlotArea) baseChart.getPlotArea();
    IChartSettings chartSettings = baseChart.getChartSettings();
    // 
    if (plotCenterMarker != null) {
        plotArea.removeCustomPaintListener(plotCenterMarker);
    }
    // 
    plotCenterMarker = new PlotCenterMarker(baseChart);
    plotCenterMarker.setForegroundColor(chartSettings.getColorPlotCenterMarker());
    plotArea.addCustomPaintListener(plotCenterMarker);
    // 
    if (chartSettings.isShowPlotCenterMarker()) {
        plotCenterMarker.setDraw(true);
    } else {
        plotCenterMarker.setDraw(false);
    }
}
Also used : PlotCenterMarker(org.eclipse.swtchart.extensions.internal.marker.PlotCenterMarker) IPlotArea(org.eclipse.swtchart.IPlotArea)

Aggregations

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