xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas DeWeese <Thomas.DeWe...@Kodak.com>
Subject Re: how to catch resize events in JSVGCanvas via shift + right mouse key
Date Wed, 01 Dec 2004 10:50:49 GMT
Hi Maik,

Maik Schürer wrote:

> up to now I catch resize events in JSVGCanvas with a ComponentListener.
> But it only works when the canvas (window) changes its size ....

    Meves, gave a good answer to this using the DOM, which is
definitely the preferred solution as the DOM interfaces are standard).
There also exists an extension to the ComponentListener interface
called the JGVTComponentListener which adds componentTransformChanged
which is what the zoom event it built off of internally.

> Additional I want to catch events, when I change my SVG view via shift +
> right mouse key + move (fast zoom in/out).
> Ho can I do this ?

    There is no public interface for this.  The only solution would
be to subclass either the canvas so you get events when the 'paint
transform' changes as well, or the AbstractImageZoomInteractor so it
notifies you or does the work directly.

    Incidentally this indicates why the DOM is preferred.  Now that
you mention this I'm tempted to add either a new method to the
JGVTComponentListener to track paint changes or perhaps a new
event type (COMPONENT_PAINT_TRANSFORM_CHANGED).  Which could break
existing code (or at least cause the code to be called much more
than expected).

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

View raw message