KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2
3    Copyright 2000-2003 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.w3c.dom.Node JavaDoc;
22 import org.w3c.dom.svg.SVGAnimatedEnumeration;
23 import org.w3c.dom.svg.SVGAnimatedNumber;
24 import org.w3c.dom.svg.SVGAnimatedString;
25 import org.w3c.dom.svg.SVGFEDisplacementMapElement;
26
27 /**
28  * This class implements {@link org.w3c.dom.svg.SVGFEDisplacementMapElement}.
29  *
30  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
31  * @version $Id: SVGOMFEDisplacementMapElement.java,v 1.12 2004/08/18 07:13:15 vhardy Exp $
32  */

33 public class SVGOMFEDisplacementMapElement
34     extends SVGOMFilterPrimitiveStandardAttributes
35     implements SVGFEDisplacementMapElement {
36
37     /**
38      * The 'xChannelSelector' and 'yChannelSelector' attributes values.
39      */

40     protected final static String JavaDoc[] CHANNEL_SELECTOR_VALUES = {
41         "",
42         SVG_R_VALUE,
43         SVG_G_VALUE,
44         SVG_B_VALUE,
45         SVG_A_VALUE
46     };
47
48     /**
49      * Creates a new SVGOMFEDisplacementMap object.
50      */

51     protected SVGOMFEDisplacementMapElement() {
52     }
53
54     /**
55      * Creates a new SVGOMFEDisplacementMapElement object.
56      * @param prefix The namespace prefix.
57      * @param owner The owner document.
58      */

59     public SVGOMFEDisplacementMapElement(String JavaDoc prefix,
60                                          AbstractDocument owner) {
61         super(prefix, owner);
62     }
63
64     /**
65      * <b>DOM</b>: Implements {@link org.w3c.dom.Node#getLocalName()}.
66      */

67     public String JavaDoc getLocalName() {
68         return SVG_FE_DISPLACEMENT_MAP_TAG;
69     }
70
71     /**
72      * <b>DOM</b>: Implements {@link
73      * SVGFEDisplacementMapElement#getIn1()}.
74      */

75     public SVGAnimatedString getIn1() {
76         return getAnimatedStringAttribute(null, SVG_IN_ATTRIBUTE);
77     }
78
79     /**
80      * <b>DOM</b>: Implements {@link
81      * SVGFEDisplacementMapElement#getIn2()}.
82      */

83     public SVGAnimatedString getIn2() {
84         return getAnimatedStringAttribute(null, SVG_IN2_ATTRIBUTE);
85     }
86
87     /**
88      * <b>DOM</b>: Implements {@link
89      * org.w3c.dom.svg.SVGFEDisplacementMapElement#getScale()}.
90      */

91     public SVGAnimatedNumber getScale() {
92         return getAnimatedNumberAttribute(null, SVG_SCALE_ATTRIBUTE, 0f);
93     }
94
95     /**
96      * <b>DOM</b>: Implements {@link
97      * SVGFEDisplacementMapElement#getXChannelSelector()}.
98      */

99     public SVGAnimatedEnumeration getXChannelSelector() {
100         return getAnimatedEnumerationAttribute
101             (null, SVG_X_CHANNEL_SELECTOR_ATTRIBUTE,
102              CHANNEL_SELECTOR_VALUES, (short)4);
103     }
104
105     /**
106      * <b>DOM</b>: Implements {@link
107      * SVGFEDisplacementMapElement#getYChannelSelector()}.
108      */

109     public SVGAnimatedEnumeration getYChannelSelector() {
110         return getAnimatedEnumerationAttribute
111             (null, SVG_Y_CHANNEL_SELECTOR_ATTRIBUTE,
112              CHANNEL_SELECTOR_VALUES, (short)4);
113     }
114
115     /**
116      * Returns a new uninitialized instance of this object's class.
117      */

118     protected Node JavaDoc newNode() {
119         return new SVGOMFEDisplacementMapElement();
120     }
121 }
122
Popular Tags