You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "G. Wade Johnson" <wa...@abbnm.com> on 2003/05/15 17:09:35 UTC

onZoom in Java code

I need to have some Java code executed when my picture is zoomed.

Is there any way to be notified on zoom in Java? (My client is not
interested in any scripting in the SVG so it must be done in the app.)

G. Wade

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


Re: onZoom in Java code

Posted by "G. Wade Johnson" <wa...@abbnm.com>.
Thanks Thomas,

JGVTComponentListener was just what I needed...after I understood it.
<grin/>

G. Wade

Thomas E Deweese wrote:
> 
> >>>>> "GWJ" == G Wade Johnson <wa...@abbnm.com> writes:
> 
> GWJ> I need to have some Java code executed when my picture is zoomed.
> GWJ> Is there any way to be notified on zoom in Java? (My client is
> GWJ> not interested in any scripting in the SVG so it must be done in
> GWJ> the app.)
> 
>      You can register a DOM event listener for 'onzoom' events (also
> 'onscroll' or 'onresize').
> 
>      You can also register a batik.swing.gvt.JGVTComponentListener
> with the JSVGCanvas.  This get's called when the component's transform
> changes.
> 
>      You can take a look at batik.swing.svg.JSVGComponet it registers
> one so it can trigger the DOM events.
> 
> GWJ> G. Wade
> 
> GWJ> ---------------------------------------------------------------------
> GWJ> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> GWJ> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org

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


RE: onZoom in Java code

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "GWJ" == G Wade Johnson <wa...@abbnm.com> writes:

GWJ> I need to have some Java code executed when my picture is zoomed.
GWJ> Is there any way to be notified on zoom in Java? (My client is
GWJ> not interested in any scripting in the SVG so it must be done in
GWJ> the app.)

     You can register a DOM event listener for 'onzoom' events (also
'onscroll' or 'onresize').

     You can also register a batik.swing.gvt.JGVTComponentListener
with the JSVGCanvas.  This get's called when the component's transform
changes.

     You can take a look at batik.swing.svg.JSVGComponet it registers
one so it can trigger the DOM events.

GWJ> G. Wade

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




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