Class VFXContainerHelper.VFXContainerHelperBase<T,C extends javafx.scene.layout.Region & VFXContainer<T>>
- All Implemented Interfaces:
VFXContainerHelper<T,C>
- Direct Known Subclasses:
VFXGridHelper.DefaultHelper,VFXListHelper.AbstractHelper,VFXTableHelper.AbstractHelper
- Enclosing interface:
VFXContainerHelper<T,C extends javafx.scene.layout.Region & VFXContainer<T>>
VFXContainerHelper.
This is the recommended class onto which base concrete helpers.
Stores the virtualized container's instance, defines common properties and thus implementing some of the APIs
from VFXContainerHelper, and in addition defines some other APIs that should be hidden and known only to
its implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.palexdev.virtualizedfx.base.VFXContainerHelper
VFXContainerHelper.VFXContainerHelperBase<T,C extends javafx.scene.layout.Region & VFXContainer<T>> -
Property Summary
PropertiesTypePropertyDescriptionjavafx.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.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 Cprotected final javafx.beans.property.ReadOnlyDoubleWrapperprotected final javafx.beans.property.ReadOnlyDoubleWrapperprotected final io.github.palexdev.mfxcore.base.properties.PositionPropertyprotected final javafx.beans.property.ReadOnlyDoubleWrapperprotected final javafx.beans.property.ReadOnlyDoubleWrapperprotected javafx.beans.binding.DoubleBindingprotected javafx.beans.binding.DoubleBinding -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected javafx.beans.binding.DoubleBindingBuilds and returns the binding which computes themaxHScrollProperty()'s value.protected javafx.beans.binding.DoubleBindingBuilds and returns the binding which computes themaxVScrollProperty()'s value.protected abstract javafx.beans.binding.DoubleBindingImplementations should use this build and return theDoubleBindingwith the appropriate dependencies responsible for thevirtualMaxXProperty()'s value.protected abstract javafx.beans.binding.DoubleBindingImplementations should use this build and return theDoubleBindingwith the appropriate dependencies responsible for thevirtualMaxXProperty()'s value.voiddispose()If the helper uses listeners/bindings that may lead to memory leaks, this is the right place to remove them.voidImplementations should define the logic to manually invalidate the virtual sizes (VFXContainerHelper.virtualMaxXProperty()andVFXContainerHelper.virtualMaxYProperty()) of the container when needed.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.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.palexdev.virtualizedfx.base.VFXContainerHelper
getMaxHScroll, getMaxVScroll, getViewportPosition, getVirtualMaxX, getVirtualMaxY, indexToItem, invalidatePos
-
Property Details
-
virtualMaxX
public javafx.beans.property.ReadOnlyDoubleProperty virtualMaxXProperty- Specified by:
virtualMaxXPropertyin interfaceVFXContainerHelper<T,C extends javafx.scene.layout.Region & VFXContainer<T>> - Returns:
- the
virtualMaxXproperty - See Also:
-
virtualMaxY
public javafx.beans.property.ReadOnlyDoubleProperty virtualMaxYProperty- Specified by:
virtualMaxYPropertyin interfaceVFXContainerHelper<T,C extends javafx.scene.layout.Region & VFXContainer<T>> - Returns:
- the
virtualMaxYproperty - See Also:
-
maxVScroll
public javafx.beans.property.ReadOnlyDoubleProperty maxVScrollProperty- Specified by:
maxVScrollPropertyin interfaceVFXContainerHelper<T,C extends javafx.scene.layout.Region & VFXContainer<T>> - Returns:
- the
maxVScrollproperty - See Also:
-
maxHScroll
public javafx.beans.property.ReadOnlyDoubleProperty maxHScrollProperty- Specified by:
maxHScrollPropertyin interfaceVFXContainerHelper<T,C extends javafx.scene.layout.Region & VFXContainer<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,C extends javafx.scene.layout.Region & VFXContainer<T>> - Returns:
- the
viewportPositionproperty - See Also:
-
-
Field Details
-
container
-
virtualMaxX
protected final javafx.beans.property.ReadOnlyDoubleWrapper virtualMaxX -
vmxBinding
protected javafx.beans.binding.DoubleBinding vmxBinding -
virtualMaxY
protected final javafx.beans.property.ReadOnlyDoubleWrapper virtualMaxY -
vmyBinding
protected javafx.beans.binding.DoubleBinding vmyBinding -
maxVScroll
protected final javafx.beans.property.ReadOnlyDoubleWrapper maxVScroll -
maxHScroll
protected final javafx.beans.property.ReadOnlyDoubleWrapper maxHScroll -
viewportPosition
protected final io.github.palexdev.mfxcore.base.properties.PositionProperty viewportPosition
-
-
Constructor Details
-
VFXContainerHelperBase
-
-
Method Details
-
createBindings
protected void createBindings() -
createVirtualMaxXBinding
protected abstract javafx.beans.binding.DoubleBinding createVirtualMaxXBinding()Implementations should use this build and return theDoubleBindingwith the appropriate dependencies responsible for thevirtualMaxXProperty()'s value. -
createVirtualMaxYBinding
protected abstract javafx.beans.binding.DoubleBinding createVirtualMaxYBinding()Implementations should use this build and return theDoubleBindingwith the appropriate dependencies responsible for thevirtualMaxXProperty()'s value. -
createMaxVScrollBinding
protected javafx.beans.binding.DoubleBinding createMaxVScrollBinding()Builds and returns the binding which computes themaxVScrollProperty()'s value.For most containers the value is given by:
virtualMaxY - containerHeight.The formula may vary for some containers!
-
createMaxHScrollBinding
protected javafx.beans.binding.DoubleBinding createMaxHScrollBinding()Builds and returns the binding which computes themaxHScrollProperty()'s value.For most containers the value is given by:
virtualMaxX - containerWidth.The formula may vary for some containers!
-
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,C extends javafx.scene.layout.Region & VFXContainer<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,C extends javafx.scene.layout.Region & VFXContainer<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,C extends javafx.scene.layout.Region & VFXContainer<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,C extends javafx.scene.layout.Region & VFXContainer<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,C extends javafx.scene.layout.Region & VFXContainer<T>> - Returns:
- the
viewportPositionproperty - See Also:
-
getContainer
- Specified by:
getContainerin interfaceVFXContainerHelper<T,C extends javafx.scene.layout.Region & VFXContainer<T>> - Returns:
- the
VFXContainerimplementation instance associated to this helper
-
invalidateVirtualSizes
public void invalidateVirtualSizes()Description copied from interface:VFXContainerHelperImplementations should define the logic to manually invalidate the virtual sizes (VFXContainerHelper.virtualMaxXProperty()andVFXContainerHelper.virtualMaxYProperty()) of the container when needed.There are exceptional cases where we can't rely on automatic invalidation because it could lead to incorrect states, the easiest and most stable solution for those is manual invalidation.
- Specified by:
invalidateVirtualSizesin interfaceVFXContainerHelper<T,C extends javafx.scene.layout.Region & VFXContainer<T>>
-
dispose
public void dispose()Description copied from interface:VFXContainerHelperIf the helper uses listeners/bindings that may lead to memory leaks, this is the right place to remove them.- Specified by:
disposein interfaceVFXContainerHelper<T,C extends javafx.scene.layout.Region & VFXContainer<T>>
-