Hello,
I noticed that the DynamicChart Demo in JFreeChartDemo.java does some
unnecesarry repaints (at least that is my opinion).
I tracked it down at XYPlot.java (method render) which calls
domainAxis.setCrosshairValue(...) and
rangeAxis.setCrosshairValue(...).
The method setCrosshairValue() in ValueAxis.java always
notifies it Listeners (even when the crosshair is not visible).
I change the setCrosshairValue-method in ValueAxis to :
public void setCrosshairValue(double value) {
this.crosshairValue = value;
if(!isCrosshairVisible()) {
return;
}
notifyListeners(new AxisChangeEvent(this));
}
Now I don't get any unnessesary repaints.
Kees.
Unnecessary repaints
Re: Unnecessary repaints
Hi Kees,
Thanks for reporting this. I've added your change...it makes sense to me.
Regards,
DG.
Thanks for reporting this. I've added your change...it makes sense to me.
Regards,
DG.