Package qupath.lib.gui.viewer
Class DragDropImportListener
java.lang.Object
qupath.lib.gui.viewer.DragDropImportListener
- All Implemented Interfaces:
EventListener
,EventHandler<DragEvent>
Drag and drop support for main QuPath application, which can support a range of different object types (Files, URLs, Strings,..)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Interface to define a new drop handler. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new File DropHandler.void
Add a new DropHandler specifically for JSON elements.void
void
Remove a File DropHandler.void
Remove a JSON DropHandler.void
setupTarget
(Node target) Prepare a target node to accept drag and drop events.void
setupTarget
(Scene target) Prepare a target scene to accept drag and drop events.
-
Constructor Details
-
DragDropImportListener
Constructor.- Parameters:
qupath
- the current QuPath instance
-
-
Method Details
-
setupTarget
Prepare a target node to accept drag and drop events.- Parameters:
target
-
-
setupTarget
Prepare a target scene to accept drag and drop events.- Parameters:
target
-
-
handle
- Specified by:
handle
in interfaceEventHandler<DragEvent>
-
addFileDropHandler
Add a new File DropHandler.This may be called on a drag-and-drop application on the main window, if no other handler deals with the event.
- Parameters:
handler
-
-
removeFileDropHandler
Remove a File DropHandler.- Parameters:
handler
-
-
addJsonDropHandler
Add a new DropHandler specifically for JSON elements.This may be called when a json file is dropped on the main QuPath window. Handlers should quickly inspect the element and return if they cannot handle it.
- Parameters:
handler
-
-
removeJsonDropHandler
Remove a JSON DropHandler.- Parameters:
handler
-
-