一、节点原鼠标移动事件
//鼠标进入node
node.setOnMouseEntered(event->{//do something
});//鼠标退出node
node.setOnMouseExited(event->{//do something
});//鼠标移动
node.setOnMouseMoved(event->{//do something
});
二、节点监听鼠标移动事件
//鼠标进入
node.addEventFilter(MouseDragEvent.MOUSE_ENTERED,event->{//do something
});//鼠标退出
node.addEventFilter(MouseDragEvent.MOUSE_EXITED,event->{//do something
});//鼠标移动
node.addEventFilter(MouseDragEvent.MOUSE_MOVED, event -> {//do something});