Search in sources :

Example 1 with PositionMarker

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

the class ScrollableChart method setPositionMarker.

private void setPositionMarker() {
    IPlotArea plotArea = (IPlotArea) baseChart.getPlotArea();
    IChartSettings chartSettings = baseChart.getChartSettings();
    // 
    if (positionMarker != null) {
        plotArea.removeCustomPaintListener(positionMarker);
    }
    // 
    positionMarker = new PositionMarker(baseChart);
    positionMarker.setForegroundColor(chartSettings.getColorPositionMarker());
    plotArea.addCustomPaintListener(positionMarker);
    // 
    if (chartSettings.isShowPositionMarker()) {
        positionMarker.setDraw(true);
    } else {
        positionMarker.setDraw(false);
    }
}
Also used : PositionMarker(org.eclipse.swtchart.extensions.internal.marker.PositionMarker) IPlotArea(org.eclipse.swtchart.IPlotArea)

Aggregations

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