KickJava   Java API By Example, From Geeks To Geeks.

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


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 'text-anchor' property values.
27  *
28  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
29  * @version $Id: TextAnchorManager.java,v 1.5 2004/12/03 12:20:16 deweese Exp $
30  */

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

36     protected final static StringMap values = new StringMap();
37     static {
38     values.put(CSSConstants.CSS_START_VALUE,
39                    SVGValueConstants.START_VALUE);
40     values.put(CSSConstants.CSS_MIDDLE_VALUE,
41                    SVGValueConstants.MIDDLE_VALUE);
42     values.put(CSSConstants.CSS_END_VALUE,
43                    SVGValueConstants.END_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_TEXT_ANCHOR_PROPERTY;
60     }
61     
62     /**
63      * Implements {@link
64      * org.apache.batik.css.engine.value.ValueManager#getDefaultValue()}.
65      */

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

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