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

TreeView does not play nicely with custom cell factories in all instances

XMLWordPrintable

      Using my CheckBoxCell test application, I run into problems where even after expanding a branch the items do not show. This does not appear when using a simple cell factory, e.g.

      treeView.setCellFactory(new Callback<TreeView<String>, TreeCell<String>>() {
                  @Override public TreeCell<String> call(TreeView<String> tv) {
                      return new TreeCell<String>() {
                          @Override
                          public void updateItem(TreeItem<String> item, boolean empty) {
                              super.updateItem(item, empty);
                              setNode(new Label(item == null ? "" : item.getValue()));
                          }
                      };
                  }
              });

            jgiles Jonathan Giles
            jgiles Jonathan Giles
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: