Problem
You can add an event listener to a node which detects mouse movement over it. This doesn\'t work if a mouse button was pressed before you mo
One solution is to add an event filter to the scene which enables the sourceNode.startFullDrag(). This will work even if you start dragging the mouse outside of your canvas (if you want any space without nodes in your application).
Like this:
scene.addEventFilter(MouseEvent.DRAG_DETECTED , new EventHandler() {
@Override
public void handle(MouseEvent mouseEvent) {
scene.startFullDrag();
}
});
And then you could:
node.setOnMouseDragEntered(new EventHandler() {
@Override
public void handle(MouseEvent event) {
led.setOn(true);
}
});