You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by rw...@apache.org on 2016/02/12 22:11:57 UTC

svn commit: r1730108 - /pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java

Author: rwhitcomb
Date: Fri Feb 12 21:11:57 2016
New Revision: 1730108

URL: http://svn.apache.org/viewvc?rev=1730108&view=rev
Log:
PIVOT-985 (again): Since we supported the British spelling variation of these
two colors, it seems only right to support this variation for the "gray" value
as well (meaning "grey").  So, add that in the same way as the other two.

Modified:
    pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java?rev=1730108&r1=1730107&r2=1730108&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/GraphicsUtilities.java Fri Feb 12 21:11:57 2016
@@ -206,11 +206,14 @@ public final class GraphicsUtilities {
                 color = (Color) Color.class.getDeclaredField(valueLowercase).get(null);
             } catch (Exception exception) {
                 // PIVOT-985: special case for two values (plus spelling variants)
-                // that don't work with just a pure lower case name lookup
+                // that don't work with just a pure lower case name lookup, plus the
+                // British spelling variant of the standard "gray".
                 if (valueLowercase.equals("darkgray") || valueLowercase.equals("darkgrey")) {
                     color = Color.darkGray;
                 } else if (valueLowercase.equals("lightgray") || valueLowercase.equals("lightgrey")) {
                     color = Color.lightGray;
+                } else if (valueLowercase.equals("grey")) {
+                    color = Color.gray;
                 } else {
                     throw new IllegalArgumentException("\"" + valueLowercase
                         + "\" is not a valid color constant.");