root.addEventHandler(MOUSE_ENTERED, e -> highlight(true));
root.addEventHandler(DRAG_OVER, e -> { if (DragUtil.hasImage(e)) onHighlight.accept(true); });
root.addEventHandler(DRAG_EXITED, e -> onHighlight.accept(false));
root.addEventHandler(MOUSE_CLICKED, e -> {
if (e.getButton()==PRIMARY) {
<BUG>File f = Environment.chooseFile("Select image to add to tag", FILE, new File(""), root.getScene().getWindow());
if (f!= null && onFileDropped!=null) onFileDropped.accept(fut(f));
e.consume();</BUG>
}
});

root.addEventHandler(MOUSE_ENTERED, e -> highlight(true));
root.addEventHandler(DRAG_OVER, e -> { if (DragUtil.hasImage(e)) onHighlight.accept(true); });
root.addEventHandler(DRAG_EXITED, e -> onHighlight.accept(false));
root.addEventHandler(MOUSE_CLICKED, e -> {
if (e.getButton()==PRIMARY) {
Environment.chooseFile("Select image to add to tag", FILE, new File(""), root.getScene().getWindow())
.ifOk(file -> {
if (onFileDropped!=null)
onFileDropped.accept(fut(file));
});
e.consume();
}
});
