KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2
3    Copyright 2000-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.SVGAnimatedString;
26 import org.w3c.dom.svg.SVGFEImageElement;
27
28 /**
29  * This class implements {@link SVGFEImageElement}.
30  *
31  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
32  * @version $Id: SVGOMFEImageElement.java,v 1.11 2004/08/18 07:13:15 vhardy Exp $
33  */

34 public class SVGOMFEImageElement
35     extends SVGOMFilterPrimitiveStandardAttributes
36     implements SVGFEImageElement {
37
38     /**
39      * The attribute initializer.
40      */

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

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

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

74     public String JavaDoc getLocalName() {
75         return SVG_FE_IMAGE_TAG;
76     }
77
78     /**
79      * <b>DOM</b>: Implements {@link
80      * org.w3c.dom.svg.SVGURIReference#getHref()}.
81      */

82     public SVGAnimatedString getHref() {
83         return SVGURIReferenceSupport.getHref(this);
84     }
85
86     // SVGLangSpace support //////////////////////////////////////////////////
87

88     /**
89      * <b>DOM</b>: Returns the xml:lang attribute value.
90      */

91     public String JavaDoc getXMLlang() {
92         return XMLSupport.getXMLLang(this);
93     }
94
95     /**
96      * <b>DOM</b>: Sets the xml:lang attribute value.
97      */

98     public void setXMLlang(String JavaDoc lang) {
99         setAttributeNS(XMLSupport.XML_NAMESPACE_URI,
100                        XMLSupport.XML_LANG_ATTRIBUTE,
101                        lang);
102     }
103     
104     /**
105      * <b>DOM</b>: Returns the xml:space attribute value.
106      */

107     public String JavaDoc getXMLspace() {
108         return XMLSupport.getXMLSpace(this);
109     }
110
111     /**
112      * <b>DOM</b>: Sets the xml:space attribute value.
113      */

114     public void setXMLspace(String JavaDoc space) {
115         setAttributeNS(XMLSupport.XML_NAMESPACE_URI,
116                        XMLSupport.XML_SPACE_ATTRIBUTE,
117                        space);
118     }
119
120     // SVGExternalResourcesRequired support /////////////////////////////
121

122     /**
123      * <b>DOM</b>: Implements {@link
124      * org.w3c.dom.svg.SVGExternalResourcesRequired#getExternalResourcesRequired()}.
125      */

126     public SVGAnimatedBoolean getExternalResourcesRequired() {
127     return SVGExternalResourcesRequiredSupport.
128             getExternalResourcesRequired(this);
129     }
130
131     /**
132      * Returns the AttributeInitializer for this element type.
133      * @return null if this element has no attribute with a default value.
134      */

135     protected AttributeInitializer getAttributeInitializer() {
136         return attributeInitializer;
137     }
138
139     /**
140      * Returns a new uninitialized instance of this object's class.
141      */

142     protected Node JavaDoc newNode() {
143         return new SVGOMFEImageElement();
144     }
145 }
146
Popular Tags