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);
}
}
Aggregations