java.lang.Object
javafx.scene.control.SkinBase<MFXFilterPane<T>>
io.github.palexdev.materialfx.skins.MFXFilterPaneSkin<T>
- All Implemented Interfaces:
Skin<MFXFilterPane<T>>
This is the skin associated with every
MFXFilterPane.
The control is made of four parts:
- The header which contains a label, and two icons to confirm the filter or reset the filter pane
- The filter builder which contains the necessary controls to produce active filters
- A label which acts as a separator
- A FlowPane to show the currently built active filters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FlowPaneBuilds tha active filters flow pane.protected NodebuildAndOrIcon(FilterBean<T, ?> filter) Builds an icon that represents how twoFilterBeans should be chained.protected RegionbuildFilter(FilterBean<T, ?> filter) Builds a node that represents the givenFilterBean.protected RegionBuilds the filter builder region.protected RegionBuilds the header.protected doublecomputeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) protected doublecomputeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) protected doublecomputeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) getQuery()protected booleanqueryValidation(AbstractFilter<T, ?> filter) Validates the given query.protected voidreset(MouseEvent event) Resets the filter pane.voidprotected voidFor each filter in theMFXFilterPane.getActiveFilters()list builds a node that represents the filter.Methods inherited from class javafx.scene.control.SkinBase
computeBaselineOffset, computeMinHeight, 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
-
Constructor Details
-
MFXFilterPaneSkin
-
-
Method Details
-
updateFilters
protected void updateFilters()For each filter in theMFXFilterPane.getActiveFilters()list builds a node that represents the filter. Filters are spaced by another node which represents how to filters are chained, by clicking on this icon the chain mode can be changed., -
buildFilter
Builds a node that represents the givenFilterBean.It is composed by:
- A label that shows the object's data type/name
- A label that shows which function is used to compare the input with the object's field value
- A label that shows which is the input
- An icon to remove the filter
-
buildAndOrIcon
Builds an icon that represents how twoFilterBeans should be chained. Clicking on the icon switches the chain mode. -
buildHeader
Builds the header. -
buildFilterBuilder
Builds the filter builder region. -
buildActiveFilters
Builds tha active filters flow pane. -
queryValidation
Validates the given query. This is needed for Numbers since the input is a String and there's no guarantee that the typed text represents a number. Returns true if the input is valid otherwise shows anMFXGenericDialogand returns false. -
reset
Resets the filter pane. -
getQuery
-
setQuery
-
computeMinWidth
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) - Overrides:
computeMinWidthin classSkinBase<MFXFilterPane<T>>
-
computeMaxWidth
protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) - Overrides:
computeMaxWidthin classSkinBase<MFXFilterPane<T>>
-
computeMaxHeight
protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) - Overrides:
computeMaxHeightin classSkinBase<MFXFilterPane<T>>
-