Question

I can drag jfxtras Window by clicking on ImageView in window area. I need to handle mouse move, swipe... events by ImageView. How disable handling mouse events on content window area?

Note: You can drag window by ImageView in content area, but can't by Button.

Was it helpful?

Solution

I found solution. But it seems like hack:

imageView.addEventHandler(MouseEvent.MOUSE_DRAGGED, new EventHandler<MouseEvent>() {
    @Override
    public void handle(MouseEvent mouseEvent) {                    
        window.setMovable(false)
    }
});
imageView.addEventHandler(MouseEvent.MOUSE_EXITED, new EventHandler<MouseEvent>() {
    @Override
    public void handle(MouseEvent mouseEvent) {
        window.setMovable(true);
    }
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top