KickJava   Java API By Example, From Geeks To Geeks.

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


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.svg.SVGAnimatedEnumeration;
22 import org.w3c.dom.svg.SVGAnimatedNumber;
23 import org.w3c.dom.svg.SVGAnimatedNumberList;
24 import org.w3c.dom.svg.SVGComponentTransferFunctionElement;
25
26 /**
27  * This class represents the component transfer function elements.
28  *
29  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
30  * @version $Id: SVGOMComponentTransferFunctionElement.java,v 1.8 2004/08/18 07:13:14 vhardy Exp $
31  */

32 public abstract class SVGOMComponentTransferFunctionElement
33     extends SVGOMElement
34     implements SVGComponentTransferFunctionElement {
35
36     /**
37      * The 'type' attribute values.
38      */

39     protected final static String JavaDoc[] TYPE_VALUES = {
40         "",
41         SVG_IDENTITY_VALUE,
42         SVG_TABLE_VALUE,
43         SVG_DISCRETE_VALUE,
44         SVG_LINEAR_VALUE,
45         SVG_GAMMA_VALUE
46     };
47
48     /**
49      * Creates a new Element object.
50      */

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

59     protected SVGOMComponentTransferFunctionElement(String JavaDoc prefix,
60                                                     AbstractDocument owner) {
61         super(prefix, owner);
62     }
63
64     /**
65      * <b>DOM</b>: Implements {@link
66      * SVGComponentTransferFunctionElement#getType()}.
67      */

68     public SVGAnimatedEnumeration getType() {
69         return getAnimatedEnumerationAttribute
70             (null, SVG_TYPE_ATTRIBUTE, TYPE_VALUES, (short)1);
71     }
72
73     /**
74      * <b>DOM</b>: Implements {@link
75      * SVGComponentTransferFunctionElement#getTableValues()}.
76      */

77     public SVGAnimatedNumberList getTableValues() {
78         throw new RuntimeException JavaDoc("!!! TODO: getTableValues");
79     }
80
81     /**
82      * <b>DOM</b>: Implements {@link
83      * SVGComponentTransferFunctionElement#getSlope()}.
84      */

85     public SVGAnimatedNumber getSlope() {
86         return getAnimatedNumberAttribute(null, SVG_SLOPE_ATTRIBUTE, 1f);
87     }
88
89     /**
90      * <b>DOM</b>: Implements {@link
91      * SVGComponentTransferFunctionElement#getIntercept()}.
92      */

93     public SVGAnimatedNumber getIntercept() {
94         return getAnimatedNumberAttribute(null, SVG_INTERCEPT_ATTRIBUTE, 0f);
95     }
96
97     /**
98      * <b>DOM</b>: Implements {@link
99      * SVGComponentTransferFunctionElement#getAmplitude()}.
100      */

101     public SVGAnimatedNumber getAmplitude() {
102         return getAnimatedNumberAttribute(null, SVG_AMPLITUDE_ATTRIBUTE, 1f);
103     }
104
105     /**
106      * <b>DOM</b>: Implements {@link
107      * SVGComponentTransferFunctionElement#getExponent()}.
108      */

109     public SVGAnimatedNumber getExponent() {
110         return getAnimatedNumberAttribute(null, SVG_EXPONENT_ATTRIBUTE, 1f);
111     }
112
113     /**
114      * <b>DOM</b>: Implements {@link
115      * SVGComponentTransferFunctionElement#getOffset()}.
116      */

117     public SVGAnimatedNumber getOffset() {
118         return getAnimatedNumberAttribute(null, SVG_OFFSET_ATTRIBUTE, 0f);
119     }
120 }
121
Popular Tags