public class EFXDragEvent
extends javafx.event.Event
| Modifier and Type | Field and Description |
|---|---|
static javafx.event.EventType<EFXDragEvent> |
ANY
Base type for all events
|
static javafx.event.EventType<EFXDragEvent> |
DRAG_DONE
Event fired when drag is done
|
static javafx.event.EventType<EFXDragEvent> |
DRAG_DROPPED
Event fired when dropped
|
static javafx.event.EventType<EFXDragEvent> |
DRAG_EXITED
Event fired when drag exits the area
|
static javafx.event.EventType<EFXDragEvent> |
DRAG_OVER
Event fired while dragging over a node
|
static javafx.event.EventType<EFXDragEvent> |
DRAG_START
Event fired on a drag start
|
| Constructor and Description |
|---|
EFXDragEvent(java.lang.Object source,
javafx.event.EventTarget target,
javafx.event.EventType<? extends javafx.event.Event> eventType,
double screenX,
double screenY,
boolean complete)
Create a new drag event
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canShowFeedbackDragFeedback() |
java.lang.Object |
getDraggedContent() |
double |
getScreenX() |
double |
getScreenY() |
double |
getX() |
double |
getY() |
boolean |
isComplete() |
void |
setComplete(boolean complete)
Set the drag to be complete.
|
void |
setDraggedContent(java.lang.Object content)
Setting the drag content
|
void |
updateFeedback(java.util.function.Consumer<javafx.scene.layout.StackPane> consumer)
Update the drag feedback
|
static void |
updateFeedbackLocation(double screenX,
double screenY)
Update the screen location while no drag over events occur
|
public static final javafx.event.EventType<EFXDragEvent> ANY
public static javafx.event.EventType<EFXDragEvent> DRAG_START
public static javafx.event.EventType<EFXDragEvent> DRAG_OVER
public static final javafx.event.EventType<EFXDragEvent> DRAG_DROPPED
public static final javafx.event.EventType<EFXDragEvent> DRAG_EXITED
public static final javafx.event.EventType<EFXDragEvent> DRAG_DONE
public EFXDragEvent(java.lang.Object source,
javafx.event.EventTarget target,
javafx.event.EventType<? extends javafx.event.Event> eventType,
double screenX,
double screenY,
boolean complete)
source - the sourcetarget - the targeteventType - the event typescreenX - the screen xscreenY - the screen ycomplete - true when completedpublic void updateFeedback(java.util.function.Consumer<javafx.scene.layout.StackPane> consumer)
consumer - the consumerpublic static void updateFeedbackLocation(double screenX,
double screenY)
screenX - the screen xscreenY - the screen ypublic double getScreenX()
public double getScreenY()
public double getX()
public double getY()
public void setDraggedContent(java.lang.Object content)
content - the contentpublic java.lang.Object getDraggedContent()
public void setComplete(boolean complete)
DRAG_DROPPEDcomplete - true when completedpublic boolean isComplete()
true if drag is completedpublic boolean canShowFeedbackDragFeedback()