Control didn't respect Node's setManaged flag

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: javafx

      My understanding is setManaged flag should exclude it from being laid out and computed pref/min/max size. However it worked consistently for Parent but not for Control. In SkinBase.java, computeXxxWidth/Height etc methods checked if the child is managed which is correct. But in layoutChildren method, it will layout all the children anyway. A quick fix would be add " if(child.isManaged())" below.

          protected void layoutChildren(final double contentX, final double contentY,
                  final double contentWidth, final double contentHeight) {
              // By default simply sizes all children to fit within the space provided
              for (int i=0, max=children.size(); i<max; i++) {
                  Node child = children.get(i);
                  if(child.isManaged()) layoutInArea(child, contentX, contentY, contentWidth, contentHeight, -1, HPos.CENTER, VPos.CENTER);
              }
          }

            Assignee:
            Jonathan Giles
            Reporter:
            David Qiao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: