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

[TreeTableView] graphic property of TreeItem is still visible after collapsing tree

    Details

    • Subcomponent:
    • Introduced In Version:
    • Resolved In Build:
      b01
    • CPU:
      x86_64
    • OS:
      windows_7
    • Verification:
      Verified

      Backports

        Description

        FULL PRODUCT VERSION :
        java version "1.8.0_92"
        Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
        Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows [Version 6.1.7601]

        A DESCRIPTION OF THE PROBLEM :
        To reproduce just launch class below and collapse root tree - you will see that child treeItem graphics are still visible.



        REGRESSION. Last worked in version 8u91

        ADDITIONAL REGRESSION INFORMATION:
        java version "1.8.0_91"
        Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
        Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        When you collapse root tree - you should not see graphics that left from child treeItems
        ACTUAL -
        When you collapse root tree - you can see graphics that left from child treeItems

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        import java.util.Collection;
        import java.util.stream.Collectors;
        import java.util.stream.IntStream;
        import javafx.application.Application;
        import javafx.beans.property.ReadOnlyStringWrapper;
        import javafx.scene.Scene;
        import javafx.scene.control.TreeItem;
        import javafx.scene.control.TreeTableColumn;
        import javafx.scene.control.TreeTableView;
        import javafx.scene.shape.Rectangle;
        import javafx.stage.Stage;

        public class Test extends Application {

        public void start(Stage pStage) {
        pStage.setTitle("Test");

        // create tree items
        final TreeItem<String> root = new TreeItem<>("Root Node");
        root.setExpanded(true);

        final Collection<TreeItem<String>> children = IntStream.rangeClosed(1, 5)
        .mapToObj(pIdx ->new TreeItem<>("Child Node " + pIdx, new Rectangle(10, 10)))
        .collect(Collectors.toList());

        root.getChildren().addAll(children);

        // create TreeTableView
        final TreeTableView<String> treeTableView = new TreeTableView<>(root);
        final TreeTableColumn<String,String> column = new TreeTableColumn<>("Column");
        column.setCellValueFactory(
        pTreeItem -> new ReadOnlyStringWrapper(pTreeItem.getValue().getValue()));
        treeTableView.getColumns().add(column);

        pStage.setScene(new Scene(treeTableView, 300, 450));
        pStage.show();
        }

        public static void main(String[] pArgs) {
        launch(pArgs);
        }
        }
        ---------- END SOURCE ----------

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jgiles Jonathan Giles
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: