Module org.snapfx

Class DockDropZone

java.lang.Object
org.snapfx.view.DockDropZone

public class DockDropZone extends Object
Represents a single drop zone for DnD targeting.
  • Constructor Details

    • DockDropZone

      public DockDropZone(DockElement target, DockPosition position, DockDropZoneType type, javafx.geometry.Bounds bounds, int depth, Integer tabIndex, Double insertLineX)
      Creates one resolved drop-zone candidate.
      Parameters:
      target - drop target element
      position - proposed dock position on the target
      type - drop-zone type
      bounds - scene-space zone bounds
      depth - target depth in the layout tree
      tabIndex - target tab index for tab operations, or null
      insertLineX - scene x-position for tab insert indicator, or null
  • Method Details

    • getTarget

      public DockElement getTarget()
      Returns the target element this zone docks into.
      Returns:
      target element
    • getPosition

      public DockPosition getPosition()
      Returns the resolved dock position for this zone.
      Returns:
      drop position
    • getType

      public DockDropZoneType getType()
      Returns the semantic drop-zone type.
      Returns:
      zone type
    • getBounds

      public javafx.geometry.Bounds getBounds()
      Returns the scene-space bounds used for hit testing.
      Returns:
      zone bounds, or null
    • getDepth

      public int getDepth()
      Returns the target depth in the layout tree.
      Returns:
      depth (higher is deeper)
    • getTabIndex

      public Integer getTabIndex()
      Returns the tab index used for tab-header drops.
      Returns:
      tab index or null
    • getInsertLineX

      public Double getInsertLineX()
      Returns the tab insert-line x-coordinate in scene space.
      Returns:
      scene x-coordinate or null
    • contains

      public boolean contains(double sceneX, double sceneY)
      Tests whether a scene-space point is inside this zone.
      Parameters:
      sceneX - scene x-coordinate
      sceneY - scene y-coordinate
      Returns:
      true when the point is inside the zone bounds
    • area

      public double area()
      Returns the area of this zone in square pixels.
      Returns:
      zone area, or 0.0 when bounds are unavailable