xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject RE: Zooming in on an SVGCanvas?
Date Thu, 13 Oct 2005 23:33:57 GMT
Hi Michael,

"Bishop, Michael W. CONTR J9C880" <Michael.Bishop@je.jfcom.mil> wrote on 
10/13/2005 03:23:26 PM:

> I did some reading and I see that you basically override the
> startInteraction method.  I'm having trouble connecting dots though.
> How do I get from an actionPerformed(ActionEvent actionEvent) from an
> ActionListener (zoom button pressed, for instance) to using this
> interactor to tell the JSVGCanvas to zoom in a certain amount?

   The Action stuff is separate from the Zoom Interactor (that is for
drawing out a rectangle that is to be zoomed to fill the viewport).

   The Actions are all inner classes of the JSVGCanvas.  In fact it
exports the default Zoom In/Out actions in it's actionMap, you can
of course create your own instances of the Action classes to attach
to your buttons, but it's better to get them from the Action map I think.

> I basically want Zoom+ and Zoom- buttons in my toolbar, like Squiggle.

        If you haven't found it the basic window stuff is setup in 
batik.apps.svgbrowser.JSVGViewerFrame.  You can of course more or
less just use that class if you want to.

> 
> Michael Bishop
> 
> -----Original Message-----
> From: Tonny Kohar [mailto:tonny@kiyut.com] 
> Sent: Thursday, October 13, 2005 3:18 PM
> To: batik-users@xmlgraphics.apache.org
> Subject: Re: Zooming in on an SVGCanvas?
> 
> Hi,
> 
> On Thu, 2005-10-13 at 14:00 -0400, Bishop, Michael W. CONTR J9C880
> wrote:
> > I'm looking through the source to the squiggle application since it
> > seems to do exactly what I need.  I must be missing something; I see
> > where the listener is registered, but I don't see the code that
> > specifically tells a JSVGCanvas to "zoom" in or out.  Does someone
> > know where the magic occurs?
> 
> It is on the interactor part.
> Check this org.apache.batik.swing.gvt.AbstractZoomInteractor
> 
> Regards
> Tonny Kohar
> -- 
> Sketsa 
> SVG Graphics Editor
> http://www.kiyut.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message