Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8093238

[CSS] com.sun.javafx.css.converters.ColorConverter seems to have a problem

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: emb-8u6, 8u20
    • Component/s: javafx
    • Labels:
    • Environment:

      OS X 10.9, jdk8 b117

      Description

      When using an ObjectProperty<Color> in combination with a StyleableProperty I have the problem that an attached Listener won't be triggered and I get a Warning on the console like:

      Nov 27, 2013 4:01:16 PM javafx.scene.CssStyleHelper calculateValue
      WARNING: Could not resolve 'a lookup value' while resolving lookups for '-area-color' from rule '*.my-control' in stylesheet file:/Users/hansolo/IntelliJ_Projects/FX8Playground/out/production/FX8Playground/issues/custom.css
      Nov 27, 2013 4:01:16 PM javafx.scene.CssStyleHelper calculateValue
      WARNING: Could not resolve 'a lookup value' while resolving lookups for '-area-color' from rule '*.my-control' in stylesheet file:/Users/hansolo/IntelliJ_Projects/FX8Playground/out/production/FX8Playground/issues/custom.css

      The problem seems to be related to the ColorConverter because when I exchange the ColorConverter with a PaintConverter everything seems to be ok.

      Please find a little example control here: https://dl.dropboxusercontent.com/u/84552/issues/rt-34541.zip

      In the example I created a custom control that simply uses two StyleableProperties (one as Paint and the other as Color) and then simply load another CSS file that overrides the related styles in CSS. Only the InvalidationListener that is hooked up to the ObjectProperty<Paint> is triggered but not the one that is hooked up to the ObjectProperty<Color>.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dgrieve David Grieve
              Reporter:
              ggrunwald Gerrit Grunwald (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: