Package org.fxmisc.flowless
Class StartOffStart
- java.lang.Object
-
- org.fxmisc.flowless.StartOffStart
-
- All Implemented Interfaces:
TargetPosition
final class StartOffStart extends java.lang.Object implements TargetPosition
ATargetPositionthat instructs itsTargetPositionVisitorto use the cell atitemIndexas the anchor cell, showing it at the "top" of the viewport and to offset it byoffsetFromStart.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intitemIndex(package private) doubleoffsetFromStart-
Fields inherited from interface org.fxmisc.flowless.TargetPosition
BEGINNING
-
-
Constructor Summary
Constructors Constructor Description StartOffStart(int itemIndex, double offsetFromStart)
-
Method Summary
All Methods Static Methods Instance Methods Concrete 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 andsize(package private) static intclamp(int idx, int size)TargetPositionscrollBy(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.
-
-
-
Method Detail
-
transformByChange
public TargetPosition transformByChange(int pos, int removedSize, int addedSize)
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
public TargetPosition scrollBy(double delta)
- Specified by:
scrollByin interfaceTargetPosition
-
accept
public void accept(TargetPositionVisitor visitor)
Description copied from interface:TargetPositionVisitor Pattern: prevents type-checking the implementation- Specified by:
acceptin interfaceTargetPosition
-
clamp
public TargetPosition clamp(int size)
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)
-
-