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

SplitPane layout issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8u40
    • 8u31
    • javafx
    • None
    • Java: 1.8.0_31; Java HotSpot(TM) 64-Bit Server VM 25.31-b07
      Runtime: Java(TM) SE Runtime Environment 1.8.0_31-b13
      System: Linux version 3.13.0-45-generic running on amd64; UTF-8; de_CH (nb)

      Sometimes when I'm setting the divider positions of a SplitPane programmatically my value gets overridden again by some JavaFX internal layout code.

      For debugging purposes I've added a listener to the position property of the divider and have thrown a RuntimeException to see the stack trace. It looks like this:

      -----------------------------------------------------------------------------
      at
      com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:361)
              at
      com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
              at
      javafx.beans.property.DoublePropertyBase.fireValueChangedEvent(DoublePropertyBase.java:106)
              at
      javafx.beans.property.DoublePropertyBase.markInvalid(DoublePropertyBase.java:113)
              at
      javafx.beans.property.DoublePropertyBase.set(DoublePropertyBase.java:146)
              at javafx.scene.control.SplitPane$Divider.setPosition(SplitPane.java:486)
              at
      com.sun.javafx.scene.control.skin.SplitPaneSkin.setAbsoluteDividerPos(SplitPaneSkin.java:310)
              at
      com.sun.javafx.scene.control.skin.SplitPaneSkin.setupContentAndDividerForLayout(SplitPaneSkin.java:502)
              at
      com.sun.javafx.scene.control.skin.SplitPaneSkin.layoutChildren(SplitPaneSkin.java:817)
              at javafx.scene.control.Control.layoutChildren(Control.java:589)
              at javafx.scene.Parent.layout(Parent.java:1074)
              at javafx.scene.Parent.layout(Parent.java:1080)
              at javafx.scene.Parent.layout(Parent.java:1080)
              at javafx.scene.Parent.layout(Parent.java:1080)
              at javafx.scene.Parent.layout(Parent.java:1080)
              at javafx.scene.Parent.layout(Parent.java:1080)
              at javafx.scene.Parent.layout(Parent.java:1080)
              at javafx.scene.Parent.layout(Parent.java:1080)
              at javafx.scene.Parent.layout(Parent.java:1080)
              at javafx.scene.Scene.doLayoutPass(Scene.java:532)
              at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2363)
              at com.sun.javafx.tk.Toolkit.lambda$runPulse$28(Toolkit.java:314)
              at com.sun.javafx.tk.Toolkit$$Lambda$230/25595560.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:313)
              at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:340)
              at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:451)
              at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:431)
              at
      com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$363(QuantumToolkit.java:298)
              at
      com.sun.javafx.tk.quantum.QuantumToolkit$$Lambda$59/174792896.run(Unknown
      Source)
              at
      com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
              at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
              at
      com.sun.glass.ui.gtk.GtkApplication.lambda$null$45(GtkApplication.java:126)
              at com.sun.glass.ui.gtk.GtkApplication$$Lambda$55/1472148546.run(Unknown
      Source)
              at java.lang.Thread.run(Thread.java:745)
      -----------------------------------------------------------------------------

      The two dividers changed during the layoutChildren call as follows:

      Divider position changed: old value: 0.10857763300760044, new value: 0.004343105320304018

      Divider position changed: old value: 0.8914223669923995, new value: 0.995656894679696

            jgiles Jonathan Giles
            puce Florian Brunner
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: