Package org.fxmisc.flowless
Interface TargetPosition
-
- All Known Implementing Classes:
EndOffEnd
,MinDistanceTo
,StartOffStart
interface TargetPosition
Defines where theNavigator
should place the anchor cell's node in the viewport. Its three implementations areStartOffStart
,EndOffEnd
, andMinDistanceTo
.
-
-
Field Summary
Fields Modifier and Type Field Description static TargetPosition
BEGINNING
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
accept(TargetPositionVisitor visitor)
Visitor Pattern: prevents type-checking the implementationTargetPosition
clamp(int size)
Insures this position's item index is between 0 andsize
TargetPosition
scrollBy(double delta)
TargetPosition
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 Detail
-
BEGINNING
static final TargetPosition BEGINNING
-
-
Method Detail
-
transformByChange
TargetPosition 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.- 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
TargetPosition scrollBy(double delta)
-
accept
void accept(TargetPositionVisitor visitor)
Visitor Pattern: prevents type-checking the implementation
-
clamp
TargetPosition clamp(int size)
Insures this position's item index is between 0 andsize
-
-