Examples of BridgeMutationEvent


Examples of org.apache.batik.bridge.BridgeMutationEvent

            public MutationListener(BridgeContext bridgeContext) {
                this.bridgeContext = bridgeContext;
            }

            public void handleEvent(Event evt) {
                BridgeMutationEvent bme;
                Element target = (Element)evt.getTarget();
                bme = new BridgeMutationEvent
                    (target,
                     bridgeContext,
                     BridgeMutationEvent.PROPERTY_MUTATION_TYPE);

                MutationEvent me = (MutationEvent)evt;

                bme.setAttrName(me.getAttrName());
                bme.setAttrNewValue(me.getNewValue());

                GraphicsNodeBridge bridge;
                bridge = (GraphicsNodeBridge)bridgeContext.getBridge(target);

                bridge.update(bme);
View Full Code Here

Examples of org.apache.batik.bridge.BridgeMutationEvent

            public MutationListener(BridgeContext bridgeContext) {
                this.bridgeContext = bridgeContext;
            }

            public void handleEvent(Event evt) {
                BridgeMutationEvent bme;
                Element target = (Element)evt.getTarget();
                bme = new BridgeMutationEvent
                    (target,
                     bridgeContext,
                     BridgeMutationEvent.PROPERTY_MUTATION_TYPE);

                MutationEvent me = (MutationEvent)evt;

                bme.setAttrName(me.getAttrName());
                bme.setAttrNewValue(me.getNewValue());

                GraphicsNodeBridge bridge;
                bridge = (GraphicsNodeBridge)bridgeContext.getBridge(target);

                bridge.update(bme);
View Full Code Here

Examples of org.apache.batik.bridge.BridgeMutationEvent

            public MutationListener(BridgeContext bridgeContext) {
                this.bridgeContext = bridgeContext;
            }

            public void handleEvent(Event evt) {
                BridgeMutationEvent bme;
                Element target = (Element)evt.getTarget();
                bme = new BridgeMutationEvent
                    (target,
                     bridgeContext,
                     BridgeMutationEvent.PROPERTY_MUTATION_TYPE);

                MutationEvent me = (MutationEvent)evt;

                bme.setAttrName(me.getAttrName());
                bme.setAttrNewValue(me.getNewValue());

                GraphicsNodeBridge bridge;
                bridge = (GraphicsNodeBridge)bridgeContext.getBridge(target);

                bridge.update(bme);
View Full Code Here

Examples of org.apache.batik.bridge.BridgeMutationEvent

            public MutationListener(BridgeContext bridgeContext) {
                this.bridgeContext = bridgeContext;
            }

            public void handleEvent(Event evt) {
                BridgeMutationEvent bme;
                Element target = (Element)evt.getTarget();
                bme = new BridgeMutationEvent
                    (target,
                     bridgeContext,
                     BridgeMutationEvent.PROPERTY_MUTATION_TYPE);

                MutationEvent me = (MutationEvent)evt;

                bme.setAttrName(me.getAttrName());
                bme.setAttrNewValue(me.getNewValue());

                GraphicsNodeBridge bridge;
                bridge = (GraphicsNodeBridge)bridgeContext.getBridge(target);

                bridge.update(bme);
View Full Code Here

Examples of org.apache.batik.bridge.BridgeMutationEvent

     * Handles the mutation of an attribute
     * @param evt the DOM event
     */
    public void handleEvent(Event evt){
        MutationEvent event = (MutationEvent)evt;
        BridgeMutationEvent mevent;

        Element element = (Element)evt.getTarget();
        GraphicsNode gn = context.getGraphicsNode(element);
       
        if (gn != null){ // The mutation happends on a Graphics Node
            mevent = new BridgeMutationEvent(element,
                                             context,
                                             BridgeMutationEvent.PROPERTY_MUTATION_TYPE);
           
            mevent.setAttrName(event.getAttrName());
            mevent.setAttrNewValue(event.getNewValue());
            mevent.setGraphicsNode(gn);
            context.getBridgeUpdateManager().addDirtyNode(gn, mevent);
           
        } else {
            // A mutation on a style element (for example a Gradient)
           
            List references = context.getStyleReferenceList(element);
            if (!references.isEmpty()) {

                StyleReference reference;
                BridgeMutationEvent elevt;
                mevent = new BridgeMutationEvent(element,
                                                 context,
                                                 BridgeMutationEvent.PROPERTY_MUTATION_TYPE);
               
                mevent.setAttrName(event.getAttrName());
                mevent.setAttrNewValue(event.getNewValue());
               
               
                for (Iterator it = references.iterator(); it.hasNext();) {
                    reference = (StyleReference)it.next();
                    elevt = new  BridgeMutationEvent(context.getElement(reference.getGraphicsNode()),
                                                     context,
                                                     BridgeMutationEvent.STYLE_MUTATION_TYPE);
                    elevt.setGraphicsNode(reference.getGraphicsNode());
                    elevt.setAttrName(reference.getStyleAttribute());
                    elevt.setStyleMutationEvent(mevent);
                    context.getBridgeUpdateManager().addDirtyNode(gn, elevt);
                }
            }
        }
        // probably many other cases.
View Full Code Here

Examples of org.apache.batik.bridge.BridgeMutationEvent

        public MutationListener(BridgeContext bridgeContext) {
            this.bridgeContext = bridgeContext;
        }

        public void handleEvent(Event evt) {
            BridgeMutationEvent bme;
            Element target = (Element)evt.getTarget();
            bme = new BridgeMutationEvent
                (target,
                 bridgeContext,
                 BridgeMutationEvent.PROPERTY_MUTATION_TYPE);

            MutationEvent me = (MutationEvent)evt;

            bme.setAttrName(me.getAttrName());
            bme.setAttrNewValue(me.getNewValue());

            GraphicsNodeBridge bridge;
            bridge = (GraphicsNodeBridge)bridgeContext.getBridge(target);

            bridge.update(bme);
View Full Code Here

Examples of org.apache.batik.bridge.BridgeMutationEvent

            public MutationListener(BridgeContext bridgeContext) {
                this.bridgeContext = bridgeContext;
            }

            public void handleEvent(Event evt) {
                BridgeMutationEvent bme;
                Element target = (Element)evt.getTarget();
                bme = new BridgeMutationEvent
                    (target,
                     bridgeContext,
                     BridgeMutationEvent.PROPERTY_MUTATION_TYPE);

                MutationEvent me = (MutationEvent)evt;

                bme.setAttrName(me.getAttrName());
                bme.setAttrNewValue(me.getNewValue());

                GraphicsNodeBridge bridge;
                bridge = (GraphicsNodeBridge)bridgeContext.getBridge(target);

                bridge.update(bme);
View Full Code Here

Examples of org.apache.batik.bridge.BridgeMutationEvent

            public MutationListener(BridgeContext bridgeContext) {
                this.bridgeContext = bridgeContext;
            }

            public void handleEvent(Event evt) {
                BridgeMutationEvent bme;
                Element target = (Element)evt.getTarget();
                bme = new BridgeMutationEvent
                    (target,
                     bridgeContext,
                     BridgeMutationEvent.PROPERTY_MUTATION_TYPE);

                MutationEvent me = (MutationEvent)evt;

                bme.setAttrName(me.getAttrName());
                bme.setAttrNewValue(me.getNewValue());

                GraphicsNodeBridge bridge;
                bridge = (GraphicsNodeBridge)bridgeContext.getBridge(target);

                bridge.update(bme);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.