-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
8u25, 8u40
The TitlePane doesnt deliver MouseEvents when listening on the scene.
Example code:
Behaviour: When clicked on the red circle, no event is fired.
@Override
public void start(Stage primaryStage) throws Exception{
TitledPane titledPane = new TitledPane("Circle", new Circle(30, Color.RED));
Pane root = new Pane(titledPane);
titledPane.setTranslateX(50);
titledPane.setTranslateY(50);
Scene scene = new Scene(root, 300, 275);
scene.setOnMousePressed(event -> {
System.out.println(event.getX() + " " + event.getSceneX() + " " + event.getScreenX());
});
primaryStage.setScene(scene);
primaryStage.show();
}
Example code:
Behaviour: When clicked on the red circle, no event is fired.
@Override
public void start(Stage primaryStage) throws Exception{
TitledPane titledPane = new TitledPane("Circle", new Circle(30, Color.RED));
Pane root = new Pane(titledPane);
titledPane.setTranslateX(50);
titledPane.setTranslateY(50);
Scene scene = new Scene(root, 300, 275);
scene.setOnMousePressed(event -> {
System.out.println(event.getX() + " " + event.getSceneX() + " " + event.getScreenX());
});
primaryStage.setScene(scene);
primaryStage.show();
}