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

Control didn't respect Node's setManaged flag

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P3
    • Resolution: Fixed
    • 8
    • 8
    • javafx

    Description

      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);
              }
          }

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:
              Imported: