Module MaterialFX

Class MFXFilterPaneSkin<T>

java.lang.Object
javafx.scene.control.SkinBase<MFXFilterPane<T>>
io.github.palexdev.materialfx.skins.MFXFilterPaneSkin<T>
All Implemented Interfaces:
Skin<MFXFilterPane<T>>

public class MFXFilterPaneSkin<T> extends SkinBase<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 Details

    • MFXFilterPaneSkin

      public MFXFilterPaneSkin(MFXFilterPane<T> filterPane)
  • Method Details

    • updateFilters

      protected void updateFilters()
      For each filter in the MFXFilterPane.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.,
      See Also:
    • buildFilter

      protected Region buildFilter(FilterBean<T,?> filter)
      Builds a node that represents the given FilterBean.

      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

      protected Node buildAndOrIcon(FilterBean<T,?> filter)
      Builds an icon that represents how two FilterBeans should be chained. Clicking on the icon switches the chain mode.
    • buildHeader

      protected Region buildHeader()
      Builds the header.
    • buildFilterBuilder

      protected Region buildFilterBuilder()
      Builds the filter builder region.
    • buildActiveFilters

      protected FlowPane buildActiveFilters()
      Builds tha active filters flow pane.
    • queryValidation

      protected boolean queryValidation(AbstractFilter<T,?> filter)
      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 an MFXGenericDialog and returns false.
    • reset

      protected void reset(MouseEvent event)
      Resets the filter pane.
    • getQuery

      public String getQuery()
    • setQuery

      public void setQuery(String query)
    • computeMinWidth

      protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computeMinWidth in class SkinBase<MFXFilterPane<T>>
    • computeMaxWidth

      protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computeMaxWidth in class SkinBase<MFXFilterPane<T>>
    • computeMaxHeight

      protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computeMaxHeight in class SkinBase<MFXFilterPane<T>>