문제

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.

도움이 되었습니까?

해결책

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);
    }
});
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top