Zooming works by being an AdjustmentListener. If the new
value is the same as the old value, the adjustment doesn't
register and zooming doesn't happen. This is fixed by
performing some random zoom first, and then setting the real
zoom values.
in order to enforce this:
added zoomOut() method to be used instead of zoom(int, int).
zoom(int,int) should only be used by ZoomableChart
Enforcing this by changing zoom to a protected method and
changing references to zoom to zoomOut() or zoomOutHalf()
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I opened this bug back up, but took it off the sept2006
release, because it seemed there had to be a cleaner way to
make the fix. Why not make all the relevant code in
adjustmentValueChanged a separate method, then call it from
both places?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That makes some sense. In zooming, though, you will need to
change the values of the scroll-bar no matter what. So
either way adjustmentValueChanged will be called. If we
refactor the relevant code elsewhere, it should work, and
probably simplify things, but it also means that every time
you zoom, you'll be doing everything twice.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1535862
Zooming works by being an AdjustmentListener. If the new
value is the same as the old value, the adjustment doesn't
register and zooming doesn't happen. This is fixed by
performing some random zoom first, and then setting the real
zoom values.
in order to enforce this:
added zoomOut() method to be used instead of zoom(int, int).
zoom(int,int) should only be used by ZoomableChart
Enforcing this by changing zoom to a protected method and
changing references to zoom to zoomOut() or zoomOutHalf()
Logged In: YES
user_id=794974
I opened this bug back up, but took it off the sept2006
release, because it seemed there had to be a cleaner way to
make the fix. Why not make all the relevant code in
adjustmentValueChanged a separate method, then call it from
both places?
Logged In: YES
user_id=1535862
That makes some sense. In zooming, though, you will need to
change the values of the scroll-bar no matter what. So
either way adjustmentValueChanged will be called. If we
refactor the relevant code elsewhere, it should work, and
probably simplify things, but it also means that every time
you zoom, you'll be doing everything twice.