KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > dom > svg > SVGOMMPathElement


1 /*
2
3    Copyright 2001,2003-2004 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17  */

18 package org.apache.batik.dom.svg;
19
20 import org.apache.batik.dom.AbstractDocument;
21 import org.apache.batik.dom.util.XLinkSupport;
22 import org.apache.batik.dom.util.XMLSupport;
23 import org.w3c.dom.Node JavaDoc;
24 import org.w3c.dom.svg.SVGAnimatedBoolean;
25 import org.w3c.dom.svg.SVGMPathElement;
26
27 /**
28  * This class implements {@link SVGMPathElement}.
29  *
30  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
31  * @version $Id: SVGOMMPathElement.java,v 1.6 2004/08/18 07:13:17 vhardy Exp $
32  */

33 public class SVGOMMPathElement
34     extends SVGOMURIReferenceElement
35     implements SVGMPathElement {
36
37     /**
38      * The attribute initializer.
39      */

40     protected final static AttributeInitializer attributeInitializer;
41     static {
42         attributeInitializer = new AttributeInitializer(4);
43         attributeInitializer.addAttribute(XMLSupport.XMLNS_NAMESPACE_URI,
44                                           null, "xmlns:xlink",
45                                           XLinkSupport.XLINK_NAMESPACE_URI);
46         attributeInitializer.addAttribute(XLinkSupport.XLINK_NAMESPACE_URI,
47                                           "xlink", "type", "simple");
48         attributeInitializer.addAttribute(XLinkSupport.XLINK_NAMESPACE_URI,
49                                           "xlink", "show", "other");
50         attributeInitializer.addAttribute(XLinkSupport.XLINK_NAMESPACE_URI,
51                                           "xlink", "actuate", "onLoad");
52     }
53
54     /**
55      * Creates a new SVGOMMPathElement object.
56      */

57     protected SVGOMMPathElement() {
58     }
59
60     /**
61      * Creates a new SVGOMMPathElement object.
62      * @param prefix The namespace prefix.
63      * @param owner The owner document.
64      */

65     public SVGOMMPathElement(String JavaDoc prefix, AbstractDocument owner) {
66         super(prefix, owner);
67     }
68
69     /**
70      * <b>DOM</b>: Implements {@link Node#getLocalName()}.
71      */

72     public String JavaDoc getLocalName() {
73         return SVG_MPATH_TAG;
74     }
75
76     // SVGExternalResourcesRequired support /////////////////////////////
77

78     /**
79      * <b>DOM</b>: Implements {@link
80      * org.w3c.dom.svg.SVGExternalResourcesRequired#getExternalResourcesRequired()}.
81      */

82     public SVGAnimatedBoolean getExternalResourcesRequired() {
83         return SVGExternalResourcesRequiredSupport.
84             getExternalResourcesRequired(this);
85     }
86
87     /**
88      * Returns the AttributeInitializer for this element type.
89      * @return null if this element has no attribute with a default value.
90      */

91     protected AttributeInitializer getAttributeInitializer() {
92         return attributeInitializer;
93     }
94
95     /**
96      * Returns a new uninitialized instance of this object's class.
97      */

98     protected Node JavaDoc newNode() {
99         return new SVGOMMPathElement();
100     }
101 }
102
Popular Tags