Module VirtualizedFX
Class PaginatedHelper.PaginatedVerticalHelper
java.lang.Object
io.github.palexdev.virtualizedfx.flow.OrientationHelper.AbstractOrientationHelper
io.github.palexdev.virtualizedfx.flow.OrientationHelper.VerticalHelper
io.github.palexdev.virtualizedfx.flow.paginated.PaginatedHelper.PaginatedVerticalHelper
- All Implemented Interfaces:
OrientationHelper,PaginatedHelper
- Enclosing interface:
- PaginatedHelper
public static class PaginatedHelper.PaginatedVerticalHelper
extends OrientationHelper.VerticalHelper
implements PaginatedHelper
Concrete implementation of
PaginatedHelper to be used with PaginatedVirtualFlow when its
VirtualFlow.orientationProperty() is VERTICAL, extends OrientationHelper.VerticalHelper.-
Property Summary
Properties inherited from class io.github.palexdev.virtualizedfx.flow.OrientationHelper.AbstractOrientationHelper
estimatedLength, maxBreadthProperties inherited from interface io.github.palexdev.virtualizedfx.flow.OrientationHelper
estimatedLength, maxBreadth -
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.palexdev.virtualizedfx.flow.OrientationHelper
OrientationHelper.AbstractOrientationHelper, OrientationHelper.HorizontalHelper, OrientationHelper.VerticalHelperNested classes/interfaces inherited from interface io.github.palexdev.virtualizedfx.flow.paginated.PaginatedHelper
PaginatedHelper.PaginatedHorizontalHelper, PaginatedHelper.PaginatedVerticalHelper -
Field Summary
FieldsFields inherited from class io.github.palexdev.virtualizedfx.flow.OrientationHelper.AbstractOrientationHelper
estimatedLength, manager, maxBreadth, virtualFlow -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disposes bindings/listeners that are not required anymore, for example when changing orientation and helper as well, the old is disposed.voidgoToPage(int page) Scrolls the viewport to the desired page.intmaxCells()doubleOverridden to return the pixel position of the last page.doublepageToPos(int page) Converts the given page number to the corresponding position in pixels.voidscrollBy(double pixels) This is unsupported as thePaginatedVirtualFlowcan only scroll to certain pixel values, given by the pages.voidscrollToIndex(int index) Basically the same asgoToPage(int), the index parameter is always clamped between 1 andPaginatedVirtualFlow.maxPageProperty().voidscrollToPixel(double pixel) This is unsupported as thePaginatedVirtualFlowcan only scroll to certain pixel values, given by the pages.Methods inherited from class io.github.palexdev.virtualizedfx.flow.OrientationHelper.VerticalHelper
computeBreadth, computeEstimatedLength, firstVisible, invalidatePos, lastVisible, layout, maxHScroll, xPosBinding, yPosBindingMethods inherited from class io.github.palexdev.virtualizedfx.flow.OrientationHelper.AbstractOrientationHelper
estimatedLengthProperty, maxBreadthPropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.palexdev.virtualizedfx.flow.OrientationHelper
computeBreadth, computeEstimatedLength, estimatedLengthProperty, firstVisible, invalidatePos, lastVisible, layout, maxBreadthProperty, maxHScroll, xPosBinding, yPosBinding
-
Field Details
-
pFlow
-
-
Constructor Details
-
PaginatedVerticalHelper
-
-
Method Details
-
maxCells
public int maxCells()Overridden to return
PaginatedVirtualFlow.cellsPerPageProperty().- Specified by:
maxCellsin interfaceOrientationHelper- Overrides:
maxCellsin classOrientationHelper.VerticalHelper- Returns:
- the maximum number of cells the viewport can display, this also includes one cell of overscan/buffer
-
maxVScroll
public double maxVScroll()Overridden to return the pixel position of the last page.- Specified by:
maxVScrollin interfaceOrientationHelper- Overrides:
maxVScrollin classOrientationHelper.VerticalHelper- Returns:
- the maximum amount of pixels the virtual flow can scroll on the vertical direction
-
pageToPos
public double pageToPos(int page) Converts the given page number to the corresponding position in pixels.This is given by
(page - 1) * cellsPerPage * cellSize.- Specified by:
pageToPosin interfacePaginatedHelper
-
goToPage
public void goToPage(int page) Scrolls the viewport to the desired page.Implemented to use both
pageToPos(int)andscrollToPixel(double).- Specified by:
goToPagein interfacePaginatedHelper
-
scrollBy
public void scrollBy(double pixels) This is unsupported as thePaginatedVirtualFlowcan only scroll to certain pixel values, given by the pages.- Specified by:
scrollByin interfaceOrientationHelper- Overrides:
scrollByin classOrientationHelper.VerticalHelper- Throws:
UnsupportedOperationException
-
scrollToPixel
public void scrollToPixel(double pixel) This is unsupported as thePaginatedVirtualFlowcan only scroll to certain pixel values, given by the pages.- Specified by:
scrollToPixelin interfaceOrientationHelper- Overrides:
scrollToPixelin classOrientationHelper.VerticalHelper- Throws:
UnsupportedOperationException
-
scrollToIndex
public void scrollToIndex(int index) Basically the same asgoToPage(int), the index parameter is always clamped between 1 andPaginatedVirtualFlow.maxPageProperty().- Specified by:
scrollToIndexin interfaceOrientationHelper- Overrides:
scrollToIndexin classOrientationHelper.VerticalHelper
-
dispose
public void dispose()Description copied from interface:OrientationHelperDisposes bindings/listeners that are not required anymore, for example when changing orientation and helper as well, the old is disposed.- Specified by:
disposein interfaceOrientationHelper- Overrides:
disposein classOrientationHelper.VerticalHelper
-