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

children Property should work for all Parent

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • None
    • 8u5
    • javafx
    • If it matters: Java8u5/Windows SevenSP1/Eclipse_Luna.

    Description

      children Property does not always include all direct descendents.
      At least SplitPane "children" are in items Property.

      This makes almost impossible to uniformly walk the widget tree.
      In particular the following snippet will NOT work if SplitPanes are involved (I'm not sure about other kind of containers).

      static class Visitor {
          public void visit(Node node){
              ...
          }
      }

      protected void walkWidgets(Node n, Visitor cb) {
          if (n instanceof Parent) {
              Parent p = (Parent) n;
              for (Node c : p.getChildrenUnmodifiable()) {
                  walkWidgets(c, cb);
              }
          }
          cb.visit(n);
      }

      Attachments

        Issue Links

          Activity

            People

              msladecek Martin Sládeček
              mcondareljfx Mauro Condarelli (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: