KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > css > visual > model > CssProperties


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 /*
21  * CssProperties.java
22  * Created on December 17, 2004, 11:35 AM
23  */

24
25 package org.netbeans.modules.css.visual.model;
26
27 import java.util.ArrayList JavaDoc;
28 import java.util.Collections JavaDoc;
29 import java.util.HashMap JavaDoc;
30 import java.util.List JavaDoc;
31 import java.util.Map JavaDoc;
32 import java.util.Set JavaDoc;
33 import java.util.TreeSet JavaDoc;
34
35 //XXX May be we should convert this in to a singleton class
36
// Unnecessary static initialization
37

38 /**
39  * CSS properties information
40  * @author Winston Prakash
41  * @version 1.0
42  */

43 public final class CssProperties {
44     
45     public final static String JavaDoc FONT_FAMILY = "font-family"; //NOI18N
46
public final static String JavaDoc FONT_SIZE = "font-size"; //NOI18N
47
public final static String JavaDoc FONT_STYLE = "font-style"; //NOI18N
48
public final static String JavaDoc FONT_WEIGHT = "font-weight"; //NOI18N
49
public final static String JavaDoc FONT_VARIANT = "font-variant"; //NOI18N
50

51     public final static String JavaDoc TEXT_DECORATION = "text-decoration"; //NOI18N
52
public final static String JavaDoc TEXT_ALIGN = "text-align"; //NOI18N
53
public final static String JavaDoc TEXT_INDENT = "text-indent"; //NOI18N
54

55     public final static String JavaDoc COLOR = "color"; //NOI18N
56

57     public final static String JavaDoc BACKGROUND = "background"; //NOI18N
58
public final static String JavaDoc BACKGROUND_COLOR = "background-color"; //NOI18N
59
public final static String JavaDoc BACKGROUND_IMAGE = "background-image"; //NOI18N
60
public final static String JavaDoc BACKGROUND_REPEAT = "background-repeat"; //NOI18N
61
public final static String JavaDoc BACKGROUND_ATTACHMENT = "background-attachment"; //NOI18N
62
public final static String JavaDoc BACKGROUND_POSITION = "background-position"; //NOI18N
63

64     public final static String JavaDoc DIRECTION = "direction"; //NOI18N
65
public final static String JavaDoc LINE_HEIGHT = "line-height"; //NOI18N
66
public final static String JavaDoc VERTICAL_ALIGN = "vertical-align"; //NOI18N
67

68     public final static String JavaDoc WORD_SPACING = "word-spacing"; //NOI18N
69
public final static String JavaDoc LETTER_SPACING = "letter-spacing"; //NOI18N
70

71     public final static String JavaDoc BORDER = "border"; //NOI18N
72
public final static String JavaDoc BORDER_TOP = "border-top"; //NOI18N
73
public final static String JavaDoc BORDER_BOTTOM = "border-bottom"; //NOI18N
74
public final static String JavaDoc BORDER_LEFT = "border-left"; //NOI18N
75
public final static String JavaDoc BORDER_RIGHT = "border-right"; //NOI18N
76

77     public final static String JavaDoc BORDER_COLOR = "border-color"; //NOI18N
78
public final static String JavaDoc BORDER_STYLE = "border-style"; //NOI18N
79
public final static String JavaDoc BORDER_WIDTH = "border-width"; //NOI18N
80

81     public final static String JavaDoc BORDER_TOP_COLOR = "border-top-color"; //NOI18N
82
public final static String JavaDoc BORDER_TOP_STYLE = "border-top-style"; //NOI18N
83
public final static String JavaDoc BORDER_TOP_WIDTH = "border-top-width"; //NOI18N
84

85     public final static String JavaDoc BORDER_BOTTOM_COLOR = "border-bottom-color"; //NOI18N
86
public final static String JavaDoc BORDER_BOTTOM_STYLE = "border-bottom-style"; //NOI18N
87
public final static String JavaDoc BORDER_BOTTOM_WIDTH = "border-bottom-width"; //NOI18N
88

89     public final static String JavaDoc BORDER_LEFT_COLOR = "border-left-color"; //NOI18N
90
public final static String JavaDoc BORDER_LEFT_STYLE = "border-left-style"; //NOI18N
91
public final static String JavaDoc BORDER_LEFT_WIDTH = "border-left-width"; //NOI18N
92

93     public final static String JavaDoc BORDER_RIGHT_COLOR = "border-right-color"; //NOI18N
94
public final static String JavaDoc BORDER_RIGHT_STYLE = "border-right-style"; //NOI18N
95
public final static String JavaDoc BORDER_RIGHT_WIDTH = "border-right-width"; //NOI18N
96

97     public final static String JavaDoc MARGIN = "margin"; //NOI18N
98
public final static String JavaDoc MARGIN_TOP = "margin-top"; //NOI18N
99
public final static String JavaDoc MARGIN_BOTTOM = "margin-bottom"; //NOI18N
100
public final static String JavaDoc MARGIN_LEFT = "margin-left"; //NOI18N
101
public final static String JavaDoc MARGIN_RIGHT = "margin-right"; //NOI18N
102

103     public final static String JavaDoc PADDING = "padding"; //NOI18N
104
public final static String JavaDoc PADDING_TOP = "padding-top"; //NOI18N
105
public final static String JavaDoc PADDING_BOTTOM = "padding-bottom"; //NOI18N
106
public final static String JavaDoc PADDING_LEFT = "padding-left"; //NOI18N
107
public final static String JavaDoc PADDING_RIGHT = "padding-right"; //NOI18N
108

109     public final static String JavaDoc POSITION = "position"; //NOI18N
110
public final static String JavaDoc TOP = "top"; //NOI18N
111
public final static String JavaDoc BOTTOM = "bottom"; //NOI18N
112
public final static String JavaDoc LEFT = "left"; //NOI18N
113
public final static String JavaDoc RIGHT = "right"; //NOI18N
114

115     public final static String JavaDoc WIDTH = "width"; //NOI18N
116
public final static String JavaDoc HEIGHT = "height"; //NOI18N
117
public final static String JavaDoc MIN_WIDTH = "min-width"; //NOI18N
118
public final static String JavaDoc MAX_WIDTH = "max-width"; //NOI18N
119
public final static String JavaDoc MIN_HEIGHT = "min-height"; //NOI18N
120
public final static String JavaDoc MAX_HEIGHT = "max-height"; //NOI18N
121

122     public final static String JavaDoc Z_INDEX = "z-index"; //NOI18N
123
public final static String JavaDoc VISIBILITY = "visibility"; //NOI18N
124

125     public final static String JavaDoc CLIP = "clip"; //NOI18N
126

127     public final static String JavaDoc STYLE = "style"; //NOI18N
128

129     private static Set JavaDoc cssPropertyNames = new TreeSet JavaDoc();
130     private static void setCssPropertyNames(){
131         cssPropertyNames.add(BACKGROUND);
132         cssPropertyNames.add(BACKGROUND_ATTACHMENT);
133         cssPropertyNames.add(BACKGROUND_COLOR);
134         cssPropertyNames.add(BACKGROUND_IMAGE);
135         cssPropertyNames.add(BACKGROUND_POSITION);
136         cssPropertyNames.add(BACKGROUND_REPEAT);
137         
138         cssPropertyNames.add(BORDER);
139         cssPropertyNames.add(BORDER_COLOR);
140         cssPropertyNames.add(BORDER_STYLE);
141         cssPropertyNames.add(BORDER_WIDTH);
142         
143         cssPropertyNames.add(BORDER_TOP);
144         cssPropertyNames.add(BORDER_TOP_COLOR);
145         cssPropertyNames.add(BORDER_TOP_STYLE);
146         cssPropertyNames.add(BORDER_TOP_WIDTH);
147         
148         cssPropertyNames.add(BORDER_BOTTOM);
149         cssPropertyNames.add(BORDER_BOTTOM_COLOR);
150         cssPropertyNames.add(BORDER_BOTTOM_STYLE);
151         cssPropertyNames.add(BORDER_BOTTOM_WIDTH);
152         
153         cssPropertyNames.add(BORDER_LEFT);
154         cssPropertyNames.add(BORDER_LEFT_COLOR);
155         cssPropertyNames.add(BORDER_LEFT_STYLE);
156         cssPropertyNames.add(BORDER_LEFT_WIDTH);
157         
158         cssPropertyNames.add(BORDER_TOP);
159         cssPropertyNames.add(BORDER_TOP_COLOR);
160         cssPropertyNames.add(BORDER_TOP_STYLE);
161         cssPropertyNames.add(BORDER_TOP_WIDTH);
162         
163         cssPropertyNames.add(MARGIN);
164         cssPropertyNames.add(MARGIN_TOP);
165         cssPropertyNames.add(MARGIN_BOTTOM);
166         cssPropertyNames.add(MARGIN_LEFT);
167         cssPropertyNames.add(MARGIN_RIGHT);
168         
169         cssPropertyNames.add(PADDING);
170         cssPropertyNames.add(PADDING_TOP);
171         cssPropertyNames.add(PADDING_BOTTOM);
172         cssPropertyNames.add(PADDING_LEFT);
173         cssPropertyNames.add(PADDING_RIGHT);
174         
175         cssPropertyNames.add(POSITION);
176         cssPropertyNames.add(TOP);
177         cssPropertyNames.add(BOTTOM);
178         cssPropertyNames.add(LEFT);
179         cssPropertyNames.add(RIGHT);
180         
181         cssPropertyNames.add(WIDTH);
182         cssPropertyNames.add(HEIGHT);
183         cssPropertyNames.add(MAX_WIDTH);
184         cssPropertyNames.add(MIN_WIDTH);
185         cssPropertyNames.add(MAX_HEIGHT);
186         cssPropertyNames.add(MIN_HEIGHT);
187         
188         cssPropertyNames.add(STYLE);
189         cssPropertyNames.add(CLIP);
190         cssPropertyNames.add(Z_INDEX);
191         cssPropertyNames.add(COLOR);
192         cssPropertyNames.add(DIRECTION);
193         cssPropertyNames.add(LINE_HEIGHT);
194         cssPropertyNames.add(VERTICAL_ALIGN);
195         
196         cssPropertyNames.add(FONT_FAMILY);
197         cssPropertyNames.add(FONT_SIZE);
198         cssPropertyNames.add(FONT_STYLE);
199         cssPropertyNames.add(FONT_WEIGHT);
200         cssPropertyNames.add(FONT_VARIANT);
201         
202         cssPropertyNames.add(TEXT_DECORATION);
203         cssPropertyNames.add(TEXT_ALIGN);
204         cssPropertyNames.add(TEXT_INDENT);
205         
206         cssPropertyNames.add(COLOR);
207     }
208     
209     static List JavaDoc cssLengthUnits = new ArrayList JavaDoc();
210     private static void setCssLengthUnitNames(){
211         cssLengthUnits.add("px"); //NOI18N
212
cssLengthUnits.add("%"); //NOI18N
213
cssLengthUnits.add("in"); //NOI18N
214
cssLengthUnits.add("cm"); //NOI18N
215
cssLengthUnits.add("mm"); //NOI18N
216
cssLengthUnits.add("em"); //NOI18N
217
cssLengthUnits.add("ex"); //NOI18N
218
cssLengthUnits.add("picas"); //NOI18N
219
}
220     
221     private static List JavaDoc backgroundRepeatValues = new ArrayList JavaDoc();
222     private static void setBackgroundRepeatValues(){
223         backgroundRepeatValues.add("repeat"); //NOI18N
224
backgroundRepeatValues.add("repeat-x"); //NOI18N
225
backgroundRepeatValues.add("repeat-y"); //NOI18N
226
backgroundRepeatValues.add("inherit"); //NOI18N
227
}
228     
229     private static List JavaDoc backgroundPositionValues = new ArrayList JavaDoc();
230     private static void setBackgroundPositionValues(){
231         backgroundPositionValues.add("center"); //NOI18N
232
backgroundPositionValues.add("left"); //NOI18N
233
backgroundPositionValues.add("right"); //NOI18N
234
backgroundPositionValues.add("top"); //NOI18N
235
backgroundPositionValues.add("bottom"); //NOI18N
236
backgroundPositionValues.add("inherit"); //NOI18N
237
}
238     
239     private static List JavaDoc backgroundAttachmentValues = new ArrayList JavaDoc();
240     private static void setBackgroundAttachmentValues(){
241         backgroundAttachmentValues.add("none"); //NOI18N
242
backgroundAttachmentValues.add("scroll"); //NOI18N
243
backgroundAttachmentValues.add("fixed"); //NOI18N
244
backgroundAttachmentValues.add("inherit"); //NOI18N
245
}
246     
247     private static List JavaDoc fontStyleValues = new ArrayList JavaDoc();
248     private static void setFontStyleValues(){
249         fontStyleValues.add("normal"); //NOI18N
250
fontStyleValues.add("italic"); //NOI18N
251
fontStyleValues.add("oblique"); //NOI18N
252
fontStyleValues.add("inherit"); //NOI18N
253
}
254     
255     private static List JavaDoc fontVariantValues = new ArrayList JavaDoc();
256     private static void setFontVariantValues(){
257         fontVariantValues.add("normal"); //NOI18N
258
fontVariantValues.add("small-caps"); //NOI18N
259
fontVariantValues.add("inherit"); //NOI18N
260
}
261     
262     private static List JavaDoc fontWeightValues = new ArrayList JavaDoc();
263     private static void setFontWeightValues(){
264         fontWeightValues.add("normal"); //NOI18N
265
fontWeightValues.add("bold"); //NOI18N
266
fontWeightValues.add("bolder"); //NOI18N
267
fontWeightValues.add("lighter"); //NOI18N
268
fontWeightValues.add("100"); //NOI18N
269
fontWeightValues.add("200"); //NOI18N
270
fontWeightValues.add("300"); //NOI18N
271
fontWeightValues.add("400"); //NOI18N
272
fontWeightValues.add("500"); //NOI18N
273
fontWeightValues.add("600"); //NOI18N
274
fontWeightValues.add("700"); //NOI18N
275
fontWeightValues.add("800"); //NOI18N
276
fontWeightValues.add("900"); //NOI18N
277
fontWeightValues.add("inherit"); //NOI18N
278
}
279     
280     private static List JavaDoc directionValues = new ArrayList JavaDoc();
281     private static void setDirectionValues(){
282         directionValues.add("ltr"); //NOI18N
283
directionValues.add("rtl"); //NOI18N
284
directionValues.add("inherit"); //NOI18N
285
}
286     
287     private static List JavaDoc textAlignValues = new ArrayList JavaDoc();
288     private static void setTextAlignValues(){
289         textAlignValues.add("left"); //NOI18N
290
textAlignValues.add("right"); //NOI18N
291
textAlignValues.add("justify"); //NOI18N
292
textAlignValues.add("inherit"); //NOI18N
293
}
294     
295     private static List JavaDoc textDecorationValues = new ArrayList JavaDoc();
296     private static void setTextDecorationValues(){
297         textDecorationValues.add("none"); //NOI18N
298
textDecorationValues.add("underline"); //NOI18N
299
textDecorationValues.add("overline"); //NOI18N
300
textDecorationValues.add("line-through"); //NOI18N
301
textDecorationValues.add("inherit"); //NOI18N
302
}
303     
304     private static List JavaDoc verticalAlignValues = new ArrayList JavaDoc();
305     private static void setVerticalAlignValues(){
306         verticalAlignValues.add("baseline"); //NOI18N
307
verticalAlignValues.add("sub"); //NOI18N
308
verticalAlignValues.add("super"); //NOI18N
309
verticalAlignValues.add("top"); //NOI18N
310
verticalAlignValues.add("text-top"); //NOI18N
311
verticalAlignValues.add("middle"); //NOI18N
312
verticalAlignValues.add("bottom"); //NOI18N
313
verticalAlignValues.add("text-bottom"); //NOI18N
314
verticalAlignValues.add("inherit"); //NOI18N
315
}
316     
317     private static List JavaDoc positionValues = new ArrayList JavaDoc();
318     private static void setPositionValues(){
319         positionValues.add("static"); //NOI18N
320
positionValues.add("relative"); //NOI18N
321
positionValues.add("fixed"); //NOI18N
322
positionValues.add("inherit"); //NOI18N
323
}
324     
325     private static List JavaDoc visiblityValues = new ArrayList JavaDoc();
326     private static void setVisiblityValues(){
327         visiblityValues.add("visible"); //NOI18N
328
visiblityValues.add("hidden"); //NOI18N
329
visiblityValues.add("collapse"); //NOI18N
330
visiblityValues.add("inherit"); //NOI18N
331
}
332     
333     private static List JavaDoc borderStyleValues = new ArrayList JavaDoc();
334     private static void setBorderStyleValues(){
335         borderStyleValues.add("none"); //NOI18N
336
borderStyleValues.add("hidden"); //NOI18N
337
borderStyleValues.add("dotted"); //NOI18N
338
borderStyleValues.add("dashed"); //NOI18N
339
borderStyleValues.add("solid"); //NOI18N
340
borderStyleValues.add("double"); //NOI18N
341
borderStyleValues.add("groove"); //NOI18N
342
borderStyleValues.add("ridge"); //NOI18N
343
borderStyleValues.add("inset"); //NOI18N
344
borderStyleValues.add("outset"); //NOI18N
345
borderStyleValues.add("inherit"); //NOI18N
346
}
347     
348     private static List JavaDoc colorValues = new ArrayList JavaDoc();
349     private static void setColorValues(){
350         colorValues.add("aqua"); //NOI18N
351
colorValues.add("black"); //NOI18N
352
colorValues.add("blue"); //NOI18N
353
colorValues.add("fuchsia"); //NOI18N
354
colorValues.add("gray"); //NOI18N
355
colorValues.add("green"); //NOI18N
356
colorValues.add("lime"); //NOI18N
357
colorValues.add("maroon"); //NOI18N
358
colorValues.add("navy"); //NOI18N
359
colorValues.add("olive"); //NOI18N
360
colorValues.add("orange"); //NOI18N
361
colorValues.add("purple"); //NOI18N
362
colorValues.add("red"); //NOI18N
363
colorValues.add("silver"); //NOI18N
364
colorValues.add("teal"); //NOI18N
365
colorValues.add("white"); //NOI18N
366
colorValues.add("yellow"); //NOI18N
367
}
368     
369     private static Map JavaDoc colorNameHexMap = new HashMap JavaDoc();
370     private static void setColorNameHexMap(){
371         colorNameHexMap.put("black","#000000"); //NOI18N
372
colorNameHexMap.put("gray","#808080"); //NOI18N
373
colorNameHexMap.put("white","#FFFFFF"); //NOI18N
374
colorNameHexMap.put("maroon","#800000"); //NOI18N
375
colorNameHexMap.put("red","#FF0000"); //NOI18N
376
colorNameHexMap.put("purple","#800080"); //NOI18N
377
colorNameHexMap.put("fuchsia","#FF00FF"); //NOI18N
378
colorNameHexMap.put("green","#008000"); //NOI18N
379
colorNameHexMap.put("lime","#00FF00"); //NOI18N
380
colorNameHexMap.put("olive","#808000"); //NOI18N
381
colorNameHexMap.put("orange","#FFA500"); //NOI18N
382
colorNameHexMap.put("yellow","#FFFF00"); //NOI18N
383
colorNameHexMap.put("navy","#000080"); //NOI18N
384
colorNameHexMap.put("blue","#0000FF"); //NOI18N
385
colorNameHexMap.put("silver","#C0C0C0"); //NOI18N
386
colorNameHexMap.put("teal","#008080"); //NOI18N
387
colorNameHexMap.put("aqua","#00FFFF"); //NOI18N
388
}
389     
390     private static List JavaDoc fontFamilyValues = new ArrayList JavaDoc();
391     private static void setFontFamilyValues(){
392         fontFamilyValues.add("serif"); //NOI18N
393
fontFamilyValues.add("sans-serif"); //NOI18N
394
fontFamilyValues.add("monospace"); //NOI18N
395
fontFamilyValues.add("fantasy"); //NOI18N
396
}
397     
398     private static List JavaDoc webFontValues = new ArrayList JavaDoc();
399     private static void setWebFontValues(){
400         webFontValues.add("Arial Black"); //NOI18N
401
webFontValues.add("Cosmic Sans"); //NOI18N
402
webFontValues.add("Impact"); //NOI18N
403
webFontValues.add("Veranda"); //NOI18N
404
webFontValues.add("Webdings"); //NOI18N
405
webFontValues.add("Trebuchet"); //NOI18N
406
webFontValues.add("Georgia"); //NOI18N
407
webFontValues.add("Minion Web"); //NOI18N
408
}
409     
410     private static List JavaDoc fontFamiliySetValues = new ArrayList JavaDoc();
411     private static void setFontFamiliySetValues(){
412         // Do not keep spaces between commas. Batik parser automatically
413
// removes the spaces.
414
fontFamiliySetValues.add("Arial,Helvetica,sans-serif"); //NOI18N
415
fontFamiliySetValues.add("\'Times New Roman\',Times,serif"); //NOI18N
416
fontFamiliySetValues.add("\'Courier New\',Courier,monospace"); //NOI18N
417
fontFamiliySetValues.add("Georgia,\'Times New Roman\',times,serif"); //NOI18N
418
fontFamiliySetValues.add("Verdana,Arial,Helvetica,sans-serif"); //NOI18N
419
fontFamiliySetValues.add("Geneva,Arial,Helvetica,sans-serif"); //NOI18N
420
fontFamiliySetValues.add("serif"); //NOI18N
421
fontFamiliySetValues.add("sans-serif"); //NOI18N
422
fontFamiliySetValues.add("monospace"); //NOI18N
423
fontFamiliySetValues.add("cursive"); //NOI18N
424
fontFamiliySetValues.add("fantasy"); //NOI18N
425
}
426     
427     private static List JavaDoc fontSizeValues = new ArrayList JavaDoc();
428     private static void setFontSizeValues(){
429         fontSizeValues.add("8"); //NOI18N
430
fontSizeValues.add("10"); //NOI18N
431
fontSizeValues.add("12"); //NOI18N
432
fontSizeValues.add("14"); //NOI18N
433
fontSizeValues.add("18"); //NOI18N
434
fontSizeValues.add("24"); //NOI18N
435
fontSizeValues.add("36"); //NOI18N
436
fontSizeValues.add("XX-small"); //NOI18N
437
fontSizeValues.add("X-small"); //NOI18N
438
fontSizeValues.add("small"); //NOI18N
439
fontSizeValues.add("medium"); //NOI18N
440
fontSizeValues.add("large"); //NOI18N
441
fontSizeValues.add("X-large"); //NOI18N
442
fontSizeValues.add("XX-large"); //NOI18N
443
fontSizeValues.add("smaller"); //NOI18N
444
fontSizeValues.add("larger"); //NOI18N
445
}
446     
447     static{
448         setCssPropertyNames();
449         setCssLengthUnitNames();
450         setBackgroundRepeatValues();
451         setBackgroundPositionValues();
452         setBackgroundAttachmentValues();
453         setFontStyleValues();
454         setFontVariantValues();
455         setFontWeightValues();
456         setDirectionValues();
457         setTextAlignValues();
458         setTextDecorationValues();
459         setVerticalAlignValues();
460         setPositionValues();
461         setVisiblityValues();
462         setBorderStyleValues();
463         setColorValues();
464         setColorNameHexMap();
465         setWebFontValues();
466         setFontFamilyValues();
467         setFontFamiliySetValues();
468         setFontSizeValues();
469     }
470     
471     /**
472      * Get the names of the supported properties
473      * @return Set of property names.
474      */

475     public static String JavaDoc[] getCssPropertyNames(){
476         return (String JavaDoc[]) cssPropertyNames.toArray(new String JavaDoc[cssPropertyNames.size()]);
477     }
478     
479     public static String JavaDoc[] getCssPropertyValues(String JavaDoc cssProperty) {
480         if(BACKGROUND_REPEAT.equals(cssProperty)){
481             return (String JavaDoc[]) backgroundRepeatValues.toArray(new String JavaDoc[backgroundRepeatValues.size()]);
482         }else if(BACKGROUND_POSITION.equals(cssProperty)){
483             return (String JavaDoc[]) backgroundPositionValues.toArray(new String JavaDoc[backgroundPositionValues.size()]);
484         }else if(BACKGROUND_ATTACHMENT.equals(cssProperty)){
485             return (String JavaDoc[]) backgroundAttachmentValues.toArray(new String JavaDoc[backgroundAttachmentValues.size()]);
486         }else if(FONT_STYLE.equals(cssProperty)){
487             return (String JavaDoc[]) fontStyleValues.toArray(new String JavaDoc[fontStyleValues.size()]);
488         }else if(FONT_VARIANT.equals(cssProperty)){
489             return (String JavaDoc[]) fontVariantValues.toArray(new String JavaDoc[fontVariantValues.size()]);
490         }else if(FONT_WEIGHT.equals(cssProperty)){
491             return (String JavaDoc[]) fontWeightValues.toArray(new String JavaDoc[fontWeightValues.size()]);
492         }else if(DIRECTION.equals(cssProperty)){
493             return (String JavaDoc[]) directionValues.toArray(new String JavaDoc[directionValues.size()]);
494         }else if(TEXT_ALIGN.equals(cssProperty)){
495             return (String JavaDoc[]) textAlignValues.toArray(new String JavaDoc[textAlignValues.size()]);
496         }else if(TEXT_DECORATION.equals(cssProperty)){
497             return (String JavaDoc[]) textDecorationValues.toArray(new String JavaDoc[textDecorationValues.size()]);
498         }else if(VERTICAL_ALIGN.equals(cssProperty)){
499             return (String JavaDoc[]) verticalAlignValues.toArray(new String JavaDoc[verticalAlignValues.size()]);
500         }else if(POSITION.equals(cssProperty)){
501             return (String JavaDoc[]) positionValues.toArray(new String JavaDoc[positionValues.size()]);
502         }else if(VISIBILITY.equals(cssProperty)){
503             return (String JavaDoc[]) visiblityValues.toArray(new String JavaDoc[visiblityValues.size()]);
504         }else if(BORDER_STYLE.equals(cssProperty)){
505             return (String JavaDoc[]) borderStyleValues.toArray(new String JavaDoc[borderStyleValues.size()]);
506         }
507         return new String JavaDoc[0];
508     }
509     
510     public static String JavaDoc[] getCssLengthUnits() {
511         return (String JavaDoc[]) cssLengthUnits.toArray(new String JavaDoc[cssLengthUnits.size()]);
512     }
513     
514     public static String JavaDoc[] getColorValues() {
515         return (String JavaDoc[]) colorValues.toArray(new String JavaDoc[colorValues.size()]);
516     }
517     
518     public static Map JavaDoc getColorNameHexMap() {
519         return Collections.unmodifiableMap(colorNameHexMap);
520     }
521     
522     public static String JavaDoc[] getFontFamilyValues() {
523         return (String JavaDoc[]) fontFamilyValues.toArray(new String JavaDoc[fontFamilyValues.size()]);
524     }
525     
526     public static String JavaDoc[] getWebFontValues() {
527         return (String JavaDoc[]) webFontValues.toArray(new String JavaDoc[webFontValues.size()]);
528     }
529     
530     public static String JavaDoc[] getFontFamilySetValues() {
531         return (String JavaDoc[]) fontFamiliySetValues.toArray(new String JavaDoc[fontFamiliySetValues.size()]);
532     }
533     
534     public static String JavaDoc[] getFontSizeValues() {
535         return (String JavaDoc[]) fontSizeValues.toArray(new String JavaDoc[fontSizeValues.size()]);
536     }
537 }
538
Popular Tags