Package org.fxmisc.flowless
Interface TargetPosition
-
- All Known Implementing Classes:
EndOffEnd,MinDistanceTo,StartOffStart
interface TargetPositionDefines where theNavigatorshould place the anchor cell's node in the viewport. Its three implementations areStartOffStart,EndOffEnd, andMinDistanceTo.
-
-
Field Summary
Fields Modifier and Type Field Description static TargetPositionBEGINNING
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaccept(TargetPositionVisitor visitor)Visitor Pattern: prevents type-checking the implementationTargetPositionclamp(int size)Insures this position's item index is between 0 andsizeTargetPositionscrollBy(double delta)TargetPositiontransformByChange(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 fromposaddedSize- 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
-
-