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 SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceInterface to define a new drop handler.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd a new File DropHandler.voidAdd a new DropHandler specifically for JSON elements.voidvoidRemove a File DropHandler.voidRemove a JSON DropHandler.voidsetupTarget(Node target) Prepare a target node to accept drag and drop events.voidsetupTarget(Scene target) Prepare a target scene to accept drag and drop events.
- 
Constructor Details- 
DragDropImportListenerConstructor.- Parameters:
- qupath- the current QuPath instance
 
 
- 
- 
Method Details- 
setupTargetPrepare a target node to accept drag and drop events.- Parameters:
- target-
 
- 
setupTargetPrepare a target scene to accept drag and drop events.- Parameters:
- target-
 
- 
handle- Specified by:
- handlein interface- EventHandler<DragEvent>
 
- 
addFileDropHandlerAdd 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-
 
- 
removeFileDropHandlerRemove a File DropHandler.- Parameters:
- handler-
 
- 
addJsonDropHandlerAdd 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-
 
- 
removeJsonDropHandlerRemove a JSON DropHandler.- Parameters:
- handler-
 
 
-