Class BeanListComboBox.Builder<T>

  • Enclosing class:
    BeanListComboBox<T>

    public static class BeanListComboBox.Builder<T>
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder​(java.text.Format format,
                       LazyLoadComboBoxModel<T> model)
        Parameters:
        format - display format for the items in the popup list
        model - the model containing the list of items
    • Method Detail

      • required

        public BeanListComboBox.Builder<T> required​(java.lang.String message)
        Require that an item must be selected.
        Parameters:
        message - the error message if no item is selected
      • validated

        public BeanListComboBox.Builder<T> validated​(Validator<T> validator)
        Add validation of the selected item (does not make the combo box editable).
        Parameters:
        validator - the selected item validator (not the input text validator)
      • editable

        public BeanListComboBox.Builder<T> editable​(Validator<java.lang.String> validator)
        Make the combo box editable using the same format as the popup list.
        Parameters:
        validator - validator for input text
      • editable

        public BeanListComboBox.Builder<T> editable​(Validator<java.lang.String> validator,
                                                    PrefixSelector<T> prefixSelector)
        Make the combo box editable using the same format as the popup list.
        Parameters:
        validator - validator for input text
        prefixSelector - selector for the best matching item for the editor content
      • editable

        public BeanListComboBox.Builder<T> editable​(java.text.Format itemFormat,
                                                    Validator<java.lang.String> validator)
        Make the combo box editable.
        Parameters:
        itemFormat - the format for converting an item to/from a string
        validator - validator for input text
      • editable

        public BeanListComboBox.Builder<T> editable​(java.text.Format itemFormat,
                                                    Validator<java.lang.String> validator,
                                                    PrefixSelector<T> prefixSelector)
        Make the combo box editable.
        Parameters:
        itemFormat - the format for converting an item to/from a string
        validator - validator for input text
        prefixSelector - selector for the best matching item for the editor content