KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > css > engine > value > svg > ColorInterpolationManager


1 /*
2
3    Copyright 2002-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.css.engine.value.svg;
19
20 import org.apache.batik.css.engine.value.IdentifierManager;
21 import org.apache.batik.css.engine.value.StringMap;
22 import org.apache.batik.css.engine.value.Value;
23 import org.apache.batik.util.CSSConstants;
24
25 /**
26  * This class provides a manager for the 'color-interpolation' property values.
27  *
28  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
29  * @version $Id: ColorInterpolationManager.java,v 1.5 2004/12/03 12:20:16 deweese Exp $
30  */

31 public class ColorInterpolationManager extends IdentifierManager {
32     
33     /**
34      * The identifier values.
35      */

36     protected final static StringMap values = new StringMap();
37     static {
38     values.put(CSSConstants.CSS_AUTO_VALUE,
39                    SVGValueConstants.AUTO_VALUE);
40     values.put(CSSConstants.CSS_LINEARRGB_VALUE,
41                    SVGValueConstants.LINEARRGB_VALUE);
42     values.put(CSSConstants.CSS_SRGB_VALUE,
43                    SVGValueConstants.SRGB_VALUE);
44     }
45
46     /**
47      * Implements {@link
48      * org.apache.batik.css.engine.value.ValueManager#isInheritedProperty()}.
49      */

50     public boolean isInheritedProperty() {
51     return true;
52     }
53
54     /**
55      * Implements {@link
56      * org.apache.batik.css.engine.value.ValueManager#getPropertyName()}.
57      */

58     public String JavaDoc getPropertyName() {
59     return CSSConstants.CSS_COLOR_INTERPOLATION_PROPERTY;
60     }
61     
62     /**
63      * Implements {@link
64      * org.apache.batik.css.engine.value.ValueManager#getDefaultValue()}.
65      */

66     public Value getDefaultValue() {
67         return SVGValueConstants.SRGB_VALUE;
68     }
69
70     /**
71      * Implements {@link IdentifierManager#getIdentifiers()}.
72      */

73     public StringMap getIdentifiers() {
74         return values;
75     }
76 }
77
Popular Tags