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

Wrong calculation of size in ToolBar with not managed children

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      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 ----------

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pmangal Priyanka Mangal (Inactive)
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: