Module MaterialFX

Class MFXTableColumn<T>

All Implemented Interfaces:
Styleable, EventTarget, Skinnable

public class MFXTableColumn<T> extends Labeled
This is the implementation of the column cells used in the MFXTableView control.

To make it easily customizable, extends Labeled and provides a new default skin, MFXTableColumnSkin.

Defines the following new PseudoClasses for usage in CSS:

- ":dragged", to customize the column when it is dragged

- ":resizable", to customize the column depending on columnResizableProperty()

Each column cell has the following responsibilities: -

Has a row cell factory because each column knows how to build the corresponding row cell in each table row -

Has a sort state and a comparator because each column knows how to sort the rows based on the given comparator, also retains its sort state thus allowing switching between ASCENDING, DESCENDING, UNSORTED

Some side notes...

Even if not specified by the user, the rowCellFactoryProperty() will always bind the new cells' width to the width of the column, this is needed to make the columns autosize and the DragResizer work properly.

The columnResizableProperty() controls the DragResizer, installing it if true and uninstalling it if false. All columns by default have a minimum width set to 100, can be changed of course as you like.

Unlike the old implementation, where all the "system" was managed by the table view skin, the new implementation vastly improves the separation of roles. The cells' width (mentioned before), the sorting and the icon animation are all handled by the columns now. To communicate with the table skin, the table column now uses Events, see MFXTableColumn.MFXTableColumnEvent.

See Also: