## modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ColorPickerSkin.java

Print this page

    rev 4839 : RT-2529: Locale specific runtime errors (Turkish)

     252         }
     253     }
     254
     255     private static final Map<Color, String> colorNameMap = new HashMap<Color, String>(147);
     256     static {
     257         // The following code is used to generate the hard-coded colorNameMap
     258         // below, but it is then hand tweaked to proper represent the colour
     259         // names.
     260
     261 //        // Initializes the namedColors map
     262 //        Color.web("white", 1.0);
     263 //        for (Field f : Color.class.getDeclaredFields()) {
     264 //            int modifier = f.getModifiers();
     265 //            if (Modifier.isStatic(modifier) && Modifier.isPublic(modifier) && f.getType().equals(Color.class)) {
     266 //                colorNames.add(f.getName());
     267 //
     268 //                String name = f.toString();
     269 //                name = name.substring(name.lastIndexOf("Color."));
     270 //
     271 //                String displayName = f.getName();
     272 //                displayName = displayName.substring(0, 1) + displayName.substring(1).toLowerCase();
     273 //
     274 //                System.out.println("colorNameMap.put(" + name + ", \"" + displayName + "\");");
     275 //            }
     276 //        }
     277
     278         colorNameMap.put(Color.TRANSPARENT, "Transparent");
     279         colorNameMap.put(Color.ALICEBLUE, "Alice Blue");
     280         colorNameMap.put(Color.ANTIQUEWHITE, "Antique White");
     281         colorNameMap.put(Color.AQUA, "Aqua");
     282         colorNameMap.put(Color.AQUAMARINE, "Aquamarine");
     283         colorNameMap.put(Color.AZURE, "Azure");
     284         colorNameMap.put(Color.BEIGE, "Beige");
     285         colorNameMap.put(Color.BISQUE, "Bisque");
     286         colorNameMap.put(Color.BLACK, "Black");
     287         colorNameMap.put(Color.BLANCHEDALMOND, "Blanched Almond");
     288         colorNameMap.put(Color.BLUE, "Blue");
     289         colorNameMap.put(Color.BLUEVIOLET, "Blue Violet");
     290         colorNameMap.put(Color.BROWN, "Brown");
     291         colorNameMap.put(Color.BURLYWOOD, "Burlywood");
     292         colorNameMap.put(Color.CADETBLUE, "Cadet Blue");
     252         }
     253     }
     254
     255     private static final Map<Color, String> colorNameMap = new HashMap<Color, String>(147);
     256     static {
     257         // The following code is used to generate the hard-coded colorNameMap
     258         // below, but it is then hand tweaked to proper represent the colour
     259         // names.
     260
     261 //        // Initializes the namedColors map
     262 //        Color.web("white", 1.0);
     263 //        for (Field f : Color.class.getDeclaredFields()) {
     264 //            int modifier = f.getModifiers();
     265 //            if (Modifier.isStatic(modifier) && Modifier.isPublic(modifier) && f.getType().equals(Color.class)) {
     266 //                colorNames.add(f.getName());
     267 //
     268 //                String name = f.toString();
     269 //                name = name.substring(name.lastIndexOf("Color."));
     270 //
     271 //                String displayName = f.getName();
     272 //                displayName = displayName.substring(0, 1) + displayName.substring(1).toLowerCase(Locale.ROOT);
     273 //
     274 //                System.out.println("colorNameMap.put(" + name + ", \"" + displayName + "\");");
     275 //            }
     276 //        }
     277
     278         colorNameMap.put(Color.TRANSPARENT, "Transparent");
     279         colorNameMap.put(Color.ALICEBLUE, "Alice Blue");
     280         colorNameMap.put(Color.ANTIQUEWHITE, "Antique White");
     281         colorNameMap.put(Color.AQUA, "Aqua");
     282         colorNameMap.put(Color.AQUAMARINE, "Aquamarine");
     283         colorNameMap.put(Color.AZURE, "Azure");
     284         colorNameMap.put(Color.BEIGE, "Beige");
     285         colorNameMap.put(Color.BISQUE, "Bisque");
     286         colorNameMap.put(Color.BLACK, "Black");
     287         colorNameMap.put(Color.BLANCHEDALMOND, "Blanched Almond");
     288         colorNameMap.put(Color.BLUE, "Blue");
     289         colorNameMap.put(Color.BLUEVIOLET, "Blue Violet");
     290         colorNameMap.put(Color.BROWN, "Brown");
     291         colorNameMap.put(Color.BURLYWOOD, "Burlywood");
     292         colorNameMap.put(Color.CADETBLUE, "Cadet Blue");