Hey,
I have question. How can I call method refreshTicksVertical from NumberAxis class.
I want to change tick labels dynnamicly after click button therfore I need this.
How call refreshTicksVertical from NumberAxis
Re: How call refreshTicksVertical from NumberAxis
Hi!
- martin
There shouldn't be any need to call it manually. When updating the axis fireChangeEvent() should be called internally which should notify all registered listeners. Did you try it?maryan wrote:Hey,
I have question. How can I call method refreshTicksVertical from NumberAxis class.
I want to change tick labels dynnamicly after click button therfore I need this.
- martin
-
- Posts: 31
- Joined: Thu May 27, 2010 4:23 pm
- antibot: No, of course not.
Re: How call refreshTicksVertical from NumberAxis
But what if you override refreshTicksVertical to do some special logic which you want to change when a user clicks some button. So upon that button click you want to say "Hey plot, everything is the same, just redraw the the axis (and thus call my overridden refreshTicksVertical which will behave differently now)". There does not seems to be other way then forcing redraw of the whole plot. Or is it?
Re: How call refreshTicksVertical from NumberAxis
Hm... I never was in need for doing anything like this (mostly using JFreeChart in Webapps). You could just call refreshTicks() which is public but that would only recalculate the ticks and not redraw the axis. There is a public Axis.draw() which you could try to call, but I'm not sure if this does exactly what you wan.
- martin
- martin