Package org.w3c.dom.events

Examples of org.w3c.dom.events.EventListener


                final Listener listener = new Listener(ctx, ua);
                dispatcher.addGraphicsNodeMouseListener(listener);
                dispatcher.addGraphicsNodeKeyListener(listener);
                // add an unload listener on the SVGDocument to remove
                // that listener for dispatching events
                EventListener l = new GVTUnloadListener(dispatcher, listener);
                EventTarget target = (EventTarget)doc;
                target.addEventListener("SVGUnload", l, false);
                ctx.storeEventListener(target, "SVGUnload", l, false);
            }
        }
View Full Code Here


        super.buildGraphicsNode(ctx, e, node);

        EventTarget target = (EventTarget)e;

        EventListener l = new AnchorListener(ctx.getUserAgent());
        target.addEventListener(SVG_EVENT_CLICK, l, false);
        ctx.storeEventListener(target, SVG_EVENT_CLICK, l, false);

        l = new CursorMouseOverListener(ctx.getUserAgent());
        target.addEventListener(SVG_EVENT_MOUSEOVER, l, false);
View Full Code Here

        super.buildGraphicsNode(ctx, e, node);

        EventTarget target = (EventTarget)e;

        EventListener l = new CursorMouseOverListener(ctx.getUserAgent());
        target.addEventListener(SVG_EVENT_MOUSEOVER, l, false);
        ctx.storeEventListener(target, SVG_EVENT_MOUSEOVER, l, false);

    }
View Full Code Here

                        asb.append(s, m);
                    }
                } else if (ln.equals(SVG_A_TAG)) {
                    EventTarget target = (EventTarget)nodeElement;
                    UserAgent ua = ctx.getUserAgent();
                    EventListener l = new SVGAElementBridge.AnchorListener(ua);
                    target.addEventListener(SVG_EVENT_CLICK, l, false);
                    ctx.storeEventListener(target, SVG_EVENT_CLICK, l, false);
                   
                    fillAttributedStringBuffer(ctx,
                                               nodeElement,
View Full Code Here

        ev.initEvent("SVGLoad", false, false);
        EventTarget t = (EventTarget)elt;

        final String s =
            elt.getAttributeNS(null, SVGConstants.SVG_ONLOAD_ATTRIBUTE);
        EventListener l = null;
        if (s.length() > 0) {
            if (checkCanRun) {
                // Check that it is ok to run embeded scripts
                checkCompatibleScriptURL(lang, docPURL);
                checkCanRun = false; // we only check once for onload handlers
            }

            l = new EventListener() {
                    public void handleEvent(Event evt) {
                        try {
                            interp.bindObject(EVENT_NAME, evt);
                            interp.bindObject(ALTERNATE_EVENT_NAME, evt);
                            interp.evaluate(new StringReader(s));
View Full Code Here

        // 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.isDynamic()) {
            EventListener listener = new ForwardEventListener(svgElement, e);
            EventTarget target = (EventTarget)svgElement;

            target.addEventListener(SVG_EVENT_CLICK, listener, false);
            ctx.storeEventListener(target, SVG_EVENT_CLICK, listener, false);
View Full Code Here

                final Listener listener = new Listener(ctx, ua);
                dispatcher.addGraphicsNodeMouseListener(listener);
                dispatcher.addGraphicsNodeKeyListener(listener);
                // add an unload listener on the SVGDocument to remove
                // that listener for dispatching events
                EventListener l = new GVTUnloadListener(dispatcher, listener);
                EventTarget target = (EventTarget)doc;
                target.addEventListener("SVGUnload", l, false);
                ctx.storeEventListener(target, "SVGUnload", l, false);
            }
        }
View Full Code Here

        // 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.isDynamic()) {
            EventListener listener = new ForwardEventListener(svgElement, e);
            EventTarget target = (EventTarget)svgElement;

            target.addEventListener(SVG_EVENT_CLICK, listener, false);
            ctx.storeEventListener(target, SVG_EVENT_CLICK, listener, false);
View Full Code Here

                        asb.append(s, m);
                    }
                } else if (ln.equals(SVG_A_TAG)) {
                    EventTarget target = (EventTarget)nodeElement;
                    UserAgent ua = ctx.getUserAgent();
                    EventListener l = new SVGAElementBridge.AnchorListener(ua);
                    target.addEventListener(SVG_EVENT_CLICK, l, false);
                    ctx.storeEventListener(target, SVG_EVENT_CLICK, l, false);
                   
                    l = new SVGAElementBridge.CursorMouseOverListener(ua);
                    target.addEventListener(SVG_EVENT_MOUSEOVER, l, false);
View Full Code Here

        ev.initEvent("SVGLoad", false, false);
        EventTarget t = (EventTarget)elt;

        final String s =
            elt.getAttributeNS(null, SVGConstants.SVG_ONLOAD_ATTRIBUTE);
        EventListener l = null;
        if (s.length() > 0) {
            if (checkCanRun) {
                // Check that it is ok to run embeded scripts
                checkCompatibleScriptURL(lang, docPURL);
                checkCanRun = false; // we only check once for onload handlers
            }

            l = new EventListener() {
                    public void handleEvent(Event evt) {
                        try {
                            interp.bindObject(EVENT_NAME, evt);
                            interp.bindObject(ALTERNATE_EVENT_NAME, evt);
                            interp.evaluate(new StringReader(s));
View Full Code Here

TOP

Related Classes of org.w3c.dom.events.EventListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.