Module org.snapfx

Class DockDragData

java.lang.Object
org.snapfx.dnd.DockDragData

public class DockDragData extends Object
Data transfer object for drag & drop operations.
  • Constructor Details

    • DockDragData

      public DockDragData(DockNode draggedNode)
      Creates drag-state data for one dragged node.
      Parameters:
      draggedNode - node currently being dragged
  • Method Details

    • getDraggedNode

      public DockNode getDraggedNode()
      Returns the node currently being dragged.
      Returns:
      dragged node
    • getDropTarget

      public DockElement getDropTarget()
      Returns the current drop target under the pointer.
      Returns:
      drop target or null when none is active
    • setDropTarget

      public void setDropTarget(DockElement dropTarget)
      Updates the active drop target.
      Parameters:
      dropTarget - target under pointer, or null
    • getDropPosition

      public DockPosition getDropPosition()
      Returns the proposed dock position for the current target.
      Returns:
      drop position or null
    • setDropPosition

      public void setDropPosition(DockPosition dropPosition)
      Updates the proposed dock position.
      Parameters:
      dropPosition - dock position or null
    • getDropTabIndex

      public Integer getDropTabIndex()
      Returns the target tab index for tab insert operations.
      Returns:
      tab index or null
    • setDropTabIndex

      public void setDropTabIndex(Integer dropTabIndex)
      Sets the target tab index for tab insert operations.
      Parameters:
      dropTabIndex - target tab index or null
    • 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