Hello!
I want to put the JSVGCanvas into a JScrollPane. I'm using batik-1.5b5 (should be a CVS Version from 2 days ago). I'm using the class JSVGViewerFrame and modified it a little because I do not need all functions apart from zooming, panning and printing. I've done a subclass extending the JSVGCanvas and implemented the Scrollable Interface. All works fine as long I just do nothing else than scrolling with the thumbs of the JScrollPane.
My problem now is to update the thumbs of the JScrollPane whenever I zoom into/out of the canvas or whenever I pan the canvas.
I would guess that if you override setMySize to call setPreferredSize(...), invalidate(), and then window.validate() [or perhaps pack()] would update the thumbs (one would hope).
For scrolling/panning I think you need to make sure you don't use Batik's pan (which updates the rendering transform) but use the JSVGScrollPane to change the canvas's location under the JViewport.
I've noticed some approachs here but I cannot get it work for my panel. Does anyone have a solution? Maybe a code sample?
Sorry no prepped solution, or code.
Thanks in advance,
Michael
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]