Package org.fxmisc.flowless
Class EndOffEnd
- java.lang.Object
-
- org.fxmisc.flowless.EndOffEnd
-
- All Implemented Interfaces:
TargetPosition
final class EndOffEnd extends java.lang.Object implements TargetPosition
ATargetPosition
that instructs itsTargetPositionVisitor
to use the cell atitemIndex
as the anchor cell, showing it at the "bottom" of the viewport and to offset it byoffsetFromEnd
.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
itemIndex
(package private) double
offsetFromEnd
-
Fields inherited from interface org.fxmisc.flowless.TargetPosition
BEGINNING
-
-
Constructor Summary
Constructors Constructor Description EndOffEnd(int itemIndex, double offsetFromEnd)
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Method Detail
-
transformByChange
public TargetPosition transformByChange(int pos, int removedSize, int addedSize)
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
public TargetPosition scrollBy(double delta)
- Specified by:
scrollBy
in interfaceTargetPosition
-
accept
public void accept(TargetPositionVisitor visitor)
Description copied from interface:TargetPosition
Visitor Pattern: prevents type-checking the implementation- Specified by:
accept
in interfaceTargetPosition
-
clamp
public TargetPosition clamp(int size)
Description copied from interface:TargetPosition
Insures this position's item index is between 0 andsize
- Specified by:
clamp
in interfaceTargetPosition
-
-