FULL PRODUCT VERSION :
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 10 version 1709 build 16299.248
A DESCRIPTION OF THE PROBLEM :
Not managed children of a ToolBar are still taken into account when calculating the size of the ToolBar.
JavaDoc of Node: "If the node is managed, it's parent will factor the node's geometry into its own preferred size and layoutBounds calculations and will lay it out during the scene's layout pass."
From that I would expect, that only managed children are calculated.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Button b1 = new Button();
b1.setManaged(false);
ToolBar t = new ToolBar();
t.getItems().setAll(new Button("AAA"), b1);
---------- END SOURCE ----------
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 10 version 1709 build 16299.248
A DESCRIPTION OF THE PROBLEM :
Not managed children of a ToolBar are still taken into account when calculating the size of the ToolBar.
JavaDoc of Node: "If the node is managed, it's parent will factor the node's geometry into its own preferred size and layoutBounds calculations and will lay it out during the scene's layout pass."
From that I would expect, that only managed children are calculated.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Button b1 = new Button();
b1.setManaged(false);
ToolBar t = new ToolBar();
t.getItems().setAll(new Button("AAA"), b1);
---------- END SOURCE ----------
- duplicates
-
JDK-8190282 Overflow calculation broken when invisible/unmanaged items are shown in a Toolbar
- Closed