- All Known Subinterfaces:
PaginatedHelper
- All Known Implementing Classes:
GridHelper.AbstractHelper
,GridHelper.DefaultGridHelper
,PaginatedHelper.PaginatedGridHelper
public interface GridHelper
The
GridHelper
is a utility interface which collects a series of common computations/operations used by
VirtualGrid
and its subcomponents. Has one concrete implementation which is GridHelper.DefaultGridHelper
-
Property Summary
PropertiesTypePropertyDescriptionReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.Size>
Keeps the results ofcomputeEstimatedSize()
. -
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Abstract implementation ofGridHelper
, base class forGridHelper.DefaultGridHelper
.static class
Concrete implementation ofGridHelper.AbstractHelper
with default/expected behavior for a virtual grid. -
Method Summary
Modifier and TypeMethodDescriptionio.github.palexdev.mfxcore.base.beans.range.IntegerRange
io.github.palexdev.mfxcore.base.beans.Size
void
dispose()
Disposes bindings/listeners that are not required anymore.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.Size>
Keeps the results ofcomputeEstimatedSize()
.int
int
firstRow()
boolean
InvalidatesVirtualGrid.positionProperty()
in case changes occur in the viewport and the current position is no longer valid.int
int
lastRow()
void
Responsible for callingNode.resizeRelocate(double, double, double, double)
with the needed parameters, this is used to position and resize cells.int
double
int
maxRows()
double
io.github.palexdev.mfxcore.base.beans.range.IntegerRange
void
scrollBy
(double pixels, Orientation orientation) Scrolls the viewport by the given amount of pixels.void
scrollTo
(double pixel, Orientation orientation) Scrolls the viewport to the given pixel value.void
scrollToColumn
(int index) Scrolls the viewport to the given column index.void
scrollToRow
(int index) Scrolls the viewport to the given row index.This binding holds the horizontal position of the viewport.This binding holds the vertical position of the viewport.
-
Property Details
-
estimatedSize
ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.Size> estimatedSizePropertyKeeps the results ofcomputeEstimatedSize()
.- See Also:
-
-
Method Details
-
firstRow
int firstRow()- Returns:
- the first visible row index
-
firstColumn
int firstColumn()- Returns:
- the first visible column index
-
lastRow
int lastRow()- Returns:
- the last visible row index
-
lastColumn
int lastColumn()- Returns:
- the last visible column index
-
rowsRange
io.github.palexdev.mfxcore.base.beans.range.IntegerRange rowsRange()- Returns:
- the range of visible rows
-
columnsRange
io.github.palexdev.mfxcore.base.beans.range.IntegerRange columnsRange()- Returns:
- the range of visible columns
-
maxRows
int maxRows()- Returns:
- the number of rows the viewport can display at any time
-
maxColumns
int maxColumns()- Returns:
- the number of columns the viewport can display at any time
-
maxVScroll
double maxVScroll()- Returns:
- the maximum amount of pixels the viewport can scroll vertically
-
maxHScroll
double maxHScroll()- Returns:
- the maximum amount of pixels the viewport can scroll horizontally
-
computeEstimatedSize
io.github.palexdev.mfxcore.base.beans.Size computeEstimatedSize()- Returns:
- the total virtual size of the viewport
-
estimatedSizeProperty
ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.Size> estimatedSizeProperty()Keeps the results ofcomputeEstimatedSize()
.- Returns:
- the
estimatedSize
property
-
xPosBinding
DoubleBinding xPosBinding()This binding holds the horizontal position of the viewport. -
yPosBinding
DoubleBinding yPosBinding()This binding holds the vertical position of the viewport. -
invalidatedPos
boolean invalidatedPos()InvalidatesVirtualGrid.positionProperty()
in case changes occur in the viewport and the current position is no longer valid.- Returns:
- true or false if the old position was invalid or not
-
scrollToRow
void scrollToRow(int index) Scrolls the viewport to the given row index. -
scrollToColumn
void scrollToColumn(int index) Scrolls the viewport to the given column index. -
scrollBy
Scrolls the viewport by the given amount of pixels. The direction is determined by the "orientation" parameter. -
scrollTo
Scrolls the viewport to the given pixel value. The direction is determined by the "orientation" parameter. -
layout
Responsible for callingNode.resizeRelocate(double, double, double, double)
with the needed parameters, this is used to position and resize cells. -
dispose
void dispose()Disposes bindings/listeners that are not required anymore.
-