Class VFXGridSkin<T, C extends VFXCell<T>>

java.lang.Object
javafx.scene.control.SkinBase<VFXGrid<T,C>>
io.github.palexdev.mfxcore.controls.MFXSkinBase<VFXGrid<T,C>>
io.github.palexdev.virtualizedfx.grid.VFXGridSkin<T,C>
All Implemented Interfaces:
Skin<VFXGrid<T,C>>

public class VFXGridSkin<T, C extends VFXCell<T>> extends io.github.palexdev.mfxcore.controls.MFXSkinBase<VFXGrid<T,C>>
Default skin implementation for VFXGrid, extends MFXSkinBase and expects behaviors of type VFXGridManager.

The layout is quite simple: there is just one node, called the 'viewport', that is the Pane resposnible for containing and laying out the cells. Needless to say, the layout strategy is custom, and it's defined in the layout() method.

Compared to other virtualized components' skin, this implements a rather unique feature. It allows you, by setting the VFXGrid.alignmentProperty(), to change the x and y coordinates of the viewport node. This is especially useful if you want the content to be centered and in combination with VFXGrid.autoArrange(int) (think about a gallery, for example).

As all skins typically do, this is also responsible for catching any change in the component's properties. The computation that leads to a new state is delegated to the controller/behavior, which is the VFXGridManager. Read this addListeners() to check which changes are handled.

Last but not least, by design, this skin makes the component always be at least 100px tall and wide. You can change this by overriding the DEFAULT_SIZE variable.