xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cameron McCormack <cam-batik-us...@aka.mcc.id.au>
Subject Re: scroll wheel zoom
Date Thu, 17 Nov 2005 23:03:48 GMT
Hi Dominik.

Steiner, Dominik:
> is there a way to use the mouse scroll wheel in a JSVGCanvas to zoom
> in and out? I saw the imageZoomInteractor, so similar functionality
> with the scroll wheel possible? I'm not sure how to get scroll wheel
> signals anyway and process them... so anyone has practical experiences
> with that?

Since the Interactor interface does not extend MouseWheelListener, you
can't get the wheel events unless you subclass the canvas class and get
them yourself (see the Listener inner class inside
org.apache.batik.swing.gvt.AbstractGVTComponent).  Note that mouse wheel
events are supported only in JDK >= 1.4.  The code for the canvas
component will capture wheel events and dispatch them as DOM events for
SVG 1.2 documents.  This is done with JDK >= 1.4 specific code in the
sources-1.4 directory.  It probably makes sense to extend interactors
in a similar way to support the mouse wheel when compiling under such a
JDK.  Patches welcome. :)


  e-mail : cam (at) mcc.id.au    	icq : 26955922
     web : http://mcc.id.au/	        msn : cam-msn (at) aka.mcc.id.au
  office : +61399055779		     jabber : heycam (at) jabber.org

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

View raw message