xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject cvs commit: xml-batik/sources-1.4/org/apache/batik/gvt/event AWTEventDispatcher.java
Date Fri, 25 Feb 2005 03:18:15 GMT
cam         2005/02/24 19:18:15

  Modified:    .        Tag: svg12 build.xml
               resources/org/apache/batik/bridge/resources Tag: svg12
                        Messages.properties
               sources/org/apache/batik/bridge Tag: svg12
                        ScriptingEnvironment.java UpdateManager.java
               sources/org/apache/batik/bridge/svg12 Tag: svg12
                        SVG12BridgeExtension.java
               sources/org/apache/batik/dom/svg12 Tag: svg12
                        SVG12DOMImplementation.java
               sources/org/apache/batik/util Tag: svg12 SVG12Constants.java
                        XMLConstants.java
               sources-1.4/org/apache/batik/gvt/event Tag: svg12
                        AWTEventDispatcher.java
  Added:       sources/org/apache/batik/bridge/svg12 Tag: svg12
                        SVG12ScriptingEnvironment.java
               sources/org/apache/batik/dom/svg12 Tag: svg12
                        SVGOMHandlerElement.java
               sources/org/apache/batik/dom/util Tag: svg12
                        TriplyIndexedTable.java
  Log:
  1. Support for SVG 1.2 'handler' element.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.157.2.2 +1 -3      xml-batik/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-batik/build.xml,v
  retrieving revision 1.157.2.1
  retrieving revision 1.157.2.2
  diff -u -r1.157.2.1 -r1.157.2.2
  --- build.xml	22 Feb 2005 12:33:54 -0000	1.157.2.1
  +++ build.xml	25 Feb 2005 03:18:13 -0000	1.157.2.2
  @@ -133,8 +133,6 @@
           <equals arg1="${jdk14.present}" arg2="true"/>
         </not>
       </condition>
  -
  -    <echo message="src-jdk = ${src-jdk}"/>
     </target>
   
     <path id="libs-classpath">
  
  
  
  No                   revision
  No                   revision
  1.17.2.1  +3 -0      xml-batik/resources/org/apache/batik/bridge/resources/Messages.properties
  
  Index: Messages.properties
  ===================================================================
  RCS file: /home/cvs/xml-batik/resources/org/apache/batik/bridge/resources/Messages.properties,v
  retrieving revision 1.17
  retrieving revision 1.17.2.1
  diff -u -r1.17 -r1.17.2.1
  --- Messages.properties	30 Oct 2004 16:54:53 -0000	1.17
  +++ Messages.properties	25 Feb 2005 03:18:14 -0000	1.17.2.1
  @@ -116,3 +116,6 @@
   
   BaseScriptingEnvironment.constant.event.script.description = \
   Event attribute {0}:{2} {1}
  +
  +SVG12ScriptingEnvironment.constant.handler.script.description = \
  +Handler {0}:{3} {1} {2}
  
  
  
  No                   revision
  No                   revision
  
  	<<Binary file>>
  
  
  1.48.2.1  +159 -145  xml-batik/sources/org/apache/batik/bridge/ScriptingEnvironment.java
  
  Index: ScriptingEnvironment.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/ScriptingEnvironment.java,v
  retrieving revision 1.48
  retrieving revision 1.48.2.1
  diff -u -r1.48 -r1.48.2.1
  --- ScriptingEnvironment.java	12 Feb 2005 01:48:23 -0000	1.48
  +++ ScriptingEnvironment.java	25 Feb 2005 03:18:14 -0000	1.48.2.1
  @@ -411,104 +411,12 @@
       }
   
       /**
  -     * Adds the scripting listeners to the given element.
  +     * Adds the scripting listeners to the given element and all of
  +     * its descendants.
        */
       protected void addScriptingListeners(Node node) {
           if (node.getNodeType() == Node.ELEMENT_NODE) {
  -            // Attach the listeners
  -            Element elt = (Element)node;
  -            EventTarget target = (EventTarget)elt;
  -            if (SVGConstants.SVG_NAMESPACE_URI.equals(elt.getNamespaceURI())) {
  -                if (SVGConstants.SVG_SVG_TAG.equals(elt.getLocalName())) {
  -                    // <svg> listeners
  -                    if (elt.hasAttributeNS(null, "onabort")) {
  -                        target.addEventListener("SVGAbort",
  -                                                svgAbortListener, false);
  -                    }
  -                    if (elt.hasAttributeNS(null, "onerror")) {
  -                        target.addEventListener("SVGError",
  -                                                svgErrorListener, false);
  -                    }
  -                    if (elt.hasAttributeNS(null, "onresize")) {
  -                        target.addEventListener("SVGResize",
  -                                                svgResizeListener, false);
  -                    }
  -                    if (elt.hasAttributeNS(null, "onscroll")) {
  -                        target.addEventListener("SVGScroll",
  -                                            svgScrollListener, false);
  -                    }
  -                    if (elt.hasAttributeNS(null, "onunload")) {
  -                        target.addEventListener("SVGUnload",
  -                                                svgUnloadListener, false);
  -                    }
  -                    if (elt.hasAttributeNS(null, "onzoom")) {
  -                        target.addEventListener("SVGZoom",
  -                                                svgZoomListener, false);
  -                    }
  -                } else {
  -                    String name = elt.getLocalName();
  -                    if (name.equals(SVGConstants.SVG_SET_TAG) ||
  -                        name.startsWith("animate")) {
  -                        // animation listeners
  -                        if (elt.hasAttributeNS(null, "onbegin")) {
  -                            target.addEventListener("beginEvent",
  -                                                    beginListener ,
  -                                                    false);
  -                        }
  -                        if (elt.hasAttributeNS(null, "onend")) {
  -                            target.addEventListener("endEvent",
  -                                                    endListener,
  -                                                    false);
  -                        }
  -                        if (elt.hasAttributeNS(null, "onrepeat")) {
  -                            target.addEventListener("repeatEvent",
  -                                                    repeatListener ,
  -                                                    false);
  -                        }
  -                        return;
  -                    }
  -                }
  -            }
  -
  -            // UI listeners
  -            if (elt.hasAttributeNS(null, "onfocusin")) {
  -                target.addEventListener("DOMFocusIn", focusinListener, false);
  -            }
  -            if (elt.hasAttributeNS(null, "onfocusout")) {
  -                target.addEventListener("DOMFocusOut", focusoutListener,
  -                                        false);
  -            }
  -            if (elt.hasAttributeNS(null, "onactivate")) {
  -                target.addEventListener("DOMActivate", activateListener,
  -                                        false);
  -            }
  -            if (elt.hasAttributeNS(null, "onclick")) {
  -                target.addEventListener("click", clickListener, false);
  -            } 
  -            if (elt.hasAttributeNS(null, "onmousedown")) {
  -                target.addEventListener("mousedown", mousedownListener, false);
  -            }
  -            if (elt.hasAttributeNS(null, "onmouseup")) {
  -                target.addEventListener("mouseup", mouseupListener, false);
  -            }
  -            if (elt.hasAttributeNS(null, "onmouseover")) {
  -                target.addEventListener("mouseover", mouseoverListener, false);
  -            }
  -            if (elt.hasAttributeNS(null, "onmouseout")) {
  -                target.addEventListener("mouseout", mouseoutListener, false);
  -            }
  -            if (elt.hasAttributeNS(null, "onmousemove")) {
  -                target.addEventListener("mousemove", mousemoveListener, false);
  -            }
  -            if (elt.hasAttributeNS(null, "onkeypress")) {
  -                target.addEventListener("keypress", keypressListener, false);
  -            }
  -            if (elt.hasAttributeNS(null, "onkeydown")) {
  -                target.addEventListener("keydown", keydownListener, false);
  -            }
  -            if (elt.hasAttributeNS(null, "onkeyup")) {
  -                target.addEventListener("keyup", keyupListener, false);
  -            }
  +            addScriptingListenersOn((Element) node);
           }
   
           // Adds the listeners to the children
  @@ -520,60 +428,112 @@
       }
   
       /**
  -     * Removes the scripting listeners from the given element.
  +     * Adds the scripting listeners to the given element.
        */
  -    protected void removeScriptingListeners(Node node) {
  -        if (node.getNodeType() == Node.ELEMENT_NODE) {
  -            // Detach the listeners
  -            Element elt = (Element)node;
  -            EventTarget target = (EventTarget)elt;
  -            if (SVGConstants.SVG_NAMESPACE_URI.equals(elt.getNamespaceURI())) {
  -                if (SVGConstants.SVG_SVG_TAG.equals(elt.getLocalName())) {
  -                    // <svg> listeners
  -                    target.removeEventListener("SVGAbort",
  -                                               svgAbortListener, false);
  -                    target.removeEventListener("SVGError",
  -                                               svgErrorListener, false);
  -                    target.removeEventListener("SVGResize",
  -                                               svgResizeListener, false);
  -                    target.removeEventListener("SVGScroll",
  -                                               svgScrollListener, false);
  -                    target.removeEventListener("SVGUnload",
  -                                               svgUnloadListener, false);
  -                    target.removeEventListener("SVGZoom",
  -                                               svgZoomListener, false);
  -                } else {
  -                    String name = elt.getLocalName();
  -                    if (name.equals(SVGConstants.SVG_SET_TAG) ||
  -                        name.startsWith("animate")) {
  -                        // animation listeners
  -                        target.removeEventListener("beginEvent",
  -                                                   beginListener ,
  -                                                   false);
  -                        target.removeEventListener("endEvent",
  -                                                   endListener,
  -                                                   false);
  -                        target.removeEventListener("repeatEvent",
  -                                                   repeatListener ,
  -                                                   false);
  -                        return;
  +    protected void addScriptingListenersOn(Element elt) {
  +        // Attach the listeners
  +        EventTarget target = (EventTarget)elt;
  +        if (SVGConstants.SVG_NAMESPACE_URI.equals(elt.getNamespaceURI())) {
  +            if (SVGConstants.SVG_SVG_TAG.equals(elt.getLocalName())) {
  +                // <svg> listeners
  +                if (elt.hasAttributeNS(null, "onabort")) {
  +                    target.addEventListener("SVGAbort",
  +                                            svgAbortListener, false);
  +                }
  +                if (elt.hasAttributeNS(null, "onerror")) {
  +                    target.addEventListener("SVGError",
  +                                            svgErrorListener, false);
  +                }
  +                if (elt.hasAttributeNS(null, "onresize")) {
  +                    target.addEventListener("SVGResize",
  +                                            svgResizeListener, false);
  +                }
  +                if (elt.hasAttributeNS(null, "onscroll")) {
  +                    target.addEventListener("SVGScroll",
  +                                        svgScrollListener, false);
  +                }
  +                if (elt.hasAttributeNS(null, "onunload")) {
  +                    target.addEventListener("SVGUnload",
  +                                            svgUnloadListener, false);
  +                }
  +                if (elt.hasAttributeNS(null, "onzoom")) {
  +                    target.addEventListener("SVGZoom",
  +                                            svgZoomListener, false);
  +                }
  +            } else {
  +                String name = elt.getLocalName();
  +                if (name.equals(SVGConstants.SVG_SET_TAG) ||
  +                    name.startsWith("animate")) {
  +                    // animation listeners
  +                    if (elt.hasAttributeNS(null, "onbegin")) {
  +                        target.addEventListener("beginEvent",
  +                                                beginListener ,
  +                                                false);
  +                    }
  +                    if (elt.hasAttributeNS(null, "onend")) {
  +                        target.addEventListener("endEvent",
  +                                                endListener,
  +                                                false);
  +                    }
  +                    if (elt.hasAttributeNS(null, "onrepeat")) {
  +                        target.addEventListener("repeatEvent",
  +                                                repeatListener ,
  +                                                false);
                       }
  +                    return;
                   }
               }
  +        }
   
  -            // UI listeners
  -            target.removeEventListener("DOMFocusIn", focusinListener, false);
  -            target.removeEventListener("DOMFocusOut", focusoutListener, false);
  -            target.removeEventListener("DOMActivate", activateListener, false);
  -            target.removeEventListener("click", clickListener, false);
  -            target.removeEventListener("mousedown", mousedownListener, false);
  -            target.removeEventListener("mouseup", mouseupListener, false);
  -            target.removeEventListener("mouseover", mouseoverListener, false);
  -            target.removeEventListener("mouseout", mouseoutListener, false);
  -            target.removeEventListener("mousemove", mousemoveListener, false);
  -            target.removeEventListener("keypress", keypressListener, false);
  -            target.removeEventListener("keydown", keydownListener, false);
  -            target.removeEventListener("keyup", keyupListener, false);
  +        // UI listeners
  +        if (elt.hasAttributeNS(null, "onfocusin")) {
  +            target.addEventListener("DOMFocusIn", focusinListener, false);
  +        }
  +        if (elt.hasAttributeNS(null, "onfocusout")) {
  +            target.addEventListener("DOMFocusOut", focusoutListener,
  +                                    false);
  +        }
  +        if (elt.hasAttributeNS(null, "onactivate")) {
  +            target.addEventListener("DOMActivate", activateListener,
  +                                    false);
  +        }
  +        if (elt.hasAttributeNS(null, "onclick")) {
  +            target.addEventListener("click", clickListener, false);
  +        } 
  +        if (elt.hasAttributeNS(null, "onmousedown")) {
  +            target.addEventListener("mousedown", mousedownListener, false);
  +        }
  +        if (elt.hasAttributeNS(null, "onmouseup")) {
  +            target.addEventListener("mouseup", mouseupListener, false);
  +        }
  +        if (elt.hasAttributeNS(null, "onmouseover")) {
  +            target.addEventListener("mouseover", mouseoverListener, false);
  +        }
  +        if (elt.hasAttributeNS(null, "onmouseout")) {
  +            target.addEventListener("mouseout", mouseoutListener, false);
  +        }
  +        if (elt.hasAttributeNS(null, "onmousemove")) {
  +            target.addEventListener("mousemove", mousemoveListener, false);
  +        }
  +        if (elt.hasAttributeNS(null, "onkeypress")) {
  +            target.addEventListener("keypress", keypressListener, false);
  +        }
  +        if (elt.hasAttributeNS(null, "onkeydown")) {
  +            target.addEventListener("keydown", keydownListener, false);
  +        }
  +        if (elt.hasAttributeNS(null, "onkeyup")) {
  +            target.addEventListener("keyup", keyupListener, false);
  +        }
  +    }
  +
  +    /**
  +     * Removes the scripting listeners from the given element and all
  +     * of its descendants.
  +     */
  +    protected void removeScriptingListeners(Node node) {
  +        if (node.getNodeType() == Node.ELEMENT_NODE) {
  +            // Detach the listeners
  +            removeScriptingListenersOn((Element) node);
           }
   
           // Removes the listeners from the children
  @@ -585,6 +545,60 @@
       }
   
       /**
  +     * Removes the scripting listeners from the given element.
  +     */
  +    protected void removeScriptingListenersOn(Element elt) {
  +        EventTarget target = (EventTarget)elt;
  +        if (SVGConstants.SVG_NAMESPACE_URI.equals(elt.getNamespaceURI())) {
  +            if (SVGConstants.SVG_SVG_TAG.equals(elt.getLocalName())) {
  +                // <svg> listeners
  +                target.removeEventListener("SVGAbort",
  +                                           svgAbortListener, false);
  +                target.removeEventListener("SVGError",
  +                                           svgErrorListener, false);
  +                target.removeEventListener("SVGResize",
  +                                           svgResizeListener, false);
  +                target.removeEventListener("SVGScroll",
  +                                           svgScrollListener, false);
  +                target.removeEventListener("SVGUnload",
  +                                           svgUnloadListener, false);
  +                target.removeEventListener("SVGZoom",
  +                                           svgZoomListener, false);
  +            } else {
  +                String name = elt.getLocalName();
  +                if (name.equals(SVGConstants.SVG_SET_TAG) ||
  +                    name.startsWith("animate")) {
  +                    // animation listeners
  +                    target.removeEventListener("beginEvent",
  +                                               beginListener ,
  +                                               false);
  +                    target.removeEventListener("endEvent",
  +                                               endListener,
  +                                               false);
  +                    target.removeEventListener("repeatEvent",
  +                                               repeatListener ,
  +                                               false);
  +                    return;
  +                }
  +            }
  +        }
  +
  +        // UI listeners
  +        target.removeEventListener("DOMFocusIn", focusinListener, false);
  +        target.removeEventListener("DOMFocusOut", focusoutListener, false);
  +        target.removeEventListener("DOMActivate", activateListener, false);
  +        target.removeEventListener("click", clickListener, false);
  +        target.removeEventListener("mousedown", mousedownListener, false);
  +        target.removeEventListener("mouseup", mouseupListener, false);
  +        target.removeEventListener("mouseover", mouseoverListener, false);
  +        target.removeEventListener("mouseout", mouseoutListener, false);
  +        target.removeEventListener("mousemove", mousemoveListener, false);
  +        target.removeEventListener("keypress", keypressListener, false);
  +        target.removeEventListener("keydown", keydownListener, false);
  +        target.removeEventListener("keyup", keyupListener, false);
  +    }
  +
  +    /**
        * Updates the registration of a listener on the given element.
        */
       protected void updateScriptingListeners(Element elt, String attr) {
  
  
  
  1.37.2.1  +9 -2      xml-batik/sources/org/apache/batik/bridge/UpdateManager.java
  
  Index: UpdateManager.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/UpdateManager.java,v
  retrieving revision 1.37
  retrieving revision 1.37.2.1
  diff -u -r1.37 -r1.37.2.1
  --- UpdateManager.java	20 Feb 2005 21:59:10 -0000	1.37
  +++ UpdateManager.java	25 Feb 2005 03:18:14 -0000	1.37.2.1
  @@ -26,6 +26,8 @@
   import java.util.LinkedList;
   import java.util.List;
   
  +import org.apache.batik.bridge.svg12.SVG12ScriptingEnvironment;
  +import org.apache.batik.dom.svg.SVGOMDocument;
   import org.apache.batik.gvt.GraphicsNode;
   import org.apache.batik.gvt.RootGraphicsNode;
   import org.apache.batik.gvt.UpdateTracker;
  @@ -140,7 +142,12 @@
   
           graphicsNode = gn;
   
  -        scriptingEnvironment = new ScriptingEnvironment(ctx);
  +        SVGOMDocument d = (SVGOMDocument) doc;
  +        if (d.isSVG12()) {
  +            scriptingEnvironment = new SVG12ScriptingEnvironment(ctx);
  +        } else {
  +            scriptingEnvironment = new ScriptingEnvironment(ctx);
  +        }
       }
   
       /**
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +23 -0     xml-batik/sources/org/apache/batik/bridge/svg12/SVG12BridgeExtension.java
  
  Index: SVG12BridgeExtension.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/svg12/SVG12BridgeExtension.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- SVG12BridgeExtension.java	18 Nov 2004 01:46:55 -0000	1.1
  +++ SVG12BridgeExtension.java	25 Feb 2005 03:18:14 -0000	1.1.2.1
  @@ -23,6 +23,7 @@
   import org.apache.batik.bridge.BridgeContext;
   import org.apache.batik.bridge.SVGBridgeExtension;
   import org.apache.batik.util.SVGConstants;
  +import org.apache.batik.util.SVG12Constants;
   import org.w3c.dom.Element;
   
   /**
  @@ -97,4 +98,26 @@
           ctx.putBridge(new SVGMultiImageElementBridge());
           ctx.putBridge(new SVGSolidColorElementBridge());
       }
  +
  +    /**
  +     * Whether the presence of the specified element should cause
  +     * the document to be dynamic.  If this element isn't handled
  +     * by this BridgeExtension, just return false.
  +     *
  +     * @param e The element to check.
  +     */
  +    public boolean isDynamicElement(Element e) {
  +        String ns = e.getNamespaceURI();
  +        if (!SVGConstants.SVG_NAMESPACE_URI.equals(ns)) {
  +            return false;
  +        }
  +        String ln = e.getLocalName();
  +        if (ln.equals(SVGConstants.SVG_SCRIPT_TAG)
  +                || ln.equals(SVG12Constants.SVG_HANDLER_TAG)
  +                || ln.startsWith("animate")
  +                || ln.equals("set")) {
  +            return true;
  +        }
  +        return false;
  +    }
   }
  
  
  
  No                   revision
  
  Index: SVG12BridgeExtension.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/svg12/SVG12BridgeExtension.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- SVG12BridgeExtension.java	18 Nov 2004 01:46:55 -0000	1.1
  +++ SVG12BridgeExtension.java	25 Feb 2005 03:18:14 -0000	1.1.2.1
  @@ -23,6 +23,7 @@
   import org.apache.batik.bridge.BridgeContext;
   import org.apache.batik.bridge.SVGBridgeExtension;
   import org.apache.batik.util.SVGConstants;
  +import org.apache.batik.util.SVG12Constants;
   import org.w3c.dom.Element;
   
   /**
  @@ -97,4 +98,26 @@
           ctx.putBridge(new SVGMultiImageElementBridge());
           ctx.putBridge(new SVGSolidColorElementBridge());
       }
  +
  +    /**
  +     * Whether the presence of the specified element should cause
  +     * the document to be dynamic.  If this element isn't handled
  +     * by this BridgeExtension, just return false.
  +     *
  +     * @param e The element to check.
  +     */
  +    public boolean isDynamicElement(Element e) {
  +        String ns = e.getNamespaceURI();
  +        if (!SVGConstants.SVG_NAMESPACE_URI.equals(ns)) {
  +            return false;
  +        }
  +        String ln = e.getLocalName();
  +        if (ln.equals(SVGConstants.SVG_SCRIPT_TAG)
  +                || ln.equals(SVG12Constants.SVG_HANDLER_TAG)
  +                || ln.startsWith("animate")
  +                || ln.equals("set")) {
  +            return true;
  +        }
  +        return false;
  +    }
   }
  
  
  
  No                   revision
  
  Index: SVG12BridgeExtension.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/svg12/SVG12BridgeExtension.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- SVG12BridgeExtension.java	18 Nov 2004 01:46:55 -0000	1.1
  +++ SVG12BridgeExtension.java	25 Feb 2005 03:18:14 -0000	1.1.2.1
  @@ -23,6 +23,7 @@
   import org.apache.batik.bridge.BridgeContext;
   import org.apache.batik.bridge.SVGBridgeExtension;
   import org.apache.batik.util.SVGConstants;
  +import org.apache.batik.util.SVG12Constants;
   import org.w3c.dom.Element;
   
   /**
  @@ -97,4 +98,26 @@
           ctx.putBridge(new SVGMultiImageElementBridge());
           ctx.putBridge(new SVGSolidColorElementBridge());
       }
  +
  +    /**
  +     * Whether the presence of the specified element should cause
  +     * the document to be dynamic.  If this element isn't handled
  +     * by this BridgeExtension, just return false.
  +     *
  +     * @param e The element to check.
  +     */
  +    public boolean isDynamicElement(Element e) {
  +        String ns = e.getNamespaceURI();
  +        if (!SVGConstants.SVG_NAMESPACE_URI.equals(ns)) {
  +            return false;
  +        }
  +        String ln = e.getLocalName();
  +        if (ln.equals(SVGConstants.SVG_SCRIPT_TAG)
  +                || ln.equals(SVG12Constants.SVG_HANDLER_TAG)
  +                || ln.startsWith("animate")
  +                || ln.equals("set")) {
  +            return true;
  +        }
  +        return false;
  +    }
   }
  
  
  
  1.1.2.1   +197 -0    xml-batik/sources/org/apache/batik/bridge/svg12/Attic/SVG12ScriptingEnvironment.java
  
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +20 -1     xml-batik/sources/org/apache/batik/dom/svg12/SVG12DOMImplementation.java
  
  Index: SVG12DOMImplementation.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/dom/svg12/SVG12DOMImplementation.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- SVG12DOMImplementation.java	22 Feb 2005 12:33:56 -0000	1.1.2.1
  +++ SVG12DOMImplementation.java	25 Feb 2005 03:18:14 -0000	1.1.2.2
  @@ -170,6 +170,9 @@
           svg12Factories.put(SVG12Constants.SVG_FLOW_SPAN_TAG,
                              new FlowSpanElementFactory());
   
  +        svg12Factories.put(SVG12Constants.SVG_HANDLER_TAG,
  +                           new HandlerElementFactory());
  +
           svg12Factories.put(SVG12Constants.SVG_MULTI_IMAGE_TAG,
                              new MultiImageElementFactory());
   
  @@ -303,6 +306,22 @@
               return new SVGOMFlowSpanElement(prefix, (AbstractDocument)doc);
           }
       }
  +
  +    /**
  +     * To create a 'handler' element.
  +     */
  +    protected static class HandlerElementFactory 
  +        implements ElementFactory {
  +        public HandlerElementFactory() {
  +        }
  +        /**
  +         * Creates an instance of the associated element type.
  +         */
  +        public Element create(String prefix, Document doc) {
  +            return new SVGOMHandlerElement(prefix, (AbstractDocument)doc);
  +        }
  +    }
  +
       /**
        * To create a 'multiImage' element.
        */
  
  
  
  No                   revision
  
  Index: SVG12DOMImplementation.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/dom/svg12/SVG12DOMImplementation.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- SVG12DOMImplementation.java	22 Feb 2005 12:33:56 -0000	1.1.2.1
  +++ SVG12DOMImplementation.java	25 Feb 2005 03:18:14 -0000	1.1.2.2
  @@ -170,6 +170,9 @@
           svg12Factories.put(SVG12Constants.SVG_FLOW_SPAN_TAG,
                              new FlowSpanElementFactory());
   
  +        svg12Factories.put(SVG12Constants.SVG_HANDLER_TAG,
  +                           new HandlerElementFactory());
  +
           svg12Factories.put(SVG12Constants.SVG_MULTI_IMAGE_TAG,
                              new MultiImageElementFactory());
   
  @@ -303,6 +306,22 @@
               return new SVGOMFlowSpanElement(prefix, (AbstractDocument)doc);
           }
       }
  +
  +    /**
  +     * To create a 'handler' element.
  +     */
  +    protected static class HandlerElementFactory 
  +        implements ElementFactory {
  +        public HandlerElementFactory() {
  +        }
  +        /**
  +         * Creates an instance of the associated element type.
  +         */
  +        public Element create(String prefix, Document doc) {
  +            return new SVGOMHandlerElement(prefix, (AbstractDocument)doc);
  +        }
  +    }
  +
       /**
        * To create a 'multiImage' element.
        */
  
  
  
  No                   revision
  
  Index: SVG12DOMImplementation.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/dom/svg12/SVG12DOMImplementation.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- SVG12DOMImplementation.java	22 Feb 2005 12:33:56 -0000	1.1.2.1
  +++ SVG12DOMImplementation.java	25 Feb 2005 03:18:14 -0000	1.1.2.2
  @@ -170,6 +170,9 @@
           svg12Factories.put(SVG12Constants.SVG_FLOW_SPAN_TAG,
                              new FlowSpanElementFactory());
   
  +        svg12Factories.put(SVG12Constants.SVG_HANDLER_TAG,
  +                           new HandlerElementFactory());
  +
           svg12Factories.put(SVG12Constants.SVG_MULTI_IMAGE_TAG,
                              new MultiImageElementFactory());
   
  @@ -303,6 +306,22 @@
               return new SVGOMFlowSpanElement(prefix, (AbstractDocument)doc);
           }
       }
  +
  +    /**
  +     * To create a 'handler' element.
  +     */
  +    protected static class HandlerElementFactory 
  +        implements ElementFactory {
  +        public HandlerElementFactory() {
  +        }
  +        /**
  +         * Creates an instance of the associated element type.
  +         */
  +        public Element create(String prefix, Document doc) {
  +            return new SVGOMHandlerElement(prefix, (AbstractDocument)doc);
  +        }
  +    }
  +
       /**
        * To create a 'multiImage' element.
        */
  
  
  
  1.1.2.1   +63 -0     xml-batik/sources/org/apache/batik/dom/svg12/Attic/SVGOMHandlerElement.java
  
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +209 -0    xml-batik/sources/org/apache/batik/dom/util/Attic/TriplyIndexedTable.java
  
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +24 -14    xml-batik/sources/org/apache/batik/util/SVG12Constants.java
  
  Index: SVG12Constants.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/util/SVG12Constants.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- SVG12Constants.java	18 Nov 2004 01:47:02 -0000	1.1
  +++ SVG12Constants.java	25 Feb 2005 03:18:14 -0000	1.1.2.1
  @@ -27,6 +27,8 @@
    */
   public interface SVG12Constants extends SVGConstants {
   
  +    // SVG 1.2 element tag names ////////////////////////////////////////////
  +
       /** Tag name for Batik's flowRoot extension (SVG 1.2). */
       public static final String SVG_FLOW_ROOT_TAG = 
           "flowRoot";
  @@ -60,29 +62,43 @@
       public static final String SVG_FLOW_SPAN_TAG = 
           "flowSpan";
   
  -    /** Tag name for Batik's solid color extension (SVG 1.2). */
  -    public static final String SVG_SOLID_COLOR_TAG = 
  -        "solidColor";
  +    /** SVG 1.2 'handler' element tag name. */
  +    public static final String SVG_HANDLER_TAG =
  +        "handler";
   
       /** Tag name for Batik's multiImage extension. */
       public static final String SVG_MULTI_IMAGE_TAG =
           "multiImage";
   
  +    /** Tag name for Batik's solid color extension (SVG 1.2). */
  +    public static final String SVG_SOLID_COLOR_TAG = 
  +        "solidColor";
  +
       /** Tag name for Batik's subImage multiImage extension. */
       public static final String SVG_SUB_IMAGE_TAG =
           "subImage";
  +
       /** Tag name for Batik's subImageRef multiImage extension. */
       public static final String SVG_SUB_IMAGE_REF_TAG =
           "subImageRef";
   
  -    /** Attribute name for pixel-width attribute */
  -    public static final String SVG_MIN_PIXEL_SIZE_ATTRIBUTE = 
  -        "min-pixel-size";
  +    // SVG 1.2 attribute names ///////////////////////////////////////////////
  +
  +    /** Attribute name for filterPrimitiveMarginsUnits */
  +    public static final String SVG_FILTER_PRIMITIVE_MARGINS_UNITS_ATTRIBUTE =
  +        "filterPrimitiveMarginsUnits";
  +
  +    /** Attribute name for filterMarginsUnits */
  +    public static final String SVG_FILTER_MARGINS_UNITS_ATTRIBUTE =
  +        "filterMarginsUnits";
   
       /** Attribute name for pixel-height attribute */
       public static final String SVG_MAX_PIXEL_SIZE_ATTRIBUTE = 
           "max-pixel-size";
   
  +    /** Attribute name for pixel-width attribute */
  +    public static final String SVG_MIN_PIXEL_SIZE_ATTRIBUTE = 
  +        "min-pixel-size";
   
       /** Attribute name for filter mx attribute */
       public static final String SVG_MX_ATRIBUTE =
  @@ -100,13 +116,7 @@
       public static final String SVG_MH_ATRIBUTE =
           "mh";
   
  -    /** Attribute name for filterPrimitiveMarginsUnits */
  -    public static final String SVG_FILTER_PRIMITIVE_MARGINS_UNITS_ATTRIBUTE
  -        = "filterPrimitiveMarginsUnits";
  -
  -    /** Attribute name for filterMarginsUnits */
  -    public static final String SVG_FILTER_MARGINS_UNITS_ATTRIBUTE
  -        = "filterMarginsUnits";
  +    // SVG 1.2 attribute default values //////////////////////////////////////
   
       /** Default value for filter mx */
       public static final String SVG_FILTER_MX_DEFAULT_VALUE = "0";
  
  
  
  1.6.2.2   +3 -2      xml-batik/sources/org/apache/batik/util/XMLConstants.java
  
  Index: XMLConstants.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/util/XMLConstants.java,v
  retrieving revision 1.6.2.1
  retrieving revision 1.6.2.2
  diff -u -r1.6.2.1 -r1.6.2.2
  --- XMLConstants.java	22 Feb 2005 12:33:57 -0000	1.6.2.1
  +++ XMLConstants.java	25 Feb 2005 03:18:14 -0000	1.6.2.2
  @@ -36,12 +36,13 @@
       String XMLNS_PREFIX = "xmlns";
       String XLINK_PREFIX = "xlink";
   
  -    // xml:{lang,space,base} attributes
  +    // xml:{lang,space,base} and XML Events attributes
       String XML_LANG_ATTRIBUTE  = XML_PREFIX + ":lang";
       String XML_SPACE_ATTRIBUTE = XML_PREFIX + ":space";
       String XML_DEFAULT_VALUE = "default";
       String XML_PRESERVE_VALUE = "preserve";
       String XML_BASE_ATTRIBUTE = "base";
  +    String XML_EVENTS_EVENT_ATTRIBUTE = "event";
   
       // Serialization constants
       String XML_TAB = "    ";
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +2 -1      xml-batik/sources-1.4/org/apache/batik/gvt/event/Attic/AWTEventDispatcher.java
  
  Index: AWTEventDispatcher.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources-1.4/org/apache/batik/gvt/event/Attic/AWTEventDispatcher.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- AWTEventDispatcher.java	22 Feb 2005 07:42:54 -0000	1.1.2.1
  +++ AWTEventDispatcher.java	25 Feb 2005 03:18:14 -0000	1.1.2.2
  @@ -17,6 +17,7 @@
    */
   package org.apache.batik.gvt.event;
   
  +import java.awt.event.KeyEvent;
   import java.awt.event.MouseWheelEvent;
   import java.awt.event.MouseWheelListener;
   
  
  
  

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


Mime
View raw message