xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thierry Kormann" <tkorm...@ilog.fr>
Subject RE: Element identification
Date Wed, 06 Mar 2002 07:29:04 GMT

> Using Batik's classes, can we determine what DOM element has been
> clicked/selected by the mouse?  Does someone know where an example can be
> found?  Does every GraphicsNode need to listen for mouse events?
> Is there a
> quick way to register the elements for the events?

Use the DOM (org.w3c.dom.events).

Register EventListener to the element you are interested in and your
listener will be invoke depending on the event type.


EventTarget evtTarget = (EventTarget) elt;
evtTarget.addEventListener("click", myListener, false);

Hope that helps,

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

View raw message