Class BaseFilterInput<T extends BaseFilterInput<T>>

All Implemented Interfaces:
ElementAttributeMethods<HTMLElement, T>, ElementClassListMethods<HTMLElement, T>, ElementConsumerMethods<HTMLElement, T>, ElementContainerMethods<HTMLElement, T>, ElementEventMethods<HTMLElement, T>, ElementIdMethods<HTMLElement, T>, ElementQueryMethods<HTMLElement>, HTMLElementAttributeMethods<HTMLElement, T>, HTMLElementDataMethods<HTMLElement, T>, HTMLElementStyleMethods<HTMLElement, T>, HTMLElementVisibilityMethods<HTMLElement, T>, IsElement<HTMLElement>, TypedBuilder<HTMLElement, T>, Component, ComponentIcon<HTMLElement, T>, HasValue<String>, Validatable<HTMLElement, T>, Modifiers.Disabled<HTMLElement, T>, Modifiers.Plain<HTMLElement, T>
Direct Known Subclasses:
FilterInput

public abstract class BaseFilterInput<T extends BaseFilterInput<T>> extends BaseSearchInput<T>
  • Field Details

  • Method Details

    • addLabelGroup

      public T addLabelGroup(LabelGroup labelGroup)
    • add

      public T add(LabelGroup labelGroup)
    • allowDuplicates

      public T allowDuplicates()
      Allows duplicate entries to be added to the filter input. This method enables duplicates by delegating to the allowDuplicates(boolean) method with a default value of true.

      The flag only applies if the default add-on-enter has not been disabled using noAddOnEnter().

      Returns:
      This instance with duplicate entries enabled, allowing method chaining.
    • allowDuplicates

      public T allowDuplicates(boolean allowDuplicates)
      Allows or disallows duplicate entries in the filter input.

      The flag only applies if the default add-on-enter has not been disabled using noAddOnEnter().

      Parameters:
      allowDuplicates - A boolean flag indicating whether duplicate entries should be allowed. If true, duplicates are permitted; otherwise, they are rejected.
      Returns:
      This instance with the duplicate entry behavior updated, allowing method chaining.
    • noAddOnEnter

      public T noAddOnEnter()
      Disables the default behavior of adding an item to the label group when the Enter key is pressed. You can add a custom enter-handler using onEnter(ComponentHandler).

      The default behavior is to turn the entered text into a label and add it to the label group using the textToIdentifier() and textToLabel() functions.

      Returns:
      This instance with the "add on Enter" functionality disabled, allowing method chaining.
    • textToIdentifier

      public T textToIdentifier(Function<String,String> textToIdentifier)
    • textToLabel

      public T textToLabel(Function<String,Label> textToLabel)
    • showLabelGroupIf

      public T showLabelGroupIf(BiFunction<T,String,Boolean> visibility)
    • onAdd

      public T onAdd(BiConsumer<T,Label> onAdd)
    • onRemove

      public T onRemove(BiConsumer<T,Label> onRemove)
    • onEnter

      public T onEnter(ComponentHandler<T> onEnter)
    • labelGroup

      public LabelGroup labelGroup()
    • textToIdentifier

      public Function<String,String> textToIdentifier()
    • textToLabel

      public Function<String,Label> textToLabel()
    • value

      public T value(String value)
      Description copied from class: BaseTextInputGroup
      Overrides:
      value in class BaseSearchInput<T extends BaseFilterInput<T>>
    • value

      public T value(String value, boolean fireEvent)
      Overrides:
      value in class BaseSearchInput<T extends BaseFilterInput<T>>