Class VFXDefaultTableColumn<T, C extends VFXTableCell<T>>

All Implemented Interfaces:
io.github.palexdev.mfxcore.behavior.WithBehavior<VFXTableColumnBehavior<T,C>>, io.github.palexdev.mfxcore.controls.MFXSkinnable<io.github.palexdev.mfxcore.controls.SkinBase<?,?>>, io.github.palexdev.mfxcore.controls.MFXStyleable, WithCellFactory<T,C>, Styleable, EventTarget, Skinnable

public class VFXDefaultTableColumn<T, C extends VFXTableCell<T>> extends VFXTableColumn<T,C>
Concrete and simple implementation of VFXTableColumn. Has its own skin: VFXDefaultTableColumnSkin.

These are the features this default implementation offers:

- the iconAlignmentProperty() allows you to specify the column's icon position

- the enableOverlayProperty() makes the column display an extra node which can be used to indicate selection or hovering. By default, the node is not visible; you'll have to define its style in CSS. This behavior is defined in the default skin.

- the overlayOnHeaderProperty() makes the aforementioned node cover the column's header too

  • Property Details

    • iconAlignment

      public StyleableObjectProperty<HPos> iconAlignmentProperty
      Specifies the side on which the icon will be placed.

      By setting the alignment to HPos.CENTER the default skin, VFXDefaultTableColumnSkin, will hide the text and show only the icon at the center.

      This is settable via CSS with the "-vfx-icon-alignment" property.
      See Also:
    • enableOverlay

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty enableOverlayProperty
      Specifies whether the default skin should enable the overlay.

      VFXTable is organized by rows. This means that by default, there is no way in the UI to display when a column is selected or hovered by the mouse. The default skin allows to do this by adding an extra node that extends from the column all the way down to the table's bottom. This allows doing cool tricks with CSS.

      One thing to keep in mind, though, is that if you define a background color for the overlay, make sure that it is opaque otherwise it will end up covering the cells.

      This is also settable via CSS with the "-vfx-enable-overlay" property.
      See Also:
    • overlayOnHeader

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty overlayOnHeaderProperty
      Specifies whether the overlay should also cover the header of the column, the part where the text and the icon reside.

      This is also settable via CSS with the "-vfx-overlay-on-header" property.
      See Also:
  • Field Details

  • Constructor Details

    • VFXDefaultTableColumn

      public VFXDefaultTableColumn()
    • VFXDefaultTableColumn

      public VFXDefaultTableColumn(String text)
    • VFXDefaultTableColumn

      public VFXDefaultTableColumn(String text, Node graphic)
  • Method Details

    • defaultSkinProvider

      public Supplier<io.github.palexdev.mfxcore.controls.SkinBase<?,?>> defaultSkinProvider()
    • getIconAlignment

      public HPos getIconAlignment()
      Gets the value of the iconAlignment property.
      Property description:
      Specifies the side on which the icon will be placed.

      By setting the alignment to HPos.CENTER the default skin, VFXDefaultTableColumnSkin, will hide the text and show only the icon at the center.

      This is settable via CSS with the "-vfx-icon-alignment" property.
      Returns:
      the value of the iconAlignment property
      See Also:
    • iconAlignmentProperty

      public StyleableObjectProperty<HPos> iconAlignmentProperty()
      Specifies the side on which the icon will be placed.

      By setting the alignment to HPos.CENTER the default skin, VFXDefaultTableColumnSkin, will hide the text and show only the icon at the center.

      This is settable via CSS with the "-vfx-icon-alignment" property.
      Returns:
      the iconAlignment property
      See Also:
    • setIconAlignment

      public void setIconAlignment(HPos iconAlignment)
      Sets the value of the iconAlignment property.
      Property description:
      Specifies the side on which the icon will be placed.

      By setting the alignment to HPos.CENTER the default skin, VFXDefaultTableColumnSkin, will hide the text and show only the icon at the center.

      This is settable via CSS with the "-vfx-icon-alignment" property.
      Parameters:
      iconAlignment - the value for the iconAlignment property
      See Also:
    • isEnableOverlay

      public boolean isEnableOverlay()
      Gets the value of the enableOverlay property.
      Property description:
      Specifies whether the default skin should enable the overlay.

      VFXTable is organized by rows. This means that by default, there is no way in the UI to display when a column is selected or hovered by the mouse. The default skin allows to do this by adding an extra node that extends from the column all the way down to the table's bottom. This allows doing cool tricks with CSS.

      One thing to keep in mind, though, is that if you define a background color for the overlay, make sure that it is opaque otherwise it will end up covering the cells.

      This is also settable via CSS with the "-vfx-enable-overlay" property.
      Returns:
      the value of the enableOverlay property
      See Also:
    • enableOverlayProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty enableOverlayProperty()
      Specifies whether the default skin should enable the overlay.

      VFXTable is organized by rows. This means that by default, there is no way in the UI to display when a column is selected or hovered by the mouse. The default skin allows to do this by adding an extra node that extends from the column all the way down to the table's bottom. This allows doing cool tricks with CSS.

      One thing to keep in mind, though, is that if you define a background color for the overlay, make sure that it is opaque otherwise it will end up covering the cells.

      This is also settable via CSS with the "-vfx-enable-overlay" property.
      Returns:
      the enableOverlay property
      See Also:
    • setEnableOverlay

      public void setEnableOverlay(boolean enableOverlay)
      Sets the value of the enableOverlay property.
      Property description:
      Specifies whether the default skin should enable the overlay.

      VFXTable is organized by rows. This means that by default, there is no way in the UI to display when a column is selected or hovered by the mouse. The default skin allows to do this by adding an extra node that extends from the column all the way down to the table's bottom. This allows doing cool tricks with CSS.

      One thing to keep in mind, though, is that if you define a background color for the overlay, make sure that it is opaque otherwise it will end up covering the cells.

      This is also settable via CSS with the "-vfx-enable-overlay" property.
      Parameters:
      enableOverlay - the value for the enableOverlay property
      See Also:
    • isOverlayOnHeader

      public boolean isOverlayOnHeader()
      Gets the value of the overlayOnHeader property.
      Property description:
      Specifies whether the overlay should also cover the header of the column, the part where the text and the icon reside.

      This is also settable via CSS with the "-vfx-overlay-on-header" property.
      Returns:
      the value of the overlayOnHeader property
      See Also:
    • overlayOnHeaderProperty

      public io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty overlayOnHeaderProperty()
      Specifies whether the overlay should also cover the header of the column, the part where the text and the icon reside.

      This is also settable via CSS with the "-vfx-overlay-on-header" property.
      Returns:
      the overlayOnHeader property
      See Also:
    • setOverlayOnHeader

      public void setOverlayOnHeader(boolean overlayOnHeader)
      Sets the value of the overlayOnHeader property.
      Property description:
      Specifies whether the overlay should also cover the header of the column, the part where the text and the icon reside.

      This is also settable via CSS with the "-vfx-overlay-on-header" property.
      Parameters:
      overlayOnHeader - the value for the overlayOnHeader property
      See Also:
    • getControlCssMetaData

      public List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData()
      Overrides:
      getControlCssMetaData in class VFXTableColumn<T, C extends VFXTableCell<T>>
    • getClassCssMetaData

      public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData()