Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-985

Dark Gray and Light Gray standard colors are not supported

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.1, 2.0.5
    • Component/s: wtk
    • Labels:
      None
    • Environment:
      All

      Description

      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.

      1. 985.diffs
        2 kB
        Roger Whitcomb

        Activity

        Hide
        rwhitcomb Roger Whitcomb added a comment -

        The "985.diffs" file is what seems like the simplest fix for this issue, and includes a small test in one of the Tutorials where I changed a background color to "darkGray" in order to test.

        Show
        rwhitcomb Roger Whitcomb added a comment - The "985.diffs" file is what seems like the simplest fix for this issue, and includes a small test in one of the Tutorials where I changed a background color to "darkGray" in order to test.
        Hide
        rwhitcomb Roger Whitcomb added a comment -

        Checked in to "trunk":
        Sending tutorials\src\org\apache\pivot\tutorials\explorer\text_pane.bxml
        Sending wtk\src\org\apache\pivot\wtk\GraphicsUtilities.java
        Transmitting file data ..
        Committed revision 1730100.

        Merged into "branches/2.0.x":
        Sending .
        Sending tutorials\src\org\apache\pivot\tutorials\explorer\text_pane.bxml
        Sending wtk\src\org\apache\pivot\wtk\GraphicsUtilities.java
        Transmitting file data ..
        Committed revision 1730103.

        Show
        rwhitcomb Roger Whitcomb added a comment - Checked in to "trunk": Sending tutorials\src\org\apache\pivot\tutorials\explorer\text_pane.bxml Sending wtk\src\org\apache\pivot\wtk\GraphicsUtilities.java Transmitting file data .. Committed revision 1730100. Merged into "branches/2.0.x": Sending . Sending tutorials\src\org\apache\pivot\tutorials\explorer\text_pane.bxml Sending wtk\src\org\apache\pivot\wtk\GraphicsUtilities.java Transmitting file data .. Committed revision 1730103.
        Hide
        rwhitcomb Roger Whitcomb added a comment -

        Seems only right that we should also add the British variant spelling for the regular "gray" (meaning "grey") as well:
        "trunk":
        Sending wtk\src\org\apache\pivot\wtk\GraphicsUtilities.java
        Transmitting file data .
        Committed revision 1730108.

        "branches/2.0.x":
        Sending .
        Sending wtk\src\org\apache\pivot\wtk\GraphicsUtilities.java
        Transmitting file data .
        Committed revision 1730110.

        Show
        rwhitcomb Roger Whitcomb added a comment - Seems only right that we should also add the British variant spelling for the regular "gray" (meaning "grey") as well: "trunk": Sending wtk\src\org\apache\pivot\wtk\GraphicsUtilities.java Transmitting file data . Committed revision 1730108. "branches/2.0.x": Sending . Sending wtk\src\org\apache\pivot\wtk\GraphicsUtilities.java Transmitting file data . Committed revision 1730110.
        Hide
        rwhitcomb Roger Whitcomb added a comment -

        Tested many combinations of both the American and British spelling differences.
        So, I consider this issue resolved.

        Show
        rwhitcomb Roger Whitcomb added a comment - Tested many combinations of both the American and British spelling differences. So, I consider this issue resolved.

          People

          • Assignee:
            rwhitcomb Roger Whitcomb
            Reporter:
            rwhitcomb Roger Whitcomb
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development