List of usage examples for javafx.scene.input DragEvent consume
public void consume()
From source file:org.ykc.usbcx.MainWindowController.java
@FXML void openOnDragDrop(DragEvent event) { Dragboard db = event.getDragboard(); boolean success = false; if (db.hasFiles()) { String filePath = null;// w w w .j a v a2 s .co m for (File file : db.getFiles()) { if (Utils.getFileExtension(file).equals("ucx1")) { success = true; partFileList = OpenRecord.open(file, usbcontrol, statusBar); loadRecord(); break; } } } event.setDropCompleted(success); event.consume(); }