1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
/*******************************************************************************
* Copyright (c) 2006 Sybase, Inc. and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Sybase, Inc. - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.pagedesigner.css2.property;
import java.util.HashMap;
import java.util.Map;
/**
* @author mengbo
*/
public class CSSMetaRegistry {
Map _map = new HashMap();
private static CSSMetaRegistry _instance;
private CSSMetaRegistry() {
initialize();
}
public void initialize() {
_map.put(ICSSPropertyID.ATTR_DISPLAY, new DisplayMeta());
_map.put(ICSSPropertyID.ATTR_TEXTALIGN, new TextAlignMeta());
_map.put(ICSSPropertyID.ATTR_HORIZONTAL_ALIGN,
new HorizontalAlignMeta());
_map.put(ICSSPropertyID.ATTR_TEXTDECORATION, new TextDecorationMeta());
_map.put(ICSSPropertyID.ATTR_WHITESPACE, new WhiteSpaceMeta());
_map.put(ICSSPropertyID.ATTR_WIDTH, new WidthMeta());
_map.put(ICSSPropertyID.ATTR_MIN_WIDTH, new WidthMeta());
_map.put(ICSSPropertyID.ATTR_HEIGHT, new HeightMeta());
_map.put(ICSSPropertyID.ATTR_MIN_HEIGHT, new HeightMeta());
_map.put(ICSSPropertyID.ATTR_BORDER_LEFT_WIDTH, new BorderWidthMeta());
_map.put(ICSSPropertyID.ATTR_BORDER_RIGHT_WIDTH, new BorderWidthMeta());
_map
.put(ICSSPropertyID.ATTR_BORDER_BOTTOM_WIDTH,
new BorderWidthMeta());
_map.put(ICSSPropertyID.ATTR_BORDER_TOP_WIDTH, new BorderWidthMeta());
_map.put(ICSSPropertyID.ATTR_BORDER_LEFT_STYLE, new BorderStyleMeta());
_map.put(ICSSPropertyID.ATTR_BORDER_RIGHT_STYLE, new BorderStyleMeta());
_map
.put(ICSSPropertyID.ATTR_BORDER_BOTTOM_STYLE,
new BorderStyleMeta());
_map.put(ICSSPropertyID.ATTR_BORDER_TOP_STYLE, new BorderStyleMeta());
_map.put(ICSSPropertyID.ATTR_BORDER_LEFT_COLOR, new BorderColorMeta());
_map.put(ICSSPropertyID.ATTR_BORDER_RIGHT_COLOR, new BorderColorMeta());
_map
.put(ICSSPropertyID.ATTR_BORDER_BOTTOM_COLOR,
new BorderColorMeta());
_map.put(ICSSPropertyID.ATTR_BORDER_TOP_COLOR, new BorderColorMeta());
_map.put(ICSSPropertyID.ATTR_PADDING_LEFT, new PaddingWidthMeta());
_map.put(ICSSPropertyID.ATTR_PADDING_RIGHT, new PaddingWidthMeta());
_map.put(ICSSPropertyID.ATTR_PADDING_BOTTOM, new PaddingWidthMeta());
_map.put(ICSSPropertyID.ATTR_PADDING_TOP, new PaddingWidthMeta());
_map.put(ICSSPropertyID.ATTR_MARGIN_LEFT, new MarginWidthMeta());
_map.put(ICSSPropertyID.ATTR_MARGIN_RIGHT, new MarginWidthMeta());
_map.put(ICSSPropertyID.ATTR_MARGIN_BOTTOM, new MarginWidthMeta());
_map.put(ICSSPropertyID.ATTR_MARGIN_TOP, new MarginWidthMeta());
_map.put(ICSSPropertyID.ATTR_FONT_FAMILY, new FontFamilyMeta());
_map.put(ICSSPropertyID.ATTR_FONT_SIZE, new FontSizeMeta());
_map.put(ICSSPropertyID.ATTR_FONT_STYLE, new FontStyleMeta());
_map.put(ICSSPropertyID.ATTR_FONT_WEIGHT, new FontWeightMeta());
_map.put(ICSSPropertyID.ATTR_BACKGROUND_COLOR,
new BackgroundColorMeta());
_map.put(ICSSPropertyID.ATTR_COLOR, new ColorPropertyMeta());
_map.put(ICSSPropertyID.ATTR_TEXTCOLOR, new ColorPropertyMeta());
_map.put(ICSSPropertyID.ATTR_BORDER_COLLAPSE, new BorderCollapseMeta());
_map.put(ICSSPropertyID.ATTR_BORDER_SPACING, new BorderSpacingMeta());
_map.put(ICSSPropertyID.ATTR_LIST_STYLE_TYPE, new ListStyleTypeMeta());
_map
.put(ICSSPropertyID.ATTR_LIST_STYLE_IMAGE,
new ListStyleImageMeta());
_map.put(ICSSPropertyID.ATTR_LIST_STYLE_POSITION,
new ListStylePositionMeta());
_map.put(ICSSPropertyID.ATTR_COUNTER_RESET, new CounterResetMeta());
_map.put(ICSSPropertyID.ATTR_COUNTER_INCREMENT,
new CounterIncrementMeta());
_map.put(ICSSPropertyID.ATTR_TOP, new PositionOffsetMeta());
_map.put(ICSSPropertyID.ATTR_RIGHT, new PositionOffsetMeta());
_map.put(ICSSPropertyID.ATTR_BOTTOM, new PositionOffsetMeta());
_map.put(ICSSPropertyID.ATTR_LEFT, new PositionOffsetMeta());
_map.put(ICSSPropertyID.ATTR_POSITION, new PositionMeta());
_map.put(ICSSPropertyID.ATTR_EMPTY_CELLS, new EmptyCellsMeta());
_map.put(ICSSPropertyID.ATTR_VISIBILITY, new VisibilityMeta());
_map.put(ICSSPropertyID.ATTR_VERTICAL_ALIGN, new VerticalAlignMeta());
_map.put(ICSSPropertyID.ATTR_OVERFLOW, new OverflowMeta());
}
public ICSSPropertyMeta getMeta(String property) {
return (ICSSPropertyMeta) _map.get(property);
}
public static final CSSMetaRegistry getInstance() {
if (_instance == null) {
_instance = new CSSMetaRegistry();
}
return _instance;
}
}
|