KickJava   Java API By Example, From Geeks To Geeks.

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


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.SVGAnimatedBoolean;
23 import org.w3c.dom.svg.SVGAnimatedEnumeration;
24 import org.w3c.dom.svg.SVGAnimatedInteger;
25 import org.w3c.dom.svg.SVGAnimatedLength;
26 import org.w3c.dom.svg.SVGAnimatedNumber;
27 import org.w3c.dom.svg.SVGAnimatedNumberList;
28 import org.w3c.dom.svg.SVGAnimatedString;
29 import org.w3c.dom.svg.SVGFEConvolveMatrixElement;
30
31 /**
32  * This class implements {@link SVGFEConvolveMatrixElement}.
33  *
34  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
35  * @version $Id: SVGOMFEConvolveMatrixElement.java,v 1.13 2004/08/18 07:13:15 vhardy Exp $
36  */

37 public class SVGOMFEConvolveMatrixElement
38     extends SVGOMFilterPrimitiveStandardAttributes
39     implements SVGFEConvolveMatrixElement {
40
41     /**
42      * The 'edgeMode' attribute values.
43      */

44     protected final static String JavaDoc[] EDGE_MODE_VALUES = {
45         "",
46         SVG_DUPLICATE_VALUE,
47         SVG_WRAP_VALUE,
48         SVG_NONE_VALUE
49     };
50
51     /**
52      * Creates a new SVGOMFEConvolveMatrixElement object.
53      */

54     protected SVGOMFEConvolveMatrixElement() {
55     }
56
57     /**
58      * Creates a new SVGOMFEConvolveMatrixElement object.
59      * @param prefix The namespace prefix.
60      * @param owner The owner document.
61      */

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

70     public String JavaDoc getLocalName() {
71         return SVG_FE_CONVOLVE_MATRIX_TAG;
72     }
73
74     /**
75      * <b>DOM</b>: Implements { @link SVGFEConvolveMatrixElement#getIn1()}.
76      */

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

84     public SVGAnimatedEnumeration getEdgeMode() {
85         return getAnimatedEnumerationAttribute
86             (null, SVG_EDGE_MODE_ATTRIBUTE, EDGE_MODE_VALUES, (short)1);
87     }
88
89     /**
90      * <b>DOM</b>: Implements {@link SVGFEConvolveMatrixElement#getKernelMatrix()}.
91      */

92     public SVGAnimatedNumberList getKernelMatrix() {
93         throw new RuntimeException JavaDoc("!!! TODO: getKernelMatrix()");
94     }
95
96     /**
97      * <b>DOM</b>: Implements {@link SVGFEConvolveMatrixElement#getOrderX()}.
98      */

99     public SVGAnimatedInteger getOrderX() {
100         throw new RuntimeException JavaDoc("!!! TODO: getOrderX()");
101     }
102
103     /**
104      * <b>DOM</b>: Implements {@link SVGFEConvolveMatrixElement#getOrderY()}.
105      */

106     public SVGAnimatedInteger getOrderY() {
107         throw new RuntimeException JavaDoc("!!! TODO: getOrderY()");
108     }
109
110     /**
111      * <b>DOM</b>: Implements {@link SVGFEConvolveMatrixElement#getTargetX()}.
112      */

113     public SVGAnimatedInteger getTargetX() {
114         // Default value relative to orderX...
115
throw new RuntimeException JavaDoc("!!! TODO: getTargetX()");
116     }
117
118     /**
119      * <b>DOM</b>: Implements {@link SVGFEConvolveMatrixElement#getTargetY()}.
120      */

121     public SVGAnimatedInteger getTargetY() {
122         // Default value relative to orderY...
123
throw new RuntimeException JavaDoc("!!! TODO: getTargetY()");
124     }
125
126     /**
127      * <b>DOM</b>: Implements {@link SVGFEConvolveMatrixElement#getDivisor()}.
128      */

129     public SVGAnimatedNumber getDivisor() {
130         // Default value relative to kernel matrix...
131
throw new RuntimeException JavaDoc("!!! TODO: getDivisor()");
132     }
133
134     /**
135      * <b>DOM</b>: Implements {@link
136      * org.w3c.dom.svg.SVGFEConvolveMatrixElement#getBias()}.
137      */

138     public SVGAnimatedNumber getBias() {
139         return getAnimatedNumberAttribute(null, SVG_BIAS_ATTRIBUTE, 0f);
140     }
141
142     /**
143      * <b>DOM</b>: Implements {@link
144      * org.w3c.dom.svg.SVGFEConvolveMatrixElement#getKernelUnitLengthX()}.
145      */

146     public SVGAnimatedLength getKernelUnitLengthX() {
147         throw new RuntimeException JavaDoc("!!! TODO: getKernelUnitLengthX()");
148     }
149
150     /**
151      * <b>DOM</b>: Implements {@link
152      * org.w3c.dom.svg.SVGFEConvolveMatrixElement#getKernelUnitLengthY()}.
153      */

154     public SVGAnimatedLength getKernelUnitLengthY() {
155         throw new RuntimeException JavaDoc("!!! TODO: getKernelUnitLengthY()");
156     }
157
158     /**
159      * <b>DOM</b>: Implements {@link
160      * org.w3c.dom.svg.SVGFEConvolveMatrixElement#getPreserveAlpha()}.
161      */

162     public SVGAnimatedBoolean getPreserveAlpha() {
163         LiveAttributeValue lav;
164         lav = getLiveAttributeValue(null, SVG_PRESERVE_ALPHA_ATTRIBUTE);
165         if (lav == null) {
166             lav = new SVGOMAnimatedBoolean
167                 (this, null, SVG_PRESERVE_ALPHA_ATTRIBUTE,
168                  getAttributeNodeNS(null, SVG_PRESERVE_ALPHA_ATTRIBUTE),
169                  "false");
170             putLiveAttributeValue(null, SVG_PRESERVE_ALPHA_ATTRIBUTE, lav);
171         }
172         return (SVGAnimatedBoolean)lav;
173     }
174
175     /**
176      * Returns a new uninitialized instance of this object's class.
177      */

178     protected Node JavaDoc newNode() {
179         return new SVGOMFEConvolveMatrixElement();
180     }
181 }
182
Popular Tags