Details
-
Bug
-
Resolution: Fixed
-
P3
-
8u40, 9
Description
FULL PRODUCT VERSION :
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
If a TreeView/TreeTableView has a vertical scroll bar and I scroll to the end of the tree and then resize my window to be larger than the tree, I get the following warnings:
For TreeView:
Oct 23, 2015 5:42:34 PM com.sun.javafx.scene.control.skin.VirtualFlow addTrailingCells
INFO: index exceeds maxCellCount. Check size calculations for class com.sun.javafx.scene.control.skin.TreeViewSkin$1
For TreeTableView:
Oct 23, 2015 5:42:59 PM com.sun.javafx.scene.control.skin.VirtualFlow addTrailingCells
INFO: index exceeds maxCellCount. Check size calculations for class javafx.scene.control.TreeTableRow
Intermittently, one or two of the associated TreeItem icons will be missing as well.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package sample;
import javafx.application.Application;
import javafx.beans.property.ReadOnlyStringWrapper;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Button treeViewButton = new Button("TreeView Test Case");
treeViewButton.setOnAction(e -> openTreeViewTestCase());
Button treeTableViewButton = new Button("TreeTableView Test Case");
treeTableViewButton.setOnAction(e -> openTreeTableViewTestCase());
VBox root = new VBox(10, treeViewButton, treeTableViewButton);
primaryStage.setScene(new Scene(root));
primaryStage.show();
}
private void openTreeViewTestCase() {
TreeView<String> tree = new TreeView<>();
TreeItem<String> treeRoot = new TreeItem<>("root");
treeRoot.setExpanded(true);
tree.setRoot(treeRoot);
for (int i = 0; i < 10; i++)
treeRoot.getChildren().add(new TreeItem<>("child"));
StackPane root = new StackPane();
root.getChildren().add(tree);
Stage stage = new Stage();
stage.setTitle("Scroll to end and resize window to show full tree");
stage.setScene(new Scene(root, 500, 200));
stage.show();
}
private void openTreeTableViewTestCase() {
TreeTableView<String> treeTable = new TreeTableView<>();
TreeTableColumn<String, String> col = new TreeTableColumn<>("Scroll to end and resize window to show full tree");
col.setPrefWidth(330);
col.setCellValueFactory(param -> new ReadOnlyStringWrapper(param.getValue().getValue()));
treeTable.getColumns().add(col);
TreeItem<String> treeRoot = new TreeItem<>("root");
treeRoot.setExpanded(true);
treeTable.setRoot(treeRoot);
for (int i = 0; i < 10; i++)
treeRoot.getChildren().add(new TreeItem<>("child"));
StackPane root = new StackPane();
root.getChildren().add(treeTable);
Stage stage = new Stage();
stage.setTitle("Scroll to end and resize window to show full tree");
stage.setScene(new Scene(root, 500, 200));
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
If a TreeView/TreeTableView has a vertical scroll bar and I scroll to the end of the tree and then resize my window to be larger than the tree, I get the following warnings:
For TreeView:
Oct 23, 2015 5:42:34 PM com.sun.javafx.scene.control.skin.VirtualFlow addTrailingCells
INFO: index exceeds maxCellCount. Check size calculations for class com.sun.javafx.scene.control.skin.TreeViewSkin$1
For TreeTableView:
Oct 23, 2015 5:42:59 PM com.sun.javafx.scene.control.skin.VirtualFlow addTrailingCells
INFO: index exceeds maxCellCount. Check size calculations for class javafx.scene.control.TreeTableRow
Intermittently, one or two of the associated TreeItem icons will be missing as well.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package sample;
import javafx.application.Application;
import javafx.beans.property.ReadOnlyStringWrapper;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Button treeViewButton = new Button("TreeView Test Case");
treeViewButton.setOnAction(e -> openTreeViewTestCase());
Button treeTableViewButton = new Button("TreeTableView Test Case");
treeTableViewButton.setOnAction(e -> openTreeTableViewTestCase());
VBox root = new VBox(10, treeViewButton, treeTableViewButton);
primaryStage.setScene(new Scene(root));
primaryStage.show();
}
private void openTreeViewTestCase() {
TreeView<String> tree = new TreeView<>();
TreeItem<String> treeRoot = new TreeItem<>("root");
treeRoot.setExpanded(true);
tree.setRoot(treeRoot);
for (int i = 0; i < 10; i++)
treeRoot.getChildren().add(new TreeItem<>("child"));
StackPane root = new StackPane();
root.getChildren().add(tree);
Stage stage = new Stage();
stage.setTitle("Scroll to end and resize window to show full tree");
stage.setScene(new Scene(root, 500, 200));
stage.show();
}
private void openTreeTableViewTestCase() {
TreeTableView<String> treeTable = new TreeTableView<>();
TreeTableColumn<String, String> col = new TreeTableColumn<>("Scroll to end and resize window to show full tree");
col.setPrefWidth(330);
col.setCellValueFactory(param -> new ReadOnlyStringWrapper(param.getValue().getValue()));
treeTable.getColumns().add(col);
TreeItem<String> treeRoot = new TreeItem<>("root");
treeRoot.setExpanded(true);
treeTable.setRoot(treeRoot);
for (int i = 0; i < 10; i++)
treeRoot.getChildren().add(new TreeItem<>("child"));
StackPane root = new StackPane();
root.getChildren().add(treeTable);
Stage stage = new Stage();
stage.setTitle("Scroll to end and resize window to show full tree");
stage.setScene(new Scene(root, 500, 200));
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------
Attachments
Issue Links
- duplicates
-
JDK-8172274 Unexpected logging message to standard output
-
- Closed
-