Package org.fxmisc.flowless
Class MinDistanceTo
java.lang.Object
org.fxmisc.flowless.MinDistanceTo
- All Implemented Interfaces:
TargetPosition
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final int
(package private) final Offset
(package private) final Offset
Fields inherited from interface org.fxmisc.flowless.TargetPosition
BEGINNING
-
Constructor Summary
ConstructorsConstructorDescriptionMinDistanceTo
(int itemIndex) MinDistanceTo
(int itemIndex, Offset minY, Offset maxY) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(TargetPositionVisitor visitor) Visitor Pattern: prevents type-checking the implementationclamp
(int size) Insures this position's item index is between 0 andsize
scrollBy
(double delta) transformByChange
(int pos, int removedSize, int addedSize) When the list of items, those displayed in the viewport, and those that are not, are modified, transforms this change to account for those modifications.
-
Field Details
-
itemIndex
final int itemIndex -
minY
-
maxY
-
-
Constructor Details
-
MinDistanceTo
-
MinDistanceTo
public MinDistanceTo(int itemIndex)
-
-
Method Details
-
transformByChange
Description copied from interface:TargetPosition
When the list of items, those displayed in the viewport, and those that are not, are modified, transforms this change to account for those modifications.- Specified by:
transformByChange
in interfaceTargetPosition
- Parameters:
pos
- the cell index where the change beginsremovedSize
- the amount of cells that were removed, starting frompos
addedSize
- the amount of cells that were added, starting frompos
-
scrollBy
- Specified by:
scrollBy
in interfaceTargetPosition
-
accept
Description copied from interface:TargetPosition
Visitor Pattern: prevents type-checking the implementation- Specified by:
accept
in interfaceTargetPosition
-
clamp
Description copied from interface:TargetPosition
Insures this position's item index is between 0 andsize
- Specified by:
clamp
in interfaceTargetPosition
-