java.lang.Object
javafx.scene.control.SkinBase<MFXTextField>
io.github.palexdev.materialfx.skins.MFXTextFieldSkin
io.github.palexdev.materialfx.skins.MFXComboBoxSkin<T>
io.github.palexdev.materialfx.skins.MFXFilterComboBoxSkin<T>
- All Implemented Interfaces:
Skin<MFXTextField>
Skin associated with every
MFXFilterComboBox by default.
Extends MFXComboBoxSkin.
This skin mainly overrides the createPopupContent() and implements the
method responsible for filtering the popup's listview.
-
Field Summary
Fields inherited from class io.github.palexdev.materialfx.skins.MFXComboBoxSkin
popup, virtualFlow -
Constructor Summary
ConstructorsConstructorDescriptionMFXFilterComboBoxSkin(MFXFilterComboBox<T> comboBox, BoundTextField boundField) -
Method Summary
Modifier and TypeMethodDescriptionprotected NodeResponsible for creating the popup's content.protected voidResponsible for filtering the popup's listview.Convenience method to castSkinBase.getSkinnable()toMFXComboBox.Methods inherited from class io.github.palexdev.materialfx.skins.MFXComboBoxSkin
animateIcon, createPopup, dispose, setBehavior, updateValueMethods inherited from class io.github.palexdev.materialfx.skins.MFXTextFieldSkin
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefWidth, layoutChildren, updateTextColorMethods inherited from class javafx.scene.control.SkinBase
computeBaselineOffset, computePrefHeight, consumeMouseEvents, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, 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
-
MFXFilterComboBoxSkin
-
-
Method Details
-
filter
Responsible for filtering the popup's listview. What it really does is to use theMFXFilterComboBox.filterFunctionProperty()to produce aPredicate, which is then set on theMFXFilterComboBox.getFilterList(). This means that since it is not bound you can even set your own predicate on that list, but everytime the text is changed in the search field it will be replaced. -
createPopupContent
Responsible for creating the popup's content. The content is slightly different from theMFXComboBoxSkinone.In the previous combo box skin, a text field was positioned on top of the combo's field to input the search text.
This time I decided to do it another way. The popup contains both the search field and the listview, contained in a VBox, this way the control is easier to maintain, and also more appealing.
- Overrides:
createPopupContentin classMFXComboBoxSkin<T>
-
getComboBox
Convenience method to castSkinBase.getSkinnable()toMFXComboBox. Overridden to cast toMFXFilterComboBox.- Overrides:
getComboBoxin classMFXComboBoxSkin<T>
-