// add a listener on the outermost svg element of the SVG image.
// if an event occured inside the SVG image document, send it
// to the <image> element (inside the original document).
if (ctx.isInteractive()) {
listener = new ForwardEventListener(svgElement, e);
NodeEventTarget tgt = (NodeEventTarget)svgElement;
tgt.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_CLICK,
listener, false, null);
subCtx.storeEventListenerNS
(tgt, XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_CLICK,
listener, false);
tgt.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_KEYDOWN,
listener, false, null);
subCtx.storeEventListenerNS
(tgt, XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_KEYDOWN,
listener, false);
tgt.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_KEYPRESS,
listener, false, null);
subCtx.storeEventListenerNS
(tgt, XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_KEYPRESS,
listener, false);
tgt.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_KEYUP,
listener, false, null);
subCtx.storeEventListenerNS
(tgt, XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_KEYUP,
listener, false);
tgt.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEDOWN,
listener, false, null);
subCtx.storeEventListenerNS
(tgt, XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEDOWN,
listener, false);
tgt.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEMOVE,
listener, false, null);
subCtx.storeEventListenerNS
(tgt, XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEMOVE,
listener, false);
tgt.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEOUT,
listener, false, null);
subCtx.storeEventListenerNS
(tgt, XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEOUT,
listener, false);
tgt.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEOVER,
listener, false, null);
subCtx.storeEventListenerNS
(tgt, XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEOVER,
listener, false);
tgt.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEUP,
listener, false, null);
subCtx.storeEventListenerNS
(tgt, XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEUP,
listener, false);