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

CSS setting style -fx-background-images throws ClassCastException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • 8
    • 7u6
    • javafx

      Setting style "-fx-background-images:url(\""+ getClass().getResource("image.png").toExternalForm() +"\") center repeat-x stretch;" throws ClassCastException :


      WARNING: com.sun.javafx.css.StyleHelper transitionToState Failed to set css [StyleableProperty {property: -fx-background-images, converter: com.sun.javafx.scene.layout.region.BackgroundImageConverter@1eab746e, initalValue: null, inherits: false, subProperties: [StyleableProperty {property: -fx-background-image, converter: URLSeqType, initalValue: null, inherits: false, subProperties: []}, StyleableProperty {property: -fx-background-repeat, converter: BackgroundRepeatType, initalValue: [Lcom.sun.javafx.scene.layout.region.BackgroundImage$BackgroundRepeat;@a68f17d, inherits: false, subProperties: []}, StyleableProperty {property: -fx-background-position, converter: LayeredBackgroundPositionConverter, initalValue: [Lcom.sun.javafx.scene.layout.region.BackgroundImage$BackgroundPosition;@6fc64ae1, inherits: false, subProperties: []}, StyleableProperty {property: -fx-background-size, converter: com.sun.javafx.scene.layout.region.BackgroundImage$LayeredBackgroundSizeConverter@435e331b, initalValue: [Lcom.sun.javafx.scene.layout.region.BackgroundImage$BackgroundSize;@5d6d542a, inherits: false, subProperties: []}]}]

      java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
      at javafx.scene.layout.Region$17.set(Region.java:1125)
      at com.sun.javafx.css.StyleableObjectProperty.applyStyle(StyleableObjectProperty.java:58)
      at com.sun.javafx.css.StyleableProperty.set(StyleableProperty.java:70)
      at com.sun.javafx.css.StyleHelper.transitionToState(StyleHelper.java:902)
      at javafx.scene.Node.impl_processCSS(Node.java:7415)
      at javafx.scene.Parent.impl_processCSS(Parent.java:1146)
      at javafx.scene.Node.processCSS(Node.java:7383)
      at javafx.scene.Node.processCSS(Node.java:7377)
      at javafx.scene.Node.processCSS(Node.java:7377)
      at javafx.scene.Scene.doCSSPass(Scene.java:443)
      at javafx.scene.Scene.access$3800(Scene.java:169)
      at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2198)
      at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:363)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
      at com.sun.javafx.tk.quantum.QuantumToolkit$9.run(QuantumToolkit.java:329)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
      at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
      at com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:82)
      at java.lang.Thread.run(Thread.java:722)

            dgrieve David Grieve
            slugovoy Sergey Lugovoy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: