Interface TargetPosition
- All Known Implementing Classes:
EndOffEnd, MinDistanceTo, StartOffStart
interface TargetPosition
Defines where the
Navigator should place the anchor cell's node in the viewport. Its three implementations
are StartOffStart, EndOffEnd, and MinDistanceTo.-
Field Summary
Fields -
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 andsizescrollBy(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
-
BEGINNING
-
-
Method Details
-
transformByChange
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
-
accept
Visitor Pattern: prevents type-checking the implementation -
clamp
Insures this position's item index is between 0 andsize
-