Class VFXTableHelper.AbstractHelper<T>
java.lang.Object
io.github.palexdev.virtualizedfx.base.VFXContainerHelper.VFXContainerHelperBase<T, VFXTable<T>>
io.github.palexdev.virtualizedfx.table.VFXTableHelper.AbstractHelper<T>
- Type Parameters:
T-
- All Implemented Interfaces:
VFXContainerHelper<T, VFXTable<T>>, VFXTableHelper<T>
- Direct Known Subclasses:
VFXTableHelper.FixedTableHelper, VFXTableHelper.VariableTableHelper
- Enclosing interface:
VFXTableHelper<T>
public abstract static class VFXTableHelper.AbstractHelper<T>
extends VFXContainerHelper.VFXContainerHelperBase<T, VFXTable<T>>
implements VFXTableHelper<T>
Abstract implementation of
VFXTableHelper, contains common members for the two concrete implementations
VFXTableHelper.FixedTableHelper and VFXTableHelper.VariableTableHelper, such as:
- the range of columns to display as a IntegerRangeProperty
- the range of rows to display as a IntegerRangeProperty
-
Nested Class Summary
Nested classes/interfaces inherited from interface VFXContainerHelper
VFXContainerHelper.VFXContainerHelperBase<T,C> Nested classes/interfaces inherited from interface VFXTableHelper
VFXTableHelper.AbstractHelper<T>, VFXTableHelper.FixedTableHelper<T>, VFXTableHelper.VariableTableHelper<T> -
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.range.NumberRange<Integer>> Specifies the range of columns that should be present in the viewport.javafx.beans.property.ReadOnlyDoublePropertySpecifies the maximum possible horizontal position.javafx.beans.property.ReadOnlyDoublePropertySpecifies the maximum possible vertical position.javafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.range.NumberRange<Integer>> Specifies the range of rows that should be present in the viewport.javafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.Position> Cells are actually contained in a separate pane called 'viewport'.javafx.beans.property.ReadOnlyDoublePropertySpecifies the total number of pixels on the x-axis.javafx.beans.property.ReadOnlyDoublePropertySpecifies the total number of pixels on the y-axis. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final io.github.palexdev.mfxcore.base.properties.range.IntegerRangePropertyprotected final io.github.palexdev.mfxcore.base.properties.range.IntegerRangePropertyFields inherited from class VFXContainerHelper.VFXContainerHelperBase
container, maxHScroll, maxVScroll, viewportPosition, virtualMaxX, virtualMaxY, vmxBinding, vmyBinding -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.range.NumberRange<Integer>> Specifies the range of columns that should be present in the viewport.protected javafx.beans.binding.DoubleBindingBuilds and returns the binding which computes theVFXContainerHelper.VFXContainerHelperBase.maxVScrollProperty()'s value.intfirstRow()intintlastRow()javafx.beans.property.ReadOnlyDoublePropertySpecifies the maximum possible horizontal position.javafx.beans.property.ReadOnlyDoublePropertySpecifies the maximum possible vertical position.javafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.range.NumberRange<Integer>> Specifies the range of rows that should be present in the viewport.intjavafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.Position> Cells are actually contained in a separate pane called 'viewport'.javafx.beans.property.ReadOnlyDoublePropertySpecifies the total number of pixels on the x-axis.javafx.beans.property.ReadOnlyDoublePropertySpecifies the total number of pixels on the y-axis.intMethods inherited from class VFXContainerHelper.VFXContainerHelperBase
createBindings, createMaxHScrollBinding, createVirtualMaxXBinding, createVirtualMaxYBinding, dispose, getContainer, invalidateVirtualSizesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface VFXContainerHelper
dispose, getContainer, getMaxHScroll, getMaxVScroll, getViewportPosition, getVirtualMaxX, getVirtualMaxY, indexToItem, invalidatePos, invalidateVirtualSizesMethods inherited from interface VFXTableHelper
autosizeColumn, autosizeColumns, columnsRange, firstColumn, getColumnPos, getColumnWidth, getViewportHeight, indexToRow, isInViewport, isLastColumn, itemToRow, layoutCell, layoutColumn, layoutRow, rowsRange, scrollBy, scrollToIndex, scrollToPixel, totalCells, totalColumns, visibleCells, visibleColumns
-
Property Details
-
columnsRange
public javafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.range.NumberRange<Integer>> columnsRangeProperty- Specified by:
columnsRangePropertyin interfaceVFXTableHelper<T>- Returns:
- the
columnsRangeproperty - See Also:
-
rowsRange
public javafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.range.NumberRange<Integer>> rowsRangeProperty- Specified by:
rowsRangePropertyin interfaceVFXTableHelper<T>- Returns:
- the
rowsRangeproperty - See Also:
-
virtualMaxX
public javafx.beans.property.ReadOnlyDoubleProperty virtualMaxXProperty- Specified by:
virtualMaxXPropertyin interfaceVFXContainerHelper<T, VFXTable<T>>- Overrides:
virtualMaxXPropertyin classVFXContainerHelper.VFXContainerHelperBase<T, VFXTable<T>>- Returns:
- the
virtualMaxXproperty - See Also:
-
virtualMaxY
public javafx.beans.property.ReadOnlyDoubleProperty virtualMaxYProperty- Specified by:
virtualMaxYPropertyin interfaceVFXContainerHelper<T, VFXTable<T>>- Overrides:
virtualMaxYPropertyin classVFXContainerHelper.VFXContainerHelperBase<T, VFXTable<T>>- Returns:
- the
virtualMaxYproperty - See Also:
-
maxVScroll
public javafx.beans.property.ReadOnlyDoubleProperty maxVScrollProperty- Specified by:
maxVScrollPropertyin interfaceVFXContainerHelper<T, VFXTable<T>>- Overrides:
maxVScrollPropertyin classVFXContainerHelper.VFXContainerHelperBase<T, VFXTable<T>>- Returns:
- the
maxVScrollproperty - See Also:
-
maxHScroll
public javafx.beans.property.ReadOnlyDoubleProperty maxHScrollProperty- Specified by:
maxHScrollPropertyin interfaceVFXContainerHelper<T, VFXTable<T>>- Overrides:
maxHScrollPropertyin classVFXContainerHelper.VFXContainerHelperBase<T, VFXTable<T>>- Returns:
- the
maxHScrollproperty - See Also:
-
viewportPosition
public javafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.Position> viewportPositionProperty- Specified by:
viewportPositionPropertyin interfaceVFXContainerHelper<T, VFXTable<T>>- Overrides:
viewportPositionPropertyin classVFXContainerHelper.VFXContainerHelperBase<T, VFXTable<T>>- Returns:
- the
viewportPositionproperty - See Also:
-
-
Field Details
-
columnsRange
protected final io.github.palexdev.mfxcore.base.properties.range.IntegerRangeProperty columnsRange -
rowsRange
protected final io.github.palexdev.mfxcore.base.properties.range.IntegerRangeProperty rowsRange
-
-
Constructor Details
-
AbstractHelper
-
-
Method Details
-
createMaxVScrollBinding
protected javafx.beans.binding.DoubleBinding createMaxVScrollBinding()Description copied from class:VFXContainerHelper.VFXContainerHelperBaseBuilds and returns the binding which computes theVFXContainerHelper.VFXContainerHelperBase.maxVScrollProperty()'s value.For most containers the value is given by:
virtualMaxY - containerHeight.The formula may vary for some containers!
- Overrides:
createMaxVScrollBindingin classVFXContainerHelper.VFXContainerHelperBase<T, VFXTable<T>>
-
lastColumn
public int lastColumn()Given bycolumnsRange().getMax()- Specified by:
lastColumnin interfaceVFXTableHelper<T>- Returns:
- the index of the last visible column
-
columnsRangeProperty
public javafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.range.NumberRange<Integer>> columnsRangeProperty()Description copied from interface:VFXTableHelperSpecifies the range of columns that should be present in the viewport. This also takes into account buffer columns, seeVFXTableHelper.visibleColumns()andVFXTableHelper.totalColumns().- Specified by:
columnsRangePropertyin interfaceVFXTableHelper<T>- Returns:
- the
columnsRangeproperty
-
firstRow
public int firstRow()Given byMath.floor(vPos / rowsHeight), clamped between 0 andVFXContainer.size()- 1.- Specified by:
firstRowin interfaceVFXTableHelper<T>- Returns:
- the index of the first visible row
-
lastRow
public int lastRow()Given byrowsRange().getMax()- Specified by:
lastRowin interfaceVFXTableHelper<T>- Returns:
- the index of the last visible row
-
visibleRows
public int visibleRows()Given byMath.ceil(viewportHeight / rowsHeight). 0 if the rows height is also 0.- Specified by:
visibleRowsin interfaceVFXTableHelper<T>- Returns:
- the number of rows visible in the viewport. Not necessarily the same as
VFXTableHelper.totalRows()
-
totalRows
public int totalRows()Given byvisibleRows + rowsBuffer * 2, can't exceedVFXContainer.size()and it's 0 if the number of visible rows is also 0.- Specified by:
totalRowsin interfaceVFXTableHelper<T>- Returns:
- the total number of rows in the viewport which doesn't include only the number of visible rows but also the number of buffer rows
-
rowsRangeProperty
public javafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.range.NumberRange<Integer>> rowsRangeProperty()Description copied from interface:VFXTableHelperSpecifies the range of rows that should be present in the viewport. This also takes into account buffer rows, seeVFXTableHelper.visibleRows()andVFXTableHelper.totalRows().- Specified by:
rowsRangePropertyin interfaceVFXTableHelper<T>- Returns:
- the
rowsRangeproperty
-
virtualMaxXProperty
public javafx.beans.property.ReadOnlyDoubleProperty virtualMaxXProperty()Description copied from interface:VFXContainerHelperSpecifies the total number of pixels on the x-axis.- Specified by:
virtualMaxXPropertyin interfaceVFXContainerHelper<T, VFXTable<T>>- Overrides:
virtualMaxXPropertyin classVFXContainerHelper.VFXContainerHelperBase<T, VFXTable<T>>- Returns:
- the
virtualMaxXproperty - See Also:
-
virtualMaxYProperty
public javafx.beans.property.ReadOnlyDoubleProperty virtualMaxYProperty()Description copied from interface:VFXContainerHelperSpecifies the total number of pixels on the y-axis.- Specified by:
virtualMaxYPropertyin interfaceVFXContainerHelper<T, VFXTable<T>>- Overrides:
virtualMaxYPropertyin classVFXContainerHelper.VFXContainerHelperBase<T, VFXTable<T>>- Returns:
- the
virtualMaxYproperty - See Also:
-
maxVScrollProperty
public javafx.beans.property.ReadOnlyDoubleProperty maxVScrollProperty()Description copied from interface:VFXContainerHelperSpecifies the maximum possible vertical position.- Specified by:
maxVScrollPropertyin interfaceVFXContainerHelper<T, VFXTable<T>>- Overrides:
maxVScrollPropertyin classVFXContainerHelper.VFXContainerHelperBase<T, VFXTable<T>>- Returns:
- the
maxVScrollproperty - See Also:
-
maxHScrollProperty
public javafx.beans.property.ReadOnlyDoubleProperty maxHScrollProperty()Description copied from interface:VFXContainerHelperSpecifies the maximum possible horizontal position.- Specified by:
maxHScrollPropertyin interfaceVFXContainerHelper<T, VFXTable<T>>- Overrides:
maxHScrollPropertyin classVFXContainerHelper.VFXContainerHelperBase<T, VFXTable<T>>- Returns:
- the
maxHScrollproperty - See Also:
-
viewportPositionProperty
public javafx.beans.property.ReadOnlyObjectProperty<io.github.palexdev.mfxcore.base.beans.Position> viewportPositionProperty()Description copied from interface:VFXContainerHelperCells are actually contained in a separate pane called 'viewport'. The scroll is applied on this pane.This property specifies the translation of the viewport, the value depends on the implementation.
- Specified by:
viewportPositionPropertyin interfaceVFXContainerHelper<T, VFXTable<T>>- Overrides:
viewportPositionPropertyin classVFXContainerHelper.VFXContainerHelperBase<T, VFXTable<T>>- Returns:
- the
viewportPositionproperty - See Also:
-