Class StartOffStart
java.lang.Object
org.fxmisc.flowless.StartOffStart
- All Implemented Interfaces:
TargetPosition
A
TargetPosition that instructs its TargetPositionVisitor to use the cell at itemIndex
as the anchor cell, showing it at the "top" of the viewport and to offset it by offsetFromStart.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final int(package private) final doubleFields inherited from interface TargetPosition
BEGINNING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(TargetPositionVisitor visitor) Visitor Pattern: prevents type-checking the implementationclamp(int size) Insures this position's item index is between 0 andsize(package private) static intclamp(int idx, int size) 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 -
offsetFromStart
final double offsetFromStart
-
-
Constructor Details
-
StartOffStart
StartOffStart(int itemIndex, double offsetFromStart)
-
-
Method Details
-
transformByChange
Description copied from interface:TargetPositionWhen 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:
transformByChangein interfaceTargetPosition- Parameters:
pos- the cell index where the change beginsremovedSize- the amount of cells that were removed, starting fromposaddedSize- the amount of cells that were added, starting frompos
-
scrollBy
- Specified by:
scrollByin interfaceTargetPosition
-
accept
Description copied from interface:TargetPositionVisitor Pattern: prevents type-checking the implementation- Specified by:
acceptin interfaceTargetPosition
-
clamp
Description copied from interface:TargetPositionInsures this position's item index is between 0 andsize- Specified by:
clampin interfaceTargetPosition
-
clamp
static int clamp(int idx, int size)
-