Class VFXLabeledCellSkin<T>

java.lang.Object
javafx.scene.control.SkinBase<VFXCellBase<T>>
io.github.palexdev.mfxcore.controls.SkinBase<VFXCellBase<T>, CellBaseBehavior<T>>
io.github.palexdev.virtualizedfx.cells.VFXLabeledCellSkin<T>
All Implemented Interfaces:
Skin<VFXCellBase<T>>
Direct Known Subclasses:
VFXObservingTableCell.VFXObservingTableCellSkin

public class VFXLabeledCellSkin<T> extends io.github.palexdev.mfxcore.controls.SkinBase<VFXCellBase<T>, CellBaseBehavior<T>>
Simple skin implementation to be used with any descendant of VFXCellBase.

This will display the data specified by the VFXCellBase.itemProperty() as a String in a Label. It's the only children of this skin, takes all the available space and has the following properties bound to the cell:

- the alignment property bound to VFXCellBase.alignmentProperty()

- the graphic property bound to VFXCellBase.graphicProperty().

The label's text will be updated on two occasions:

1) when the VFXCellBase.itemProperty() is invalidated

2) when an event of type VFXContainerEvent.UPDATE reaches the cell

You can modify addListeners() to change such behavior. For example, rather than using an InvalidationListener you could use a ChangeListener instead, add your own logic, etc. (useful when you want to optimize update performance).

(It's recommended to use SkinBase.listeners(When[]), SkinBase.events(WhenEvent[]) and in general When constructs. Simply because they make your life easier, also disposal would be automatic this way).

Last but not least, the label's text is updated by the update() method.

  • Field Details

    • label

      protected final io.github.palexdev.mfxcore.controls.Label label
  • Constructor Details

    • VFXLabeledCellSkin

      public VFXLabeledCellSkin(VFXCellBase<T> cell)
  • Method Details