I just pushed a new layout-container who has a similar feature set than the JavaFX built-in SplitPane
but ensures that proportions are not corrupted if you shrink the container (just watch the video below to get an idea what I mean).
The layout algorithm is not something I came up myself. I just reworked the one from SWT to be used in JavaFX.
Pingback: JavaFX links of the week, November 28 | JavaFX News, Demos and Insight // FX Experience
Looks great, exactly the way how SplitPane should have worked. Where can I find the code for this? Is there any way to use this without adding efx as a dependency?
Sure the code is in a component who only depends on javafx – currently the code is in the 2.6 branch and once we release that it will be available from maven central
Code is at http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/tree/bundles/runtime/org.eclipse.fx.ui.panes/src/org/eclipse/fx/ui/panes/SashPane.java?h=2.6.x
Very cool, works perfectly. Only thing I added is a drag cursor by adding
sash.setCursor(horizontal.get() ? Cursor.H_RESIZE : Cursor.V_RESIZE);
in createSash()
Oh right – I’ll fix that upstream
I’ve add a cursor now to the sash as well but opted to do that via CSS so that users can restyle the cursor at will – http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/diff/bundles/runtime/org.eclipse.fx.ui.panes/src/org/eclipse/fx/ui/panes/sash-pane.css?h=2.6.x&id=47aefb9ed185bb5a7fa5dd89dd58889c968c53bb
Pingback: JavaFX links of the week, November 28 – fx experience