java.lang.Object
org.snapfx.view.DockDropZone
Represents a single drop zone for DnD targeting.
-
Constructor Summary
ConstructorsConstructorDescriptionDockDropZone(DockElement target, DockPosition position, DockDropZoneType type, javafx.geometry.Bounds bounds, int depth, Integer tabIndex, Double insertLineX) Creates one resolved drop-zone candidate. -
Method Summary
Modifier and TypeMethodDescriptiondoublearea()Returns the area of this zone in square pixels.booleancontains(double sceneX, double sceneY) Tests whether a scene-space point is inside this zone.javafx.geometry.BoundsReturns the scene-space bounds used for hit testing.intgetDepth()Returns the target depth in the layout tree.Returns the tab insert-line x-coordinate in scene space.Returns the resolved dock position for this zone.Returns the tab index used for tab-header drops.Returns the target element this zone docks into.getType()Returns the semantic drop-zone type.
-
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 elementposition- proposed dock position on the targettype- drop-zone typebounds- scene-space zone boundsdepth- target depth in the layout treetabIndex- target tab index for tab operations, ornullinsertLineX- scene x-position for tab insert indicator, ornull
-
-
Method Details
-
getTarget
Returns the target element this zone docks into.- Returns:
- target element
-
getPosition
Returns the resolved dock position for this zone.- Returns:
- drop position
-
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
Returns the tab index used for tab-header drops.- Returns:
- tab index or
null
-
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-coordinatesceneY- scene y-coordinate- Returns:
truewhen 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.0when bounds are unavailable
-