001/*-------------------------------------------------------------------------+
002|                                                                          |
003| Copyright 2005-2011 The ConQAT Project                                   |
004|                                                                          |
005| Licensed under the Apache License, Version 2.0 (the "License");          |
006| you may not use this file except in compliance with the License.         |
007| You may obtain a copy of the License at                                  |
008|                                                                          |
009|    http://www.apache.org/licenses/LICENSE-2.0                            |
010|                                                                          |
011| Unless required by applicable law or agreed to in writing, software      |
012| distributed under the License is distributed on an "AS IS" BASIS,        |
013| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
014| See the License for the specific language governing permissions and      |
015| limitations under the License.                                           |
016+-------------------------------------------------------------------------*/
017package org.conqat.lib.commons.html;
018
019/**
020 * This enum contains all CSS properties we are using. The rationale is to
021 * include as many properties as possible, but to exclude those that are merely
022 * a composition of other properties (such as 'font' which can be expressed
023 * using 'font-face', 'font-size', etc.). Additionally with all the browser
024 * specific extension and new standards the file is extended on a "as required"
025 * basis. So the file should be never seen as complete or even "correct".
026 * <p>
027 * The first version of this file was based on the full property table of CSS2.1
028 * (http://www.w3.org/TR/CSS21/propidx.html), preprocessed using emacs and
029 * manually fine-tuned.
030 * <p>
031 * Manual additions (from CSS3) are found towards the end.
032 */
033public enum ECSSProperty {
034
035        /** CSS property azimuth. */
036        AZIMUTH("azimuth"),
037
038        /** CSS property background-attachment. */
039        BACKGROUND_ATTACHMENT("background-attachment"),
040
041        /** CSS property background-color. */
042        BACKGROUND_COLOR("background-color"),
043
044        /** CSS property background-image. */
045        BACKGROUND_IMAGE("background-image"),
046
047        /** CSS property background-position. */
048        BACKGROUND_POSITION("background-position"),
049
050        /** CSS property background-repeat . */
051        BACKGROUND_REPEAT("background-repeat"),
052
053        /** CSS property border-collapse . */
054        BORDER_COLLAPSE("border-collapse"),
055
056        /** CSS property border-spacing . */
057        BORDER_SPACING("border-spacing"),
058
059        /** CSS property border-top-color. */
060        BORDER_TOP_COLOR("border-top-color"),
061
062        /** CSS property border-right-color. */
063        BORDER_RIGHT_COLOR("border-right-color"),
064
065        /** CSS property border-bottom-color. */
066        BORDER_BOTTOM_COLOR("border-bottom-color"),
067
068        /** CSS property border-left-color. */
069        BORDER_LEFT_COLOR("border-left-color"),
070
071        /** CSS property border-top-style. */
072        BORDER_TOP_STYLE("border-top-style"),
073
074        /** CSS property border-right-style. */
075        BORDER_RIGHT_STYLE("border-right-style"),
076
077        /** CSS property border-bottom-style. */
078        BORDER_BOTTOM_STYLE("border-bottom-style"),
079
080        /** CSS property border-left-style. */
081        BORDER_LEFT_STYLE("border-left-style"),
082
083        /** CSS property border-top-width. */
084        BORDER_TOP_WIDTH("border-top-width"),
085
086        /** CSS property border-right-width. */
087        BORDER_RIGHT_WIDTH("border-right-width"),
088
089        /** CSS property border-bottom-width. */
090        BORDER_BOTTOM_WIDTH("border-bottom-width"),
091
092        /** CSS property border-left-width. */
093        BORDER_LEFT_WIDTH("border-left-width"),
094
095        /** CSS property bottom. */
096        BOTTOM("bottom"),
097
098        /** CSS property caption-side. */
099        CAPTION_SIDE("caption-side"),
100
101        /** CSS property clear . */
102        CLEAR("clear"),
103
104        /** CSS property clip. */
105        CLIP("clip"),
106
107        /** CSS property color. */
108        COLOR("color"),
109
110        /** CSS property content. */
111        CONTENT("content"),
112
113        /** CSS property counter-increment. */
114        COUNTER_INCREMENT("counter-increment"),
115
116        /** CSS property counter-reset . */
117        COUNTER_RESET("counter-reset"),
118
119        /** CSS property cue-after. */
120        CUE_AFTER("cue-after"),
121
122        /** CSS property cue-before. */
123        CUE_BEFORE("cue-before"),
124
125        /** CSS property cursor . */
126        CURSOR("cursor"),
127
128        /** CSS property direction. */
129        DIRECTION("direction"),
130
131        /** CSS property display . */
132        DISPLAY("display"),
133
134        /** CSS property elevation. */
135        ELEVATION("elevation"),
136
137        /** CSS property empty-cells. */
138        EMPTY_CELLS("empty-cells"),
139
140        /** CSS property float. */
141        FLOAT("float"),
142
143        /** CSS property font-family. */
144        FONT_FAMILY("font-family"),
145
146        /** CSS property font-size. */
147        FONT_SIZE("font-size"),
148
149        /** CSS property font-style. */
150        FONT_STYLE("font-style"),
151
152        /** CSS property font-variant. */
153        FONT_VARIANT("font-variant"),
154
155        /** CSS property font-weight. */
156        FONT_WEIGHT("font-weight"),
157
158        /** CSS property height. */
159        HEIGHT("height"),
160
161        /** CSS property left. */
162        LEFT("left"),
163
164        /** CSS property letter-spacing. */
165        LETTER_SPACING("letter-spacing"),
166
167        /** CSS property line-height. */
168        LINE_HEIGHT("line-height"),
169
170        /** CSS property list-style-image. */
171        LIST_STYLE_IMAGE("list-style-image"),
172
173        /** CSS property list-style-position. */
174        LIST_STYLE_POSITION("list-style-position"),
175
176        /** CSS property list-style-type. */
177        LIST_STYLE_TYPE("list-style-type"),
178
179        /** CSS property margin-right. */
180        MARGIN_RIGHT("margin-right"),
181
182        /** CSS property margin-left. */
183        MARGIN_LEFT("margin-left"),
184
185        /** CSS property margin-top. */
186        MARGIN_TOP("margin-top"),
187
188        /** CSS property margin-bottom. */
189        MARGIN_BOTTOM("margin-bottom"),
190
191        /** CSS property max-height. */
192        MAX_HEIGHT("max-height"),
193
194        /** CSS property max-width . */
195        MAX_WIDTH("max-width"),
196
197        /** CSS property min-height. */
198        MIN_HEIGHT("min-height"),
199
200        /** CSS property min-width . */
201        MIN_WIDTH("min-width"),
202
203        /** CSS property orphans. */
204        ORPHANS("orphans"),
205
206        /** CSS property outline-color. */
207        OUTLINE_COLOR("outline-color"),
208
209        /** CSS property outline-style. */
210        OUTLINE_STYLE("outline-style"),
211
212        /** CSS property outline-width. */
213        OUTLINE_WIDTH("outline-width"),
214
215        /** CSS property overflow. */
216        OVERFLOW("overflow"),
217
218        /** CSS property padding-top. */
219        PADDING_TOP("padding-top"),
220
221        /** CSS property padding-right. */
222        PADDING_RIGHT("padding-right"),
223
224        /** CSS property padding-bottom. */
225        PADDING_BOTTOM("padding-bottom"),
226
227        /** CSS property padding-left. */
228        PADDING_LEFT("padding-left"),
229
230        /** CSS property page-break-after. */
231        PAGE_BREAK_AFTER("page-break-after"),
232
233        /** CSS property page-break-before. */
234        PAGE_BREAK_BEFORE("page-break-before"),
235
236        /** CSS property page-break-inside. */
237        PAGE_BREAK_INSIDE("page-break-inside"),
238
239        /** CSS property pause-after. */
240        PAUSE_AFTER("pause-after"),
241
242        /** CSS property pause-before. */
243        PAUSE_BEFORE("pause-before"),
244
245        /** CSS property pitch-range. */
246        PITCH_RANGE("pitch-range"),
247
248        /** CSS property pitch . */
249        PITCH("pitch"),
250
251        /** CSS property play-during. */
252        PLAY_DURING("play-during"),
253
254        /** CSS property position. */
255        POSITION("position"),
256
257        /** CSS property quotes . */
258        QUOTES("quotes"),
259
260        /** CSS property richness. */
261        RICHNESS("richness"),
262
263        /** CSS property right . */
264        RIGHT("right"),
265
266        /** CSS property speak-header. */
267        SPEAK_HEADER("speak-header"),
268
269        /** CSS property speak-numeral. */
270        SPEAK_NUMERAL("speak-numeral"),
271
272        /** CSS property speak-punctuation. */
273        SPEAK_PUNCTUATION("speak-punctuation"),
274
275        /** CSS property speak. */
276        SPEAK("speak"),
277
278        /** CSS property speech-rate. */
279        SPEECH_RATE("speech-rate"),
280
281        /** CSS property stress . */
282        STRESS("stress"),
283
284        /** CSS property table-layout. */
285        TABLE_LAYOUT("table-layout"),
286
287        /** CSS property text-align . */
288        TEXT_ALIGN("text-align"),
289
290        /** CSS property text-decoration. */
291        TEXT_DECORATION("text-decoration"),
292
293        /** CSS property text-indent. */
294        TEXT_INDENT("text-indent"),
295
296        /** CSS property text-transform. */
297        TEXT_TRANSFORM("text-transform"),
298
299        /** CSS property top. */
300        TOP("top"),
301
302        /** CSS property unicode-bidi. */
303        UNICODE_BIDI("unicode-bidi"),
304
305        /** CSS property vertical-align. */
306        VERTICAL_ALIGN("vertical-align"),
307
308        /** CSS property visibility. */
309        VISIBILITY("visibility"),
310
311        /** CSS property voice-family. */
312        VOICE_FAMILY("voice-family"),
313
314        /** CSS property volume. */
315        VOLUME("volume"),
316
317        /** CSS property white-space. */
318        WHITE_SPACE("white-space"),
319
320        /** CSS property widows . */
321        WIDOWS("widows"),
322
323        /** CSS property width. */
324        WIDTH("width"),
325
326        /** CSS property word-spacing. */
327        WORD_SPACING("word-spacing"),
328
329        /** CSS property z-index. */
330        Z_INDEX("z-index"),
331
332        /** CSS property filter. */
333        FILTER("filter"),
334
335        /** CSS property opacity. */
336        OPACITY("opacity"),
337
338        /** New in CSS3. The {@linkplain #BORDER_RADIUS} attribute. */
339        BORDER_RADIUS("border-radius");
340
341        /** The real name of this property. */
342        private final String name;
343
344        /** Constructor. */
345        private ECSSProperty(String name) {
346                this.name = name;
347        }
348
349        /** Returns the "real" name of this property. */
350        public String getName() {
351                return name;
352        }
353
354        /** Returns the "real" name of this property. */
355        @Override
356        public String toString() {
357                return name;
358        }
359}