Where are my ScrollEvents going? [message #1706448] |
Wed, 26 August 2015 22:46 |
Paul Roubekas Messages: 207 Registered: March 2012 Location: Chattanooga, TN USA |
Senior Member |
|
|
I know the ScrollPane is not directly supported by e(fx)clipse. But I was able to wrap the ScrollPane with a BorderPane and get to render.
I have taken code that worked in a JavaFX application and put the code into e4 class with a @PostConstruct DI to build the ScrollPane which is wrapped by the BorderPane.
My problem is that I need the mouse wheel scroll event. In the Java FX application the below code works. In the e4 part it does not work. I have invoked the setOnScroll() to every part, The BorderPane, ScrooPane, Layout (Vox) and Scene. The mouse scroll event never makes it to any pane.
spane.setOnScroll(new EventHandler<ScrollEvent>() {
@Override
public void handle(ScrollEvent event) {
System.out.println("In ScrollEvent event for spane:");
event.consume();
}
});
What seems to be the default behavior (Horizontal scroll) is getting the mouse scroll event and moving the rendering up and down.
Why is the setOnScroll not working?
P.S. I am somewhat new to e4 and JavaFX, so my mistake could be something simple.
Oxygen 3a
Windows 10
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04346 seconds