Package org.fxmisc.flowless
Class VirtualFlowHit<C extends Cell<?,?>>
- java.lang.Object
-
- org.fxmisc.flowless.VirtualFlowHit<C>
-
- Direct Known Subclasses:
VirtualFlowHit.CellHit
,VirtualFlowHit.HitAfterCells
,VirtualFlowHit.HitBeforeCells
public abstract class VirtualFlowHit<C extends Cell<?,?>> extends java.lang.Object
Stores the result of aVirtualFlow.hit(double, double)
. Before calling any of the getters, one should determine what kind of hit this object is viaisCellHit()
,isBeforeCells()
, andisAfterCells()
. Otherwise, calling the wrong getter will throw anUnsupportedOperationException
.Types of VirtualFlowHit:
-
Cell Hit: a hit occurs on a displayed cell's node. One can call
getCell()
,getCellIndex()
, andgetCellOffset()
. -
Hit Before Cells: a hit occurred before the displayed cells. One can call
getOffsetBeforeCells()
. -
Hit After Cells: a hit occurred after the displayed cells. One can call
getOffsetAfterCells()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
VirtualFlowHit.CellHit<C extends Cell<?,?>>
private static class
VirtualFlowHit.HitAfterCells<C extends Cell<?,?>>
private static class
VirtualFlowHit.HitBeforeCells<C extends Cell<?,?>>
-
Constructor Summary
Constructors Modifier Constructor Description private
VirtualFlowHit()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) static <C extends Cell<?,?>>
VirtualFlowHit<C>cellHit(int cellIndex, C cell, double x, double y)
abstract C
getCell()
abstract int
getCellIndex()
abstract javafx.geometry.Point2D
getCellOffset()
abstract javafx.geometry.Point2D
getOffsetAfterCells()
abstract javafx.geometry.Point2D
getOffsetBeforeCells()
(package private) static <C extends Cell<?,?>>
VirtualFlowHit<C>hitAfterCells(double x, double y)
(package private) static <C extends Cell<?,?>>
VirtualFlowHit<C>hitBeforeCells(double x, double y)
abstract boolean
isAfterCells()
abstract boolean
isBeforeCells()
abstract boolean
isCellHit()
-
-
-
Method Detail
-
cellHit
static <C extends Cell<?,?>> VirtualFlowHit<C> cellHit(int cellIndex, C cell, double x, double y)
-
hitBeforeCells
static <C extends Cell<?,?>> VirtualFlowHit<C> hitBeforeCells(double x, double y)
-
hitAfterCells
static <C extends Cell<?,?>> VirtualFlowHit<C> hitAfterCells(double x, double y)
-
isCellHit
public abstract boolean isCellHit()
-
isBeforeCells
public abstract boolean isBeforeCells()
-
isAfterCells
public abstract boolean isAfterCells()
-
getCellIndex
public abstract int getCellIndex()
-
getCell
public abstract C getCell()
-
getCellOffset
public abstract javafx.geometry.Point2D getCellOffset()
-
getOffsetBeforeCells
public abstract javafx.geometry.Point2D getOffsetBeforeCells()
-
getOffsetAfterCells
public abstract javafx.geometry.Point2D getOffsetAfterCells()
-
-