Class JBBaseFilter<T extends Component<?>>

Direct Known Subclasses:
AdvancedFilter, SimpleFilter, TextFilter

public abstract class JBBaseFilter<T extends Component<?>> extends BaseFilter<T>
  • Field Details

    • HIDDEN_OPERATORS

      protected static final List<OperatorType> HIDDEN_OPERATORS
    • TEXT

      protected static final String TEXT
      See Also:
    • SIMPLE

      protected static final String SIMPLE
      See Also:
    • ADVANCED

      protected static final String ADVANCED
      See Also:
    • currentCriteria

      protected Criteria currentCriteria
    • defaultWorldOperator

      protected OperatorType defaultWorldOperator
    • filteredColumn

      protected List<String> filteredColumn
    • filterButtonText

      protected String filterButtonText
    • resetButtonText

      protected String resetButtonText
    • saveButtonText

      protected String saveButtonText
    • cancelButtonText

      protected String cancelButtonText
    • filterButtonIcon

      protected Icon filterButtonIcon
    • resetButtonIcon

      protected Icon resetButtonIcon
    • saveButtonIcon

      protected Icon saveButtonIcon
    • cancelButtonIcon

      protected Icon cancelButtonIcon
  • Constructor Details

  • Method Details

    • init

      public void init() throws JavaScriptLoadError
      Description copied from class: Component
      The component initialization method.

      Empty method, only needs to be overwritten when making a custom component, that needs to call an initializing JavaScript on the client side. The method is called by the framework after the component is drawn, but before the afterDraw() method. The use of this method during application development is not allowed. This method is meant for inner use only.

      Overrides:
      init in class Component<T extends Component<?>>
      Throws:
      JavaScriptLoadError - If there was a JavaScript error during the initialization.
    • getColumnParamsAsJson

      protected String getColumnParamsAsJson(BaseFilter<T>.ColumnParams param)
      Generate JSON parameter object from the column parameters
      Parameters:
      param - The column parameters object
      Returns:
      The generated JSON object
    • getCriteria

      public Criteria getCriteria()
      Gets the user-specified filter criterion from the filter component.
      Specified by:
      getCriteria in class BaseFilter<T extends Component<?>>
      Returns:
      The filter criterion in the component or null if no filter criterion is specified
    • reset

      public T reset()
      Removes all filter conditions from the filter component and setting the filter component to default
      Specified by:
      reset in class BaseFilter<T extends Component<?>>
      Returns:
      The filter component
    • onFilter

      public void onFilter(FilterbarFilteringEvent event)
      Filter handling
      Parameters:
      event - Filter event
    • setCriteria

      public abstract T setCriteria(Criteria criteria)
      Specified by:
      setCriteria in class BaseFilter<T extends Component<?>>
    • onChangeEditor

      public void onChangeEditor(FilterbarChangeEditorEvent event)
      Parameters:
      event - The change filter editor event
    • setEnabled

      public T setEnabled(boolean enabled)
      Sets the component to be enabled. Defaults to true
      Overrides:
      setEnabled in class Component<T extends Component<?>>
      Parameters:
      enabled - true, the component is enabled, otherwise it's disabled
      Returns:
      The component
    • setShowEditor

      public T setShowEditor(boolean showEditor)
    • isShowEditor

      public boolean isShowEditor()
    • setButtonsData

      protected void setButtonsData()