Interface MultiInput.Builder<C extends JComponent,T>

Type Parameters:
C - the wrapped component type
T - the value type
All Superinterfaces:
ComponentBuilder<MultiInput<C,T>,MultiInput.Builder<C,T>>, ComponentValueBuilder<MultiInput<C,T>,Set<T>,MultiInput.Builder<C,T>>, Supplier<MultiInput<C,T>>
Enclosing class:
MultiInput<C extends JComponent,T>

public static interface MultiInput.Builder<C extends JComponent,T> extends ComponentValueBuilder<MultiInput<C,T>,Set<T>,MultiInput.Builder<C,T>>
Builds a MultiInput.
  • Method Details

    • format

      Parameters:
      format - formats a value for the dialog and the button's tool tip, null for Object.toString()
      Returns:
      this builder instance
    • caption

      MultiInput.Builder<C,T> caption(@Nullable String caption)
      Parameters:
      caption - the caption of the border around the dialog's list, the caption of what is collected; null for none
      Returns:
      this builder instance
    • comparator

      MultiInput.Builder<C,T> comparator(@Nullable Comparator<T> comparator)

      The default comparator collates strings according to Text.COLLATOR_LOCALE, compares other Comparable values naturally and the rest by their string representation.

      Parameters:
      comparator - the comparator to use when sorting member items, null for insertion order
      Returns:
      this builder instance
    • addOnEnter

      MultiInput.Builder<C,T> addOnEnter(boolean addOnEnter)
      Whether KeyEvent.VK_ENTER adds the wrapped component's value while it holds one, leaving the key to the component while it does not, so that typing, Enter, typing, Enter, Enter collects two values and then does what Enter does in the component. Default true, unless the wrapped component is a JComboBox, whose Enter is its own, the editor a combo box has taking it before the component does.
      Parameters:
      addOnEnter - true if Enter should add the value
      Returns:
      this builder instance