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