[ 
https://issues.apache.org/jira/browse/PIVOT-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16236494#comment-16236494
 ] 

Roger Whitcomb commented on PIVOT-985:
--------------------------------------

Solved this issue a new way:  add a new "CSSColor" enum with ALL the colors in 
the CSS3/X11 list (including these spelling variants), and use that for 
decoding colors.  This also removes the expensive reflection techniques on 
java.awt.Color that were used before, so it should be much faster:
Adding         wtk\src\org\apache\pivot\wtk\CSSColor.java
Sending        wtk\src\org\apache\pivot\wtk\GraphicsUtilities.java
Sending        wtk\src\org\apache\pivot\wtk\content\ColorItem.java
Transmitting file data ...done
Committing transaction...
Committed revision 1814099.

And:
Sending        wtk\src\org\apache\pivot\wtk\CSSColor.java
Sending        wtk\src\org\apache\pivot\wtk\GraphicsUtilities.java
Transmitting file data ..done
Committing transaction...
Committed revision 1814101.

> Dark Gray and Light Gray standard colors are not supported
> ----------------------------------------------------------
>
>                 Key: PIVOT-985
>                 URL: https://issues.apache.org/jira/browse/PIVOT-985
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk
>    Affects Versions: 2.0.4
>         Environment: All
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>            Priority: Minor
>             Fix For: 2.1, 2.0.5
>
>         Attachments: 985.diffs
>
>
> Looking at GraphicsUtilities.decodeColor(String) it says that any of the 
> standard Java Color values is supported.  But, trying to use "darkgray" or 
> "lightgray" doesn't work.
> The underlying reason is that the lookup is done using the lowercase value of 
> the input string and trying to find the corresponding field name in the Color 
> class.  But these two static fields are named "darkGray" and "lightGray" 
> (mixed case) and so the lookup doesn't work.
> Need to special case these two values.  Wouldn't hurt to support the British 
> spellings ("darkgrey" and "lightgrey") either.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to