KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > css > engine > value > svg > ColorManager


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.svg;
19
20 import org.apache.batik.css.engine.value.AbstractColorManager;
21 import org.apache.batik.css.engine.value.Value;
22 import org.apache.batik.util.CSSConstants;
23
24 /**
25  * This class provides a manager for the 'color' property values.
26  *
27  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
28  * @version $Id: ColorManager.java,v 1.5 2004/08/18 07:12:57 vhardy Exp $
29  */

30 public class ColorManager extends AbstractColorManager {
31     
32     /**
33      * The default color value.
34      */

35     protected final static Value DEFAULT_VALUE =
36         SVGValueConstants.BLACK_RGB_VALUE;
37
38     //
39
// Add some identifier values.
40
//
41
static {
42         values.put(CSSConstants.CSS_ALICEBLUE_VALUE,
43                    SVGValueConstants.ALICEBLUE_VALUE);
44         values.put(CSSConstants.CSS_ANTIQUEWHITE_VALUE,
45                    SVGValueConstants.ANTIQUEWHITE_VALUE);
46         values.put(CSSConstants.CSS_AQUAMARINE_VALUE,
47                    SVGValueConstants.AQUAMARINE_VALUE);
48         values.put(CSSConstants.CSS_AZURE_VALUE,
49                    SVGValueConstants.AZURE_VALUE);
50         values.put(CSSConstants.CSS_BEIGE_VALUE,
51                    SVGValueConstants.BEIGE_VALUE);
52         values.put(CSSConstants.CSS_BISQUE_VALUE,
53                    SVGValueConstants.BISQUE_VALUE);
54         values.put(CSSConstants.CSS_BLANCHEDALMOND_VALUE,
55                    SVGValueConstants.BLANCHEDALMOND_VALUE);
56         values.put(CSSConstants.CSS_BLUEVIOLET_VALUE,
57                    SVGValueConstants.BLUEVIOLET_VALUE);
58         values.put(CSSConstants.CSS_BROWN_VALUE,
59                    SVGValueConstants.BROWN_VALUE);
60         values.put(CSSConstants.CSS_BURLYWOOD_VALUE,
61                    SVGValueConstants.BURLYWOOD_VALUE);
62         values.put(CSSConstants.CSS_CADETBLUE_VALUE,
63                    SVGValueConstants.CADETBLUE_VALUE);
64         values.put(CSSConstants.CSS_CHARTREUSE_VALUE,
65                    SVGValueConstants.CHARTREUSE_VALUE);
66         values.put(CSSConstants.CSS_CHOCOLATE_VALUE,
67                    SVGValueConstants.CHOCOLATE_VALUE);
68         values.put(CSSConstants.CSS_CORAL_VALUE,
69                    SVGValueConstants.CORAL_VALUE);
70         values.put(CSSConstants.CSS_CORNFLOWERBLUE_VALUE,
71                    SVGValueConstants.CORNFLOWERBLUE_VALUE);
72         values.put(CSSConstants.CSS_CORNSILK_VALUE,
73                    SVGValueConstants.CORNSILK_VALUE);
74         values.put(CSSConstants.CSS_CRIMSON_VALUE,
75                    SVGValueConstants.CRIMSON_VALUE);
76         values.put(CSSConstants.CSS_CYAN_VALUE,
77                    SVGValueConstants.CYAN_VALUE);
78         values.put(CSSConstants.CSS_DARKBLUE_VALUE,
79                    SVGValueConstants.DARKBLUE_VALUE);
80         values.put(CSSConstants.CSS_DARKCYAN_VALUE,
81                    SVGValueConstants.DARKCYAN_VALUE);
82         values.put(CSSConstants.CSS_DARKGOLDENROD_VALUE,
83                    SVGValueConstants.DARKGOLDENROD_VALUE);
84         values.put(CSSConstants.CSS_DARKGRAY_VALUE,
85                    SVGValueConstants.DARKGRAY_VALUE);
86         values.put(CSSConstants.CSS_DARKGREEN_VALUE,
87                    SVGValueConstants.DARKGREEN_VALUE);
88         values.put(CSSConstants.CSS_DARKGREY_VALUE,
89                    SVGValueConstants.DARKGREY_VALUE);
90         values.put(CSSConstants.CSS_DARKKHAKI_VALUE,
91                    SVGValueConstants.DARKKHAKI_VALUE);
92         values.put(CSSConstants.CSS_DARKMAGENTA_VALUE,
93                    SVGValueConstants.DARKMAGENTA_VALUE);
94         values.put(CSSConstants.CSS_DARKOLIVEGREEN_VALUE,
95                    SVGValueConstants.DARKOLIVEGREEN_VALUE);
96         values.put(CSSConstants.CSS_DARKORANGE_VALUE,
97                    SVGValueConstants.DARKORANGE_VALUE);
98         values.put(CSSConstants.CSS_DARKORCHID_VALUE,
99                    SVGValueConstants.DARKORCHID_VALUE);
100         values.put(CSSConstants.CSS_DARKRED_VALUE,
101                    SVGValueConstants.DARKRED_VALUE);
102         values.put(CSSConstants.CSS_DARKSALMON_VALUE,
103                    SVGValueConstants.DARKSALMON_VALUE);
104         values.put(CSSConstants.CSS_DARKSEAGREEN_VALUE,
105                    SVGValueConstants.DARKSEAGREEN_VALUE);
106         values.put(CSSConstants.CSS_DARKSLATEBLUE_VALUE,
107                    SVGValueConstants.DARKSLATEBLUE_VALUE);
108         values.put(CSSConstants.CSS_DARKSLATEGRAY_VALUE,
109                    SVGValueConstants.DARKSLATEGRAY_VALUE);
110         values.put(CSSConstants.CSS_DARKSLATEGREY_VALUE,
111                    SVGValueConstants.DARKSLATEGREY_VALUE);
112         values.put(CSSConstants.CSS_DARKTURQUOISE_VALUE,
113                    SVGValueConstants.DARKTURQUOISE_VALUE);
114         values.put(CSSConstants.CSS_DARKVIOLET_VALUE,
115                    SVGValueConstants.DARKVIOLET_VALUE);
116         values.put(CSSConstants.CSS_DEEPPINK_VALUE,
117                    SVGValueConstants.DEEPPINK_VALUE);
118         values.put(CSSConstants.CSS_DEEPSKYBLUE_VALUE,
119                    SVGValueConstants.DEEPSKYBLUE_VALUE);
120         values.put(CSSConstants.CSS_DIMGRAY_VALUE,
121                    SVGValueConstants.DIMGRAY_VALUE);
122         values.put(CSSConstants.CSS_DIMGREY_VALUE,
123                    SVGValueConstants.DIMGREY_VALUE);
124         values.put(CSSConstants.CSS_DODGERBLUE_VALUE,
125                    SVGValueConstants.DODGERBLUE_VALUE);
126         values.put(CSSConstants.CSS_FIREBRICK_VALUE,
127                    SVGValueConstants.FIREBRICK_VALUE);
128         values.put(CSSConstants.CSS_FLORALWHITE_VALUE,
129                    SVGValueConstants.FLORALWHITE_VALUE);
130         values.put(CSSConstants.CSS_FORESTGREEN_VALUE,
131                    SVGValueConstants.FORESTGREEN_VALUE);
132         values.put(CSSConstants.CSS_GAINSBORO_VALUE,
133                    SVGValueConstants.GAINSBORO_VALUE);
134         values.put(CSSConstants.CSS_GHOSTWHITE_VALUE,
135                    SVGValueConstants.GHOSTWHITE_VALUE);
136         values.put(CSSConstants.CSS_GOLD_VALUE,
137                    SVGValueConstants.GOLD_VALUE);
138         values.put(CSSConstants.CSS_GOLDENROD_VALUE,
139                    SVGValueConstants.GOLDENROD_VALUE);
140         values.put(CSSConstants.CSS_GREENYELLOW_VALUE,
141                    SVGValueConstants.GREENYELLOW_VALUE);
142         values.put(CSSConstants.CSS_GREY_VALUE,
143                    SVGValueConstants.GREY_VALUE);
144         values.put(CSSConstants.CSS_HONEYDEW_VALUE,
145                    SVGValueConstants.HONEYDEW_VALUE);
146         values.put(CSSConstants.CSS_HOTPINK_VALUE,
147                    SVGValueConstants.HOTPINK_VALUE);
148         values.put(CSSConstants.CSS_INDIANRED_VALUE,
149                    SVGValueConstants.INDIANRED_VALUE);
150         values.put(CSSConstants.CSS_INDIGO_VALUE,
151                    SVGValueConstants.INDIGO_VALUE);
152         values.put(CSSConstants.CSS_IVORY_VALUE,
153                    SVGValueConstants.IVORY_VALUE);
154         values.put(CSSConstants.CSS_KHAKI_VALUE,
155                    SVGValueConstants.KHAKI_VALUE);
156         values.put(CSSConstants.CSS_LAVENDER_VALUE,
157                    SVGValueConstants.LAVENDER_VALUE);
158         values.put(CSSConstants.CSS_LAVENDERBLUSH_VALUE,
159                    SVGValueConstants.LAVENDERBLUSH_VALUE);
160         values.put(CSSConstants.CSS_LAWNGREEN_VALUE,
161                    SVGValueConstants.LAWNGREEN_VALUE);
162         values.put(CSSConstants.CSS_LEMONCHIFFON_VALUE,
163                    SVGValueConstants.LEMONCHIFFON_VALUE);
164         values.put(CSSConstants.CSS_LIGHTBLUE_VALUE,
165                    SVGValueConstants.LIGHTBLUE_VALUE);
166         values.put(CSSConstants.CSS_LIGHTCORAL_VALUE,
167                    SVGValueConstants.LIGHTCORAL_VALUE);
168         values.put(CSSConstants.CSS_LIGHTCYAN_VALUE,
169                    SVGValueConstants.LIGHTCYAN_VALUE);
170         values.put(CSSConstants.CSS_LIGHTGOLDENRODYELLOW_VALUE,
171                    SVGValueConstants.LIGHTGOLDENRODYELLOW_VALUE);
172         values.put(CSSConstants.CSS_LIGHTGRAY_VALUE,
173                    SVGValueConstants.LIGHTGRAY_VALUE);
174         values.put(CSSConstants.CSS_LIGHTGREEN_VALUE,
175                    SVGValueConstants.LIGHTGREEN_VALUE);
176         values.put(CSSConstants.CSS_LIGHTGREY_VALUE,
177                    SVGValueConstants.LIGHTGREY_VALUE);
178         values.put(CSSConstants.CSS_LIGHTPINK_VALUE,
179                    SVGValueConstants.LIGHTPINK_VALUE);
180         values.put(CSSConstants.CSS_LIGHTSALMON_VALUE,
181                    SVGValueConstants.LIGHTSALMON_VALUE);
182         values.put(CSSConstants.CSS_LIGHTSEAGREEN_VALUE,
183                    SVGValueConstants.LIGHTSEAGREEN_VALUE);
184         values.put(CSSConstants.CSS_LIGHTSKYBLUE_VALUE,
185                    SVGValueConstants.LIGHTSKYBLUE_VALUE);
186         values.put(CSSConstants.CSS_LIGHTSLATEGRAY_VALUE,
187                    SVGValueConstants.LIGHTSLATEGRAY_VALUE);
188         values.put(CSSConstants.CSS_LIGHTSLATEGREY_VALUE,
189                    SVGValueConstants.LIGHTSLATEGREY_VALUE);
190         values.put(CSSConstants.CSS_LIGHTSTEELBLUE_VALUE,
191                    SVGValueConstants.LIGHTSTEELBLUE_VALUE);
192         values.put(CSSConstants.CSS_LIGHTYELLOW_VALUE,
193                    SVGValueConstants.LIGHTYELLOW_VALUE);
194         values.put(CSSConstants.CSS_LIMEGREEN_VALUE,
195                    SVGValueConstants.LIMEGREEN_VALUE);
196         values.put(CSSConstants.CSS_LINEN_VALUE,
197                    SVGValueConstants.LINEN_VALUE);
198         values.put(CSSConstants.CSS_MAGENTA_VALUE,
199                    SVGValueConstants.MAGENTA_VALUE);
200         values.put(CSSConstants.CSS_MEDIUMAQUAMARINE_VALUE,
201                    SVGValueConstants.MEDIUMAQUAMARINE_VALUE);
202         values.put(CSSConstants.CSS_MEDIUMBLUE_VALUE,
203                    SVGValueConstants.MEDIUMBLUE_VALUE);
204         values.put(CSSConstants.CSS_MEDIUMORCHID_VALUE,
205                    SVGValueConstants.MEDIUMORCHID_VALUE);
206         values.put(CSSConstants.CSS_MEDIUMPURPLE_VALUE,
207                    SVGValueConstants.MEDIUMPURPLE_VALUE);
208         values.put(CSSConstants.CSS_MEDIUMSEAGREEN_VALUE,
209                    SVGValueConstants.MEDIUMSEAGREEN_VALUE);
210         values.put(CSSConstants.CSS_MEDIUMSLATEBLUE_VALUE,
211                    SVGValueConstants.MEDIUMSLATEBLUE_VALUE);
212         values.put(CSSConstants.CSS_MEDIUMSPRINGGREEN_VALUE,
213                    SVGValueConstants.MEDIUMSPRINGGREEN_VALUE);
214         values.put(CSSConstants.CSS_MEDIUMTURQUOISE_VALUE,
215                    SVGValueConstants.MEDIUMTURQUOISE_VALUE);
216         values.put(CSSConstants.CSS_MEDIUMVIOLETRED_VALUE,
217                    SVGValueConstants.MEDIUMVIOLETRED_VALUE);
218         values.put(CSSConstants.CSS_MIDNIGHTBLUE_VALUE,
219                    SVGValueConstants.MIDNIGHTBLUE_VALUE);
220         values.put(CSSConstants.CSS_MINTCREAM_VALUE,
221                    SVGValueConstants.MINTCREAM_VALUE);
222         values.put(CSSConstants.CSS_MISTYROSE_VALUE,
223                    SVGValueConstants.MISTYROSE_VALUE);
224         values.put(CSSConstants.CSS_MOCCASIN_VALUE,
225                    SVGValueConstants.MOCCASIN_VALUE);
226         values.put(CSSConstants.CSS_NAVAJOWHITE_VALUE,
227                    SVGValueConstants.NAVAJOWHITE_VALUE);
228         values.put(CSSConstants.CSS_OLDLACE_VALUE,
229                    SVGValueConstants.OLDLACE_VALUE);
230         values.put(CSSConstants.CSS_OLIVEDRAB_VALUE,
231                    SVGValueConstants.OLIVEDRAB_VALUE);
232         values.put(CSSConstants.CSS_ORANGE_VALUE,
233                    SVGValueConstants.ORANGE_VALUE);
234         values.put(CSSConstants.CSS_ORANGERED_VALUE,
235                    SVGValueConstants.ORANGERED_VALUE);
236         values.put(CSSConstants.CSS_ORCHID_VALUE,
237                    SVGValueConstants.ORCHID_VALUE);
238         values.put(CSSConstants.CSS_PALEGOLDENROD_VALUE,
239                    SVGValueConstants.PALEGOLDENROD_VALUE);
240         values.put(CSSConstants.CSS_PALEGREEN_VALUE,
241                    SVGValueConstants.PALEGREEN_VALUE);
242         values.put(CSSConstants.CSS_PALETURQUOISE_VALUE,
243                    SVGValueConstants.PALETURQUOISE_VALUE);
244         values.put(CSSConstants.CSS_PALEVIOLETRED_VALUE,
245                    SVGValueConstants.PALEVIOLETRED_VALUE);
246         values.put(CSSConstants.CSS_PAPAYAWHIP_VALUE,
247                    SVGValueConstants.PAPAYAWHIP_VALUE);
248         values.put(CSSConstants.CSS_PEACHPUFF_VALUE,
249                    SVGValueConstants.PEACHPUFF_VALUE);
250         values.put(CSSConstants.CSS_PERU_VALUE,
251                    SVGValueConstants.PERU_VALUE);
252         values.put(CSSConstants.CSS_PINK_VALUE,
253                    SVGValueConstants.PINK_VALUE);
254         values.put(CSSConstants.CSS_PLUM_VALUE,
255                    SVGValueConstants.PLUM_VALUE);
256         values.put(CSSConstants.CSS_POWDERBLUE_VALUE,
257                    SVGValueConstants.POWDERBLUE_VALUE);
258         values.put(CSSConstants.CSS_PURPLE_VALUE,
259                    SVGValueConstants.PURPLE_VALUE);
260         values.put(CSSConstants.CSS_ROSYBROWN_VALUE,
261                    SVGValueConstants.ROSYBROWN_VALUE);
262         values.put(CSSConstants.CSS_ROYALBLUE_VALUE,
263                    SVGValueConstants.ROYALBLUE_VALUE);
264         values.put(CSSConstants.CSS_SADDLEBROWN_VALUE,
265                    SVGValueConstants.SADDLEBROWN_VALUE);
266         values.put(CSSConstants.CSS_SALMON_VALUE,
267                    SVGValueConstants.SALMON_VALUE);
268         values.put(CSSConstants.CSS_SANDYBROWN_VALUE,
269                    SVGValueConstants.SANDYBROWN_VALUE);
270         values.put(CSSConstants.CSS_SEAGREEN_VALUE,
271                    SVGValueConstants.SEAGREEN_VALUE);
272         values.put(CSSConstants.CSS_SEASHELL_VALUE,
273                    SVGValueConstants.SEASHELL_VALUE);
274         values.put(CSSConstants.CSS_SIENNA_VALUE,
275                    SVGValueConstants.SIENNA_VALUE);
276         values.put(CSSConstants.CSS_SKYBLUE_VALUE,
277                    SVGValueConstants.SKYBLUE_VALUE);
278         values.put(CSSConstants.CSS_SLATEBLUE_VALUE,
279                    SVGValueConstants.SLATEBLUE_VALUE);
280         values.put(CSSConstants.CSS_SLATEGRAY_VALUE,
281                    SVGValueConstants.SLATEGRAY_VALUE);
282         values.put(CSSConstants.CSS_SLATEGREY_VALUE,
283                    SVGValueConstants.SLATEGREY_VALUE);
284         values.put(CSSConstants.CSS_SNOW_VALUE,
285                    SVGValueConstants.SNOW_VALUE);
286         values.put(CSSConstants.CSS_SPRINGGREEN_VALUE,
287                    SVGValueConstants.SPRINGGREEN_VALUE);
288         values.put(CSSConstants.CSS_STEELBLUE_VALUE,
289                    SVGValueConstants.STEELBLUE_VALUE);
290         values.put(CSSConstants.CSS_TAN_VALUE,
291                    SVGValueConstants.TAN_VALUE);
292         values.put(CSSConstants.CSS_THISTLE_VALUE,
293                    SVGValueConstants.THISTLE_VALUE);
294         values.put(CSSConstants.CSS_TOMATO_VALUE,
295                    SVGValueConstants.TOMATO_VALUE);
296         values.put(CSSConstants.CSS_TURQUOISE_VALUE,
297                    SVGValueConstants.TURQUOISE_VALUE);
298         values.put(CSSConstants.CSS_VIOLET_VALUE,
299                    SVGValueConstants.VIOLET_VALUE);
300         values.put(CSSConstants.CSS_WHEAT_VALUE,
301                    SVGValueConstants.WHEAT_VALUE);
302         values.put(CSSConstants.CSS_WHITESMOKE_VALUE,
303                    SVGValueConstants.WHITESMOKE_VALUE);
304         values.put(CSSConstants.CSS_YELLOWGREEN_VALUE,
305                    SVGValueConstants.YELLOWGREEN_VALUE);
306     }
307
308     //
309
// Add and replace some computed colors.
310
//
311
static {
312         computedValues.put(CSSConstants.CSS_BLACK_VALUE,
313                            SVGValueConstants.BLACK_RGB_VALUE);
314         computedValues.put(CSSConstants.CSS_SILVER_VALUE,
315                            SVGValueConstants.SILVER_RGB_VALUE);
316         computedValues.put(CSSConstants.CSS_GRAY_VALUE,
317                            SVGValueConstants.GRAY_RGB_VALUE);
318         computedValues.put(CSSConstants.CSS_WHITE_VALUE,
319                            SVGValueConstants.WHITE_RGB_VALUE);
320         computedValues.put(CSSConstants.CSS_MAROON_VALUE,
321                            SVGValueConstants.MAROON_RGB_VALUE);
322         computedValues.put(CSSConstants.CSS_RED_VALUE,
323                            SVGValueConstants.RED_RGB_VALUE);
324         computedValues.put(CSSConstants.CSS_PURPLE_VALUE,
325                            SVGValueConstants.PURPLE_RGB_VALUE);
326         computedValues.put(CSSConstants.CSS_FUCHSIA_VALUE,
327                            SVGValueConstants.FUCHSIA_RGB_VALUE);
328         computedValues.put(CSSConstants.CSS_GREEN_VALUE,
329                            SVGValueConstants.GREEN_RGB_VALUE);
330         computedValues.put(CSSConstants.CSS_LIME_VALUE,
331                            SVGValueConstants.LIME_RGB_VALUE);
332         computedValues.put(CSSConstants.CSS_OLIVE_VALUE,
333                            SVGValueConstants.OLIVE_RGB_VALUE);
334         computedValues.put(CSSConstants.CSS_YELLOW_VALUE,
335                            SVGValueConstants.YELLOW_RGB_VALUE);
336         computedValues.put(CSSConstants.CSS_NAVY_VALUE,
337                            SVGValueConstants.NAVY_RGB_VALUE);
338         computedValues.put(CSSConstants.CSS_BLUE_VALUE,
339                            SVGValueConstants.BLUE_RGB_VALUE);
340         computedValues.put(CSSConstants.CSS_TEAL_VALUE,
341                            SVGValueConstants.TEAL_RGB_VALUE);
342         computedValues.put(CSSConstants.CSS_AQUA_VALUE,
343                            SVGValueConstants.AQUA_RGB_VALUE);
344
345         computedValues.put(CSSConstants.CSS_ALICEBLUE_VALUE,
346                            SVGValueConstants.ALICEBLUE_RGB_VALUE);
347         computedValues.put(CSSConstants.CSS_ANTIQUEWHITE_VALUE,
348                            SVGValueConstants.ANTIQUEWHITE_RGB_VALUE);
349         computedValues.put(CSSConstants.CSS_AQUAMARINE_VALUE,
350                            SVGValueConstants.AQUAMARINE_RGB_VALUE);
351         computedValues.put(CSSConstants.CSS_AZURE_VALUE,
352                            SVGValueConstants.AZURE_RGB_VALUE);
353         computedValues.put(CSSConstants.CSS_BEIGE_VALUE,
354                            SVGValueConstants.BEIGE_RGB_VALUE);
355         computedValues.put(CSSConstants.CSS_BISQUE_VALUE,
356                            SVGValueConstants.BISQUE_RGB_VALUE);
357         computedValues.put(CSSConstants.CSS_BLANCHEDALMOND_VALUE,
358                            SVGValueConstants.BLANCHEDALMOND_RGB_VALUE);
359         computedValues.put(CSSConstants.CSS_BLUEVIOLET_VALUE,
360                            SVGValueConstants.BLUEVIOLET_RGB_VALUE);
361         computedValues.put(CSSConstants.CSS_BROWN_VALUE,
362                            SVGValueConstants.BROWN_RGB_VALUE);
363         computedValues.put(CSSConstants.CSS_BURLYWOOD_VALUE,
364                            SVGValueConstants.BURLYWOOD_RGB_VALUE);
365         computedValues.put(CSSConstants.CSS_CADETBLUE_VALUE,
366                            SVGValueConstants.CADETBLUE_RGB_VALUE);
367         computedValues.put(CSSConstants.CSS_CHARTREUSE_VALUE,
368                            SVGValueConstants.CHARTREUSE_RGB_VALUE);
369         computedValues.put(CSSConstants.CSS_CHOCOLATE_VALUE,
370                            SVGValueConstants.CHOCOLATE_RGB_VALUE);
371         computedValues.put(CSSConstants.CSS_CORAL_VALUE,
372                            SVGValueConstants.CORAL_RGB_VALUE);
373         computedValues.put(CSSConstants.CSS_CORNFLOWERBLUE_VALUE,
374                            SVGValueConstants.CORNFLOWERBLUE_RGB_VALUE);
375         computedValues.put(CSSConstants.CSS_CORNSILK_VALUE,
376                            SVGValueConstants.CORNSILK_RGB_VALUE);
377         computedValues.put(CSSConstants.CSS_CRIMSON_VALUE,
378                            SVGValueConstants.CRIMSON_RGB_VALUE);
379         computedValues.put(CSSConstants.CSS_CYAN_VALUE,
380                            SVGValueConstants.CYAN_RGB_VALUE);
381         computedValues.put(CSSConstants.CSS_DARKBLUE_VALUE,
382                            SVGValueConstants.DARKBLUE_RGB_VALUE);
383         computedValues.put(CSSConstants.CSS_DARKCYAN_VALUE,
384                            SVGValueConstants.DARKCYAN_RGB_VALUE);
385         computedValues.put(CSSConstants.CSS_DARKGOLDENROD_VALUE,
386                            SVGValueConstants.DARKGOLDENROD_RGB_VALUE);
387         computedValues.put(CSSConstants.CSS_DARKGRAY_VALUE,
388                            SVGValueConstants.DARKGRAY_RGB_VALUE);
389         computedValues.put(CSSConstants.CSS_DARKGREEN_VALUE,
390                            SVGValueConstants.DARKGREEN_RGB_VALUE);
391         computedValues.put(CSSConstants.CSS_DARKGREY_VALUE,
392                            SVGValueConstants.DARKGREY_RGB_VALUE);
393         computedValues.put(CSSConstants.CSS_DARKKHAKI_VALUE,
394                            SVGValueConstants.DARKKHAKI_RGB_VALUE);
395         computedValues.put(CSSConstants.CSS_DARKMAGENTA_VALUE,
396                            SVGValueConstants.DARKMAGENTA_RGB_VALUE);
397         computedValues.put(CSSConstants.CSS_DARKOLIVEGREEN_VALUE,
398                            SVGValueConstants.DARKOLIVEGREEN_RGB_VALUE);
399         computedValues.put(CSSConstants.CSS_DARKORANGE_VALUE,
400                            SVGValueConstants.DARKORANGE_RGB_VALUE);
401         computedValues.put(CSSConstants.CSS_DARKORCHID_VALUE,
402                            SVGValueConstants.DARKORCHID_RGB_VALUE);
403         computedValues.put(CSSConstants.CSS_DARKRED_VALUE,
404                            SVGValueConstants.DARKRED_RGB_VALUE);
405         computedValues.put(CSSConstants.CSS_DARKSALMON_VALUE,
406                            SVGValueConstants.DARKSALMON_RGB_VALUE);
407         computedValues.put(CSSConstants.CSS_DARKSEAGREEN_VALUE,
408                            SVGValueConstants.DARKSEAGREEN_RGB_VALUE);
409         computedValues.put(CSSConstants.CSS_DARKSLATEBLUE_VALUE,
410                            SVGValueConstants.DARKSLATEBLUE_RGB_VALUE);
411         computedValues.put(CSSConstants.CSS_DARKSLATEGRAY_VALUE,
412                            SVGValueConstants.DARKSLATEGRAY_RGB_VALUE);
413         computedValues.put(CSSConstants.CSS_DARKSLATEGREY_VALUE,
414                            SVGValueConstants.DARKSLATEGREY_RGB_VALUE);
415         computedValues.put(CSSConstants.CSS_DARKTURQUOISE_VALUE,
416                            SVGValueConstants.DARKTURQUOISE_RGB_VALUE);
417         computedValues.put(CSSConstants.CSS_DARKVIOLET_VALUE,
418                            SVGValueConstants.DARKVIOLET_RGB_VALUE);
419         computedValues.put(CSSConstants.CSS_DEEPPINK_VALUE,
420                            SVGValueConstants.DEEPPINK_RGB_VALUE);
421         computedValues.put(CSSConstants.CSS_DEEPSKYBLUE_VALUE,
422                            SVGValueConstants.DEEPSKYBLUE_RGB_VALUE);
423         computedValues.put(CSSConstants.CSS_DIMGRAY_VALUE,
424                            SVGValueConstants.DIMGRAY_RGB_VALUE);
425         computedValues.put(CSSConstants.CSS_DIMGREY_VALUE,
426                            SVGValueConstants.DIMGREY_RGB_VALUE);
427         computedValues.put(CSSConstants.CSS_DODGERBLUE_VALUE,
428                            SVGValueConstants.DODGERBLUE_RGB_VALUE);
429         computedValues.put(CSSConstants.CSS_FIREBRICK_VALUE,
430                            SVGValueConstants.FIREBRICK_RGB_VALUE);
431         computedValues.put(CSSConstants.CSS_FLORALWHITE_VALUE,
432                            SVGValueConstants.FLORALWHITE_RGB_VALUE);
433         computedValues.put(CSSConstants.CSS_FORESTGREEN_VALUE,
434                            SVGValueConstants.FORESTGREEN_RGB_VALUE);
435         computedValues.put(CSSConstants.CSS_GAINSBORO_VALUE,
436                            SVGValueConstants.GAINSBORO_RGB_VALUE);
437         computedValues.put(CSSConstants.CSS_GHOSTWHITE_VALUE,
438                            SVGValueConstants.GHOSTWHITE_RGB_VALUE);
439         computedValues.put(CSSConstants.CSS_GOLD_VALUE,
440                            SVGValueConstants.GOLD_RGB_VALUE);
441         computedValues.put(CSSConstants.CSS_GOLDENROD_VALUE,
442                            SVGValueConstants.GOLDENROD_RGB_VALUE);
443         computedValues.put(CSSConstants.CSS_GREY_VALUE,
444                            SVGValueConstants.GREY_RGB_VALUE);
445         computedValues.put(CSSConstants.CSS_GREENYELLOW_VALUE,
446                            SVGValueConstants.GREENYELLOW_RGB_VALUE);
447         computedValues.put(CSSConstants.CSS_HONEYDEW_VALUE,
448                            SVGValueConstants.HONEYDEW_RGB_VALUE);
449         computedValues.put(CSSConstants.CSS_HOTPINK_VALUE,
450                            SVGValueConstants.HOTPINK_RGB_VALUE);
451         computedValues.put(CSSConstants.CSS_INDIANRED_VALUE,
452                            SVGValueConstants.INDIANRED_RGB_VALUE);
453         computedValues.put(CSSConstants.CSS_INDIGO_VALUE,
454                            SVGValueConstants.INDIGO_RGB_VALUE);
455         computedValues.put(CSSConstants.CSS_IVORY_VALUE,
456                            SVGValueConstants.IVORY_RGB_VALUE);
457         computedValues.put(CSSConstants.CSS_KHAKI_VALUE,
458                            SVGValueConstants.KHAKI_RGB_VALUE);
459         computedValues.put(CSSConstants.CSS_LAVENDER_VALUE,
460                            SVGValueConstants.LAVENDER_RGB_VALUE);
461         computedValues.put(CSSConstants.CSS_LAVENDERBLUSH_VALUE,
462                            SVGValueConstants.LAVENDERBLUSH_RGB_VALUE);
463         computedValues.put(CSSConstants.CSS_LAWNGREEN_VALUE,
464                            SVGValueConstants.LAWNGREEN_RGB_VALUE);
465         computedValues.put(CSSConstants.CSS_LEMONCHIFFON_VALUE,
466                            SVGValueConstants.LEMONCHIFFON_RGB_VALUE);
467         computedValues.put(CSSConstants.CSS_LIGHTBLUE_VALUE,
468                            SVGValueConstants.LIGHTBLUE_RGB_VALUE);
469         computedValues.put(CSSConstants.CSS_LIGHTCORAL_VALUE,
470                            SVGValueConstants.LIGHTCORAL_RGB_VALUE);
471         computedValues.put(CSSConstants.CSS_LIGHTCYAN_VALUE,
472                            SVGValueConstants.LIGHTCYAN_RGB_VALUE);
473         computedValues.put(CSSConstants.CSS_LIGHTGOLDENRODYELLOW_VALUE,
474                            SVGValueConstants.LIGHTGOLDENRODYELLOW_RGB_VALUE);
475         computedValues.put(CSSConstants.CSS_LIGHTGRAY_VALUE,
476                            SVGValueConstants.LIGHTGRAY_RGB_VALUE);
477         computedValues.put(CSSConstants.CSS_LIGHTGREEN_VALUE,
478                            SVGValueConstants.LIGHTGREEN_RGB_VALUE);
479         computedValues.put(CSSConstants.CSS_LIGHTGREY_VALUE,
480                            SVGValueConstants.LIGHTGREY_RGB_VALUE);
481         computedValues.put(CSSConstants.CSS_LIGHTPINK_VALUE,
482                            SVGValueConstants.LIGHTPINK_RGB_VALUE);
483         computedValues.put(CSSConstants.CSS_LIGHTSALMON_VALUE,
484                            SVGValueConstants.LIGHTSALMON_RGB_VALUE);
485         computedValues.put(CSSConstants.CSS_LIGHTSEAGREEN_VALUE,
486                            SVGValueConstants.LIGHTSEAGREEN_RGB_VALUE);
487         computedValues.put(CSSConstants.CSS_LIGHTSKYBLUE_VALUE,
488                            SVGValueConstants.LIGHTSKYBLUE_RGB_VALUE);
489         computedValues.put(CSSConstants.CSS_LIGHTSLATEGRAY_VALUE,
490                            SVGValueConstants.LIGHTSLATEGRAY_RGB_VALUE);
491         computedValues.put(CSSConstants.CSS_LIGHTSLATEGREY_VALUE,
492                            SVGValueConstants.LIGHTSLATEGREY_RGB_VALUE);
493         computedValues.put(CSSConstants.CSS_LIGHTSTEELBLUE_VALUE,
494                            SVGValueConstants.LIGHTSTEELBLUE_RGB_VALUE);
495         computedValues.put(CSSConstants.CSS_LIGHTYELLOW_VALUE,
496                            SVGValueConstants.LIGHTYELLOW_RGB_VALUE);
497         computedValues.put(CSSConstants.CSS_LIMEGREEN_VALUE,
498                            SVGValueConstants.LIMEGREEN_RGB_VALUE);
499         computedValues.put(CSSConstants.CSS_LINEN_VALUE,
500                            SVGValueConstants.LINEN_RGB_VALUE);
501         computedValues.put(CSSConstants.CSS_MAGENTA_VALUE,
502                            SVGValueConstants.MAGENTA_RGB_VALUE);
503         computedValues.put(CSSConstants.CSS_MEDIUMAQUAMARINE_VALUE,
504                            SVGValueConstants.MEDIUMAQUAMARINE_RGB_VALUE);
505         computedValues.put(CSSConstants.CSS_MEDIUMBLUE_VALUE,
506                            SVGValueConstants.MEDIUMBLUE_RGB_VALUE);
507         computedValues.put(CSSConstants.CSS_MEDIUMORCHID_VALUE,
508                            SVGValueConstants.MEDIUMORCHID_RGB_VALUE);
509         computedValues.put(CSSConstants.CSS_MEDIUMPURPLE_VALUE,
510                            SVGValueConstants.MEDIUMPURPLE_RGB_VALUE);
511         computedValues.put(CSSConstants.CSS_MEDIUMSEAGREEN_VALUE,
512                            SVGValueConstants.MEDIUMSEAGREEN_RGB_VALUE);
513         computedValues.put(CSSConstants.CSS_MEDIUMSLATEBLUE_VALUE,
514                            SVGValueConstants.MEDIUMSLATEBLUE_RGB_VALUE);
515         computedValues.put(CSSConstants.CSS_MEDIUMSPRINGGREEN_VALUE,
516                            SVGValueConstants.MEDIUMSPRINGGREEN_RGB_VALUE);
517         computedValues.put(CSSConstants.CSS_MEDIUMTURQUOISE_VALUE,
518                            SVGValueConstants.MEDIUMTURQUOISE_RGB_VALUE);
519         computedValues.put(CSSConstants.CSS_MEDIUMVIOLETRED_VALUE,
520                            SVGValueConstants.MEDIUMVIOLETRED_RGB_VALUE);
521         computedValues.put(CSSConstants.CSS_MIDNIGHTBLUE_VALUE,
522                            SVGValueConstants.MIDNIGHTBLUE_RGB_VALUE);
523         computedValues.put(CSSConstants.CSS_MINTCREAM_VALUE,
524                            SVGValueConstants.MINTCREAM_RGB_VALUE);
525         computedValues.put(CSSConstants.CSS_MISTYROSE_VALUE,
526                            SVGValueConstants.MISTYROSE_RGB_VALUE);
527         computedValues.put(CSSConstants.CSS_MOCCASIN_VALUE,
528                            SVGValueConstants.MOCCASIN_RGB_VALUE);
529         computedValues.put(CSSConstants.CSS_NAVAJOWHITE_VALUE,
530                            SVGValueConstants.NAVAJOWHITE_RGB_VALUE);
531         computedValues.put(CSSConstants.CSS_OLDLACE_VALUE,
532                            SVGValueConstants.OLDLACE_RGB_VALUE);
533         computedValues.put(CSSConstants.CSS_OLIVEDRAB_VALUE,
534                            SVGValueConstants.OLIVEDRAB_RGB_VALUE);
535         computedValues.put(CSSConstants.CSS_ORANGE_VALUE,
536                            SVGValueConstants.ORANGE_RGB_VALUE);
537         computedValues.put(CSSConstants.CSS_ORANGERED_VALUE,
538                            SVGValueConstants.ORANGERED_RGB_VALUE);
539         computedValues.put(CSSConstants.CSS_ORCHID_VALUE,
540                            SVGValueConstants.ORCHID_RGB_VALUE);
541         computedValues.put(CSSConstants.CSS_PALEGOLDENROD_VALUE,
542                            SVGValueConstants.PALEGOLDENROD_RGB_VALUE);
543         computedValues.put(CSSConstants.CSS_PALEGREEN_VALUE,
544                            SVGValueConstants.PALEGREEN_RGB_VALUE);
545         computedValues.put(CSSConstants.CSS_PALETURQUOISE_VALUE,
546                            SVGValueConstants.PALETURQUOISE_RGB_VALUE);
547         computedValues.put(CSSConstants.CSS_PALEVIOLETRED_VALUE,
548                            SVGValueConstants.PALEVIOLETRED_RGB_VALUE);
549         computedValues.put(CSSConstants.CSS_PAPAYAWHIP_VALUE,
550                            SVGValueConstants.PAPAYAWHIP_RGB_VALUE);
551         computedValues.put(CSSConstants.CSS_PEACHPUFF_VALUE,
552                            SVGValueConstants.PEACHPUFF_RGB_VALUE);
553         computedValues.put(CSSConstants.CSS_PERU_VALUE,
554                            SVGValueConstants.PERU_RGB_VALUE);
555         computedValues.put(CSSConstants.CSS_PINK_VALUE,
556                            SVGValueConstants.PINK_RGB_VALUE);
557         computedValues.put(CSSConstants.CSS_PLUM_VALUE,
558                            SVGValueConstants.PLUM_RGB_VALUE);
559         computedValues.put(CSSConstants.CSS_POWDERBLUE_VALUE,
560                            SVGValueConstants.POWDERBLUE_RGB_VALUE);
561         computedValues.put(CSSConstants.CSS_PURPLE_VALUE,
562                            SVGValueConstants.PURPLE_RGB_VALUE);
563         computedValues.put(CSSConstants.CSS_ROSYBROWN_VALUE,
564                            SVGValueConstants.ROSYBROWN_RGB_VALUE);
565         computedValues.put(CSSConstants.CSS_ROYALBLUE_VALUE,
566                            SVGValueConstants.ROYALBLUE_RGB_VALUE);
567         computedValues.put(CSSConstants.CSS_SADDLEBROWN_VALUE,
568                            SVGValueConstants.SADDLEBROWN_RGB_VALUE);
569         computedValues.put(CSSConstants.CSS_SALMON_VALUE,
570                            SVGValueConstants.SALMON_RGB_VALUE);
571         computedValues.put(CSSConstants.CSS_SANDYBROWN_VALUE,
572                            SVGValueConstants.SANDYBROWN_RGB_VALUE);
573         computedValues.put(CSSConstants.CSS_SEAGREEN_VALUE,
574                            SVGValueConstants.SEAGREEN_RGB_VALUE);
575         computedValues.put(CSSConstants.CSS_SEASHELL_VALUE,
576                            SVGValueConstants.SEASHELL_RGB_VALUE);
577         computedValues.put(CSSConstants.CSS_SIENNA_VALUE,
578                            SVGValueConstants.SIENNA_RGB_VALUE);
579         computedValues.put(CSSConstants.CSS_SKYBLUE_VALUE,
580                            SVGValueConstants.SKYBLUE_RGB_VALUE);
581         computedValues.put(CSSConstants.CSS_SLATEBLUE_VALUE,
582                            SVGValueConstants.SLATEBLUE_RGB_VALUE);
583         computedValues.put(CSSConstants.CSS_SLATEGRAY_VALUE,
584                            SVGValueConstants.SLATEGRAY_RGB_VALUE);
585         computedValues.put(CSSConstants.CSS_SLATEGREY_VALUE,
586                            SVGValueConstants.SLATEGREY_RGB_VALUE);
587         computedValues.put(CSSConstants.CSS_SNOW_VALUE,
588                            SVGValueConstants.SNOW_RGB_VALUE);
589         computedValues.put(CSSConstants.CSS_SPRINGGREEN_VALUE,
590                            SVGValueConstants.SPRINGGREEN_RGB_VALUE);
591         computedValues.put(CSSConstants.CSS_STEELBLUE_VALUE,
592                            SVGValueConstants.STEELBLUE_RGB_VALUE);
593         computedValues.put(CSSConstants.CSS_TAN_VALUE,
594                            SVGValueConstants.TAN_RGB_VALUE);
595         computedValues.put(CSSConstants.CSS_THISTLE_VALUE,
596                            SVGValueConstants.THISTLE_RGB_VALUE);
597         computedValues.put(CSSConstants.CSS_TOMATO_VALUE,
598                            SVGValueConstants.TOMATO_RGB_VALUE);
599         computedValues.put(CSSConstants.CSS_TURQUOISE_VALUE,
600                            SVGValueConstants.TURQUOISE_RGB_VALUE);
601         computedValues.put(CSSConstants.CSS_VIOLET_VALUE,
602                            SVGValueConstants.VIOLET_RGB_VALUE);
603         computedValues.put(CSSConstants.CSS_WHEAT_VALUE,
604                            SVGValueConstants.WHEAT_RGB_VALUE);
605         computedValues.put(CSSConstants.CSS_WHITESMOKE_VALUE,
606                            SVGValueConstants.WHITESMOKE_RGB_VALUE);
607         computedValues.put(CSSConstants.CSS_YELLOWGREEN_VALUE,
608                            SVGValueConstants.YELLOWGREEN_RGB_VALUE);
609
610     }
611
612     /**
613      * Implements {@link
614      * org.apache.batik.css.engine.value.ValueManager#isInheritedProperty()}.
615      */

616     public boolean isInheritedProperty() {
617     return true;
618     }
619
620     /**
621      * Implements {@link
622      * org.apache.batik.css.engine.value.ValueManager#getPropertyName()}.
623      */

624     public String JavaDoc getPropertyName() {
625     return CSSConstants.CSS_COLOR_PROPERTY;
626     }
627     
628     /**
629      * Implements {@link
630      * org.apache.batik.css.engine.value.ValueManager#getDefaultValue()}.
631      */

632     public Value getDefaultValue() {
633         return DEFAULT_VALUE;
634     }
635
636
637 }
638
Popular Tags