SplitPane layout question
Scott Palmer
swpalmer at gmail.com
Mon Dec 22 12:19:37 UTC 2014
The min/max sizes of the children are probably being respected.
Scott
> On Dec 22, 2014, at 7:13 AM, Florian Brunner <fbrunnerlist at gmx.ch> wrote:
>
> Hi,
>
> Sometimes when I'm setting the divider positions of a SplitPane
> programmatically my value get 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)
> ------------------------------------------------------------------------------------------
>
> It doesn't seem to get triggered by some code of mine (at least not directly
> according to the stack trace).
>
> Why is this re-layout happing here?
> Why does it override the values I've set for the divider positions?
> How can stop this?
>
> Thanks for some insights.
>
> -Florian
More information about the openjfx-dev
mailing list