public class EFXDnDAdapter
extends java.lang.Object
| Constructor and Description |
|---|
EFXDnDAdapter(javafx.scene.Node node,
javafx.scene.Node doneEventTarget)
Create a new adapter
|
| Modifier and Type | Method and Description |
|---|---|
void |
disable()
Disable dnd for the node
|
void |
enable()
Enable dnd for the node
|
void |
setDragDoneConsumer(java.util.function.BiConsumer<EFXDnDAdapter,EFXDragEvent> dragDoneConsumer)
A consumer notified that the drag has finished
|
void |
setDragStartConsumer(java.util.function.BiConsumer<EFXDnDAdapter,EFXDragEvent> dragStartConsumer)
A consumer who is informed that the drag has started
|
void |
setDragStartValidator(java.util.function.BiFunction<EFXDnDAdapter,javafx.scene.input.MouseEvent,java.lang.Boolean> dragStartValidator)
Validate that the drag can start
|
public EFXDnDAdapter(javafx.scene.Node node,
javafx.scene.Node doneEventTarget)
node - the node itselfdoneEventTarget - the target the done event is sent topublic void enable()
public void disable()
public void setDragStartValidator(java.util.function.BiFunction<EFXDnDAdapter,javafx.scene.input.MouseEvent,java.lang.Boolean> dragStartValidator)
dragStartValidator - a validator who can return false to veto the start of the drag
operationpublic void setDragStartConsumer(java.util.function.BiConsumer<EFXDnDAdapter,EFXDragEvent> dragStartConsumer)
dragStartConsumer - the consumerpublic void setDragDoneConsumer(java.util.function.BiConsumer<EFXDnDAdapter,EFXDragEvent> dragDoneConsumer)
dragDoneConsumer - the consumer