I made it work with the classes JSVGScrollCanvas and with the JSVGViewport done by Zachary DelProposto!! Greetings to Zach.
Michael
Joseph Foster wrote:
For a credit where credit is due correction: The JSVGScrollCanvas we used is by Zachary DelProposito
-----Original Message-----
From: Mark Claassen [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 2003 1:52 PM
To: 'Batik Users'
Subject: RE: JSVGCanvas in a JScrollPane again....
I am not sure what your exact problems were, but we have had pretty good luck with the JSVGScrollCanvas. To zoom we simply do
AffineTransform transform = (AffineTransform)canvas.getRenderingTransform().clone();
double newScale = <<whatever>>
transform.scale(newScale, newScale);
scrollCanvas.setRenderingTransform(transform);
The JSVGScrollCanvas we used was by Jan Lolling, which can be found in the Batik mail archives.
Mark
need all-----Original Message----- From: Thomas DeWeese [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 2003 12:34 PM To: Batik Users Subject: Re: JSVGCanvas in a JScrollPane again....
Michael Mikic wrote:
Hello!batik-1.5b5
I want to put the JSVGCanvas into a JScrollPane. I'm using
(should be a CVS Version from 2 days ago). I'm using the class
JSVGViewerFrame and modified it a little because I do not
whenever Ifunctions apart from zooming, panning and printing. I'vedone a subclass
extending the JSVGCanvas and implemented the ScrollableInterface. All
works fine as long I just do nothing else than scrollingwith the thumbs
of the JScrollPane.
My problem now is to update the thumbs of the JScrollPane
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 mySorry no prepped solution, or code.
panel.
Does anyone have a solution? Maybe a code sample?
Thanks in advance,
Michael
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]