KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > css > engine > value > css2 > FontStyleManager


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.css2;
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.css.engine.value.ValueConstants;
24 import org.apache.batik.util.CSSConstants;
25
26 /**
27  * This class provides a manager for the 'font-style' property values.
28  *
29  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
30  * @version $Id: FontStyleManager.java,v 1.6 2004/12/03 12:20:15 deweese Exp $
31  */

32 public class FontStyleManager extends IdentifierManager {
33     
34     /**
35      * The identifier values.
36      */

37     protected final static StringMap values = new StringMap();
38     static {
39     values.put(CSSConstants.CSS_ALL_VALUE,
40                    ValueConstants.ALL_VALUE);
41     values.put(CSSConstants.CSS_ITALIC_VALUE,
42                    ValueConstants.ITALIC_VALUE);
43     values.put(CSSConstants.CSS_NORMAL_VALUE,
44                    ValueConstants.NORMAL_VALUE);
45     values.put(CSSConstants.CSS_OBLIQUE_VALUE,
46                    ValueConstants.OBLIQUE_VALUE);
47     }
48
49     /**
50      * Implements {@link
51      * org.apache.batik.css.engine.value.ValueManager#isInheritedProperty()}.
52      */

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

61     public String JavaDoc getPropertyName() {
62     return CSSConstants.CSS_FONT_STYLE_PROPERTY;
63     }
64     
65     /**
66      * Implements {@link
67      * org.apache.batik.css.engine.value.ValueManager#getDefaultValue()}.
68      */

69     public Value getDefaultValue() {
70         return ValueConstants.NORMAL_VALUE;
71     }
72
73     /**
74      * Implements {@link IdentifierManager#getIdentifiers()}.
75      */

76     public StringMap getIdentifiers() {
77         return values;
78     }
79 }
80
Popular Tags