KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

37     protected final static StringMap values = new StringMap();
38     static {
39     values.put(CSSConstants.CSS_BLOCK_VALUE,
40                    ValueConstants.BLOCK_VALUE);
41     values.put(CSSConstants.CSS_COMPACT_VALUE,
42                    ValueConstants.COMPACT_VALUE);
43     values.put(CSSConstants.CSS_INLINE_VALUE,
44                    ValueConstants.INLINE_VALUE);
45     values.put(CSSConstants.CSS_INLINE_TABLE_VALUE,
46                    ValueConstants.INLINE_TABLE_VALUE);
47     values.put(CSSConstants.CSS_LIST_ITEM_VALUE,
48                    ValueConstants.LIST_ITEM_VALUE);
49     values.put(CSSConstants.CSS_MARKER_VALUE,
50                    ValueConstants.MARKER_VALUE);
51     values.put(CSSConstants.CSS_NONE_VALUE,
52                    ValueConstants.NONE_VALUE);
53     values.put(CSSConstants.CSS_RUN_IN_VALUE,
54                    ValueConstants.RUN_IN_VALUE);
55     values.put(CSSConstants.CSS_TABLE_VALUE,
56                    ValueConstants.TABLE_VALUE);
57     values.put(CSSConstants.CSS_TABLE_CAPTION_VALUE,
58                    ValueConstants.TABLE_CAPTION_VALUE);
59     values.put(CSSConstants.CSS_TABLE_CELL_VALUE,
60                    ValueConstants.TABLE_CELL_VALUE);
61     values.put(CSSConstants.CSS_TABLE_COLUMN_VALUE,
62                    ValueConstants.TABLE_COLUMN_VALUE);
63     values.put(CSSConstants.CSS_TABLE_COLUMN_GROUP_VALUE,
64                    ValueConstants.TABLE_COLUMN_GROUP_VALUE);
65     values.put(CSSConstants.CSS_TABLE_FOOTER_GROUP_VALUE,
66                    ValueConstants.TABLE_FOOTER_GROUP_VALUE);
67     values.put(CSSConstants.CSS_TABLE_HEADER_GROUP_VALUE,
68                    ValueConstants.TABLE_HEADER_GROUP_VALUE);
69     values.put(CSSConstants.CSS_TABLE_ROW_VALUE,
70                    ValueConstants.TABLE_ROW_VALUE);
71     values.put(CSSConstants.CSS_TABLE_ROW_GROUP_VALUE,
72                    ValueConstants.TABLE_ROW_GROUP_VALUE);
73     }
74
75     /**
76      * Implements {@link
77      * org.apache.batik.css.engine.value.ValueManager#isInheritedProperty()}.
78      */

79     public boolean isInheritedProperty() {
80     return false;
81     }
82
83     /**
84      * Implements {@link
85      * org.apache.batik.css.engine.value.ValueManager#getPropertyName()}.
86      */

87     public String JavaDoc getPropertyName() {
88     return CSSConstants.CSS_DISPLAY_PROPERTY;
89     }
90     
91     /**
92      * Implements {@link
93      * org.apache.batik.css.engine.value.ValueManager#getDefaultValue()}.
94      */

95     public Value getDefaultValue() {
96         return ValueConstants.INLINE_VALUE;
97     }
98
99     /**
100      * Implements {@link IdentifierManager#getIdentifiers()}.
101      */

102     public StringMap getIdentifiers() {
103         return values;
104     }
105 }
106
Popular Tags