Package org.apache.flex.forks.batik.dom.svg12

Examples of org.apache.flex.forks.batik.dom.svg12.XBLOMDefinitionElement


    /**
     * Invoked when an MutationEvent of type 'DOMNodeInserted' is fired.
     */
    public void handleDOMNodeInsertedEvent(MutationEvent evt) {
        // Only rebuild the graphics tree if this custom element is not bound.
        BindableElement be = (BindableElement) e;
        Element shadowTree = be.getXblShadowTree();

        if (shadowTree == null && evt.getTarget() instanceof Element) {
            handleElementAdded((CompositeGraphicsNode) node,
                               e,
                               (Element) evt.getTarget());
View Full Code Here


    /**
     * Get the shadow tree of a node.
     */
    public Element getXblShadowTree(Node n) {
        if (n instanceof BindableElement) {
            BindableElement elt = (BindableElement) n;
            return elt.getShadowTree();
        }
        return null;
    }
View Full Code Here

                                         Scriptable thisObj,
                                         Object[] args,
                                         Function funObj) {
        int len = args.length;
        GlobalWrapper gw = (GlobalWrapper) thisObj;
        SVGGlobal global = (SVGGlobal) gw.window;
        if (len >= 3) {
            EventTarget et = null;
            if (args[0] instanceof NativeJavaObject) {
                Object o = ((NativeJavaObject) args[0]).unwrap();
                if (o instanceof EventTarget) {
                    et = (EventTarget) o;
                }
            }
            if (et == null) {
                throw Context.reportRuntimeError("First argument to startMouseCapture must be an EventTarget");
            }
            boolean sendAll = Context.toBoolean(args[1]);
            boolean autoRelease = Context.toBoolean(args[2]);
            global.startMouseCapture(et, sendAll, autoRelease);
        }
    }
View Full Code Here

    public static void stopMouseCapture(Context cx,
                                        Scriptable thisObj,
                                        Object[] args,
                                        Function funObj) {
        GlobalWrapper gw = (GlobalWrapper) thisObj;
        SVGGlobal global = (SVGGlobal) gw.window;
        global.stopMouseCapture();
    }
View Full Code Here

        public void mouseWheelMoved(GraphicsNodeMouseWheelEvent evt) {
            Document doc = context.getPrimaryBridgeContext().getDocument();
            Element targetElement = doc.getDocumentElement();
            DocumentEvent d = (DocumentEvent) doc;
            SVGOMWheelEvent wheelEvt
                = (SVGOMWheelEvent) d.createEvent("WheelEvent");
            wheelEvt.initWheelEventNS(XMLConstants.XML_EVENTS_NAMESPACE_URI,
                                      "wheel",
                                      true,
                                      true,
                                      null,
                                      evt.getWheelDelta());
View Full Code Here

                new DOMSubtreeModifiedEventListener();
        }

        SVG12BridgeContext ctx12 = (SVG12BridgeContext) ctx;
        AbstractNode n = (AbstractNode) e;
        XBLEventSupport evtSupport =
            (XBLEventSupport) n.initializeEventSupport();

        //to be notified when a child is removed from the
        //<text> element.
        evtSupport.addImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeRemoved",
             childNodeRemovedEventListener, true);
        ctx12.storeImplementationEventListenerNS
            (e, XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeRemoved",
             childNodeRemovedEventListener, true);
       
        //to be notified when the modification of the subtree
        //of the <text> element is done
        evtSupport.addImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMSubtreeModified",
             subtreeModifiedEventListener, false);
        ctx12.storeImplementationEventListenerNS
            (e, XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMSubtreeModified",
             subtreeModifiedEventListener, false);
View Full Code Here

     * Removes the DOM listeners for this text bridge.
     */
    protected void removeTextEventListeners(BridgeContext ctx,
                                            NodeEventTarget e) {
        AbstractNode n = (AbstractNode) e;
        XBLEventSupport evtSupport =
            (XBLEventSupport) n.initializeEventSupport();

        evtSupport.removeImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeRemoved",
             childNodeRemovedEventListener, true);
        evtSupport.removeImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMSubtreeModified",
             subtreeModifiedEventListener, false);
    }
View Full Code Here

    /**
     * Adds the event listeners to the document.
     */
    protected void addEventListeners(Document doc) {
        AbstractNode n = (AbstractNode) doc;
        XBLEventSupport es = (XBLEventSupport) n.initializeEventSupport();

        mouseclickListener = new MouseClickTracker();
        es.addImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "click",
             mouseclickListener, true);

        mouseoverListener = new MouseOverTracker();
        es.addImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "mouseover",
             mouseoverListener, true);

        mouseoutListener = new MouseOutTracker();
        es.addImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "mouseout",
             mouseoutListener, true);

        domFocusInListener = new DOMFocusInTracker();
        es.addImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "DOMFocusIn",
             domFocusInListener, true);

        domFocusOutListener = new DOMFocusOutTracker();
        es.addImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "DOMFocusOut",
             domFocusOutListener, true);
    }
View Full Code Here

    /**
     * Removes the event listeners from the document.
     */
    protected void removeEventListeners(Document doc) {
        AbstractNode n = (AbstractNode) doc;
        XBLEventSupport es = (XBLEventSupport) n.getEventSupport();

        es.removeImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "click",
             mouseclickListener, true);
        es.removeImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "mouseover",
             mouseoverListener, true);
        es.removeImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "mouseout",
             mouseoutListener, true);
        es.removeImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "DOMFocusIn",
             domFocusInListener, true);
        es.removeImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "DOMFocusOut",
             domFocusOutListener, true);
    }
View Full Code Here

        boundElement = xblManager.getXblBoundElement(s);

        contentElementDomAttrModifiedEventListener =
            new ContentElementDOMAttrModifiedEventListener();

        XBLEventSupport es = (XBLEventSupport)
            shadowTree.initializeEventSupport();
        shadowTreeNodeInsertedListener = new ShadowTreeNodeInsertedListener();
        shadowTreeNodeRemovedListener = new ShadowTreeNodeRemovedListener();
        shadowTreeSubtreeModifiedListener
            = new ShadowTreeSubtreeModifiedListener();
        es.addImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "DOMNodeInserted",
             shadowTreeNodeInsertedListener, true);
        es.addImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "DOMNodeRemoved",
             shadowTreeNodeRemovedListener, true);
        es.addImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "DOMSubtreeModified",
             shadowTreeSubtreeModifiedListener, true);

        es = (XBLEventSupport)
            ((AbstractNode) boundElement).initializeEventSupport();
        domAttrModifiedEventListener = new DOMAttrModifiedEventListener();
        domNodeInsertedEventListener = new DOMNodeInsertedEventListener();
        domNodeRemovedEventListener = new DOMNodeRemovedEventListener();
        domSubtreeModifiedEventListener = new DOMSubtreeModifiedEventListener();
        es.addImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "DOMAttrModified",
             domAttrModifiedEventListener, true);
        es.addImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "DOMNodeInserted",
             domNodeInsertedEventListener, true);
        es.addImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "DOMNodeRemoved",
             domNodeRemovedEventListener, true);
        es.addImplementationEventListenerNS
            (XMLConstants.XML_EVENTS_NAMESPACE_URI,
             "DOMSubtreeModified",
             domSubtreeModifiedEventListener, false);

        update(true);
View Full Code Here

TOP

Related Classes of org.apache.flex.forks.batik.dom.svg12.XBLOMDefinitionElement

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.