Details
-
Bug
-
Resolution: Duplicate
-
P4
-
8
-
jdk 1.8.0 - b62
Description
To reproduce the bug right click the scroll bar. You'll see that content is scrolled.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeView;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class BugTreeViewRightCilck extends Application {
TreeView testedControl;
@Override
public void start(Stage stage) {
testedControl = new TreeView();
testedControl.setMaxHeight(150d);
testedControl.setPrefHeight(150d);
TreeItem rootItem = new TreeItem("Root");
rootItem.setExpanded(true);
testedControl.setRoot(rootItem);
for (int i = 0; i < 10; i++) {
TreeItem item = new TreeItem("item - " + i);
item.setExpanded(true);
rootItem.getChildren().add(item);
for (int j = 0; j < 10; j++) {
item.getChildren().add(new TreeItem("item - " + i + " - " + j));
}
}
HBox root = new HBox(20d);
root.getChildren().add(testedControl);
Scene scene = new Scene(root, 300, 250);
stage.setScene(scene);
stage.setTitle(System.getProperty("java.runtime.version") + "; " + System.getProperty("javafx.runtime.version"));
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeView;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class BugTreeViewRightCilck extends Application {
TreeView testedControl;
@Override
public void start(Stage stage) {
testedControl = new TreeView();
testedControl.setMaxHeight(150d);
testedControl.setPrefHeight(150d);
TreeItem rootItem = new TreeItem("Root");
rootItem.setExpanded(true);
testedControl.setRoot(rootItem);
for (int i = 0; i < 10; i++) {
TreeItem item = new TreeItem("item - " + i);
item.setExpanded(true);
rootItem.getChildren().add(item);
for (int j = 0; j < 10; j++) {
item.getChildren().add(new TreeItem("item - " + i + " - " + j));
}
}
HBox root = new HBox(20d);
root.getChildren().add(testedControl);
Scene scene = new Scene(root, 300, 250);
stage.setScene(scene);
stage.setTitle(System.getProperty("java.runtime.version") + "; " + System.getProperty("javafx.runtime.version"));
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
Attachments
Issue Links
- duplicates
-
JDK-8116238 [ScrollBar] Right-click moves the knob.
- Resolved