java.lang.Object
javafx.scene.control.SkinBase<MFXTableView<T>>
io.github.palexdev.materialfx.skins.MFXTableViewSkin<T>
- All Implemented Interfaces:
Skin<MFXTableView<T>>
- Direct Known Subclasses:
MFXPaginatedTableViewSkin
This is the implementation of the
Skin associated with every MFXTableView.
The top container is a VBox which contains the columns box, the virtual flow and the footer.
The MFXTableView.getTableColumns() are contained in a HBox
At the bottom of the table view there's a footer which by default has two icons to filter/clear filter. Can be changed by overriding
buildFooter() or hidden(removed) by setting MFXTableView.footerVisibleProperty() to false.
MFXFilterPane shown in a modal dialog.
Note: for sorting and the filtering a TransformableList is used, the original items list MFXTableView.getItems() remains untouched.
N.B: Although the layout and everything else is well organized and documented, especially with thew new implementation and considering the JavaFX's counterpart,
note that this control is quite complicated and "delicate" since there is a lot going on (bindings, listeners, various computation, layout adjustments, factories, nested cells, etc...).
So when extending this class or creating your table view based on this one, be careful and make sure you have fully understood how all of this works.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMFXTableViewSkin(MFXTableView<T> tableView, io.github.palexdev.virtualizedfx.flow.simple.SimpleVirtualFlow<T, MFXTableRow<T>> rowsFlow) -
Method Summary
Modifier and TypeMethodDescriptionprotected StackPaneResponsible for building the table's footer.protected doublecomputeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) protected doublecomputeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) Methods inherited from class javafx.scene.control.SkinBase
computeBaselineOffset, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, consumeMouseEvents, dispose, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutChildren, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, registerChangeListener, registerInvalidationListener, registerListChangeListener, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, unregisterChangeListeners, unregisterInvalidationListeners, unregisterListChangeListeners
-
Field Details
-
container
-
columnsContainer
-
rowsFlow
protected final io.github.palexdev.virtualizedfx.flow.simple.SimpleVirtualFlow<T,MFXTableRow<T>> rowsFlow
-
-
Constructor Details
-
MFXTableViewSkin
public MFXTableViewSkin(MFXTableView<T> tableView, io.github.palexdev.virtualizedfx.flow.simple.SimpleVirtualFlow<T, MFXTableRow<T>> rowsFlow)
-
-
Method Details
-
computeMaxWidth
protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) - Overrides:
computeMaxWidthin classSkinBase<MFXTableView<T>>
-
computeMaxHeight
protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) - Overrides:
computeMaxHeightin classSkinBase<MFXTableView<T>>