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

stylesheet css with number arguments fails with a conversion exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • fx1.1
    • fx1.1
    • javafx
    • netbeans with latest franca SDK

      the following exception is thrown when using a "number" argument in a stylesheet. Attached sample is based on the customcontrol sample in baloo. attached sample project for ease of duplication.
      compile:
      jar:
      standard-run:
      java.lang.ClassCastException: java.lang.Double
              at com.sun.javafx.runtime.location.FloatVariable.set(FloatVariable.java:38)
              at javafx.reflect.FXLocal$VarMember.setValue(FXLocal.java:729)
              at com.sun.stylesheet.javafx.Attribute.setProperty(Attribute.java:153)
              at com.sun.stylesheet.javafx.FXObjectStyleSupport.setProperty(FXObjectStyleSupport.java:342)
              at com.sun.stylesheet.styleable.DefaultStyleable.setProperty(DefaultStyleable.java:168)
              at com.sun.stylesheet.PropertyManager.applyProperty(PropertyManager.java:594)
              at com.sun.stylesheet.PropertyManager.applyProperty(PropertyManager.java:555)
              at com.sun.stylesheet.Declaration.applyTo(Declaration.java:91)
              at com.sun.stylesheet.Rule.applyTo(Rule.java:221)
              at com.sun.stylesheet.Stylesheet.applyTo(Stylesheet.java:277)
              at com.sun.stylesheet.Stylesheet.applyTo(Stylesheet.java:282)
              at com.sun.stylesheet.Stylesheet.applyTo(Stylesheet.java:257)
              at javafx.scene.Scene.applyStylesheets$impl(Scene.fx:235)
              at javafx.scene.Scene.applyStylesheets(Scene.fx:43)
              at javafx.scene.Scene.userInit$(Scene.fx:220)
              at javafx.scene.Scene.initialize$(Scene.fx:43)
              at customcontrol.Main.javafx$run$(Main.fx:21)
              at customcontrol.Main.javafx$run$(Main.fx:21)
      browser-run:

            rbair Richard Bair (Inactive)
            mburtonjfx Mark M Burton (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: