java.lang.Object
org.snapfx.dnd.DockDragData
Data transfer object for drag & drop operations.
-
Constructor Summary
ConstructorsConstructorDescriptionDockDragData(DockNode draggedNode) Creates drag-state data for one dragged node. -
Method Summary
Modifier and TypeMethodDescriptionReturns the node currently being dragged.Returns the proposed dock position for the current target.Returns the target tab index for tab insert operations.Returns the current drop target under the pointer.doubleReturns the current pointer screen x-coordinate.doubleReturns the current pointer screen y-coordinate.voidsetDropPosition(DockPosition dropPosition) Updates the proposed dock position.voidsetDropTabIndex(Integer dropTabIndex) Sets the target tab index for tab insert operations.voidsetDropTarget(DockElement dropTarget) Updates the active drop target.voidsetMouseX(double mouseX) Sets the current pointer screen x-coordinate.voidsetMouseY(double mouseY) Sets the current pointer screen y-coordinate.
-
Constructor Details
-
DockDragData
Creates drag-state data for one dragged node.- Parameters:
draggedNode- node currently being dragged
-
-
Method Details
-
getDraggedNode
Returns the node currently being dragged.- Returns:
- dragged node
-
getDropTarget
Returns the current drop target under the pointer.- Returns:
- drop target or
nullwhen none is active
-
setDropTarget
Updates the active drop target.- Parameters:
dropTarget- target under pointer, ornull
-
getDropPosition
Returns the proposed dock position for the current target.- Returns:
- drop position or
null
-
setDropPosition
Updates the proposed dock position.- Parameters:
dropPosition- dock position ornull
-
getDropTabIndex
Returns the target tab index for tab insert operations.- Returns:
- tab index or
null
-
setDropTabIndex
Sets the target tab index for tab insert operations.- Parameters:
dropTabIndex- target tab index ornull
-
getMouseX
public double getMouseX()Returns the current pointer screen x-coordinate.- Returns:
- screen x-coordinate in pixels
-
setMouseX
public void setMouseX(double mouseX) Sets the current pointer screen x-coordinate.- Parameters:
mouseX- screen x-coordinate in pixels
-
getMouseY
public double getMouseY()Returns the current pointer screen y-coordinate.- Returns:
- screen y-coordinate in pixels
-
setMouseY
public void setMouseY(double mouseY) Sets the current pointer screen y-coordinate.- Parameters:
mouseY- screen y-coordinate in pixels
-