KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > css > engine > value > svg12 > TextAlignManager


1 /*
2
3    Copyright 2004 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
19 package org.apache.batik.css.engine.value.svg12;
20
21 import org.apache.batik.css.engine.value.IdentifierManager;
22 import org.apache.batik.css.engine.value.StringMap;
23 import org.apache.batik.css.engine.value.Value;
24 import org.apache.batik.css.engine.value.ValueConstants;
25 import org.apache.batik.util.SVG12CSSConstants;
26
27 /**
28  * This class provides a manager for the 'text-align' property values.
29  *
30  * @author <a HREF="mailto:deweese@apache.org">Thomas DeWeese</a>
31  * @version $Id: TextAlignManager.java,v 1.2 2004/12/03 12:20:16 deweese Exp $
32  */

33 public class TextAlignManager extends IdentifierManager {
34     
35     /**
36      * The identifier values.
37      */

38     protected final static StringMap values = new StringMap();
39     static {
40     values.put(SVG12CSSConstants.CSS_START_VALUE,
41                    SVG12ValueConstants.START_VALUE);
42     values.put(SVG12CSSConstants.CSS_MIDDLE_VALUE,
43                    SVG12ValueConstants.MIDDLE_VALUE);
44     values.put(SVG12CSSConstants.CSS_END_VALUE,
45                    SVG12ValueConstants.END_VALUE);
46     values.put(SVG12CSSConstants.CSS_FULL_VALUE,
47                    SVG12ValueConstants.FULL_VALUE);
48     }
49
50     /**
51      * Implements {@link
52      * org.apache.batik.css.engine.value.ValueManager#isInheritedProperty()}.
53      */

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

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

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

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