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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • emb-8u6, 8u20
    • 8
    • javafx
    • OS X 10.9, jdk8 b117

      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>.

        1. RT-34541.patch
          2 kB
          David Grieve
        2. RT-34541.patch01
          2 kB
          David Grieve

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

              Created:
              Updated:
              Resolved:
              Imported: