Interface MaterialAutoComplete.MaterialChipProvider

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      gwt.material.design.client.ui.MaterialChip getChip​(com.google.gwt.user.client.ui.SuggestOracle.Suggestion suggestion)
      Creates and returns a MaterialChip based on the selected SuggestOracle.Suggestion.
      boolean isChipRemovable​(com.google.gwt.user.client.ui.SuggestOracle.Suggestion suggestion)
      Returns whether the chip defined by the suggestion should be removed from the autocomplete when clicked on its icon.
      boolean isChipSelectable​(com.google.gwt.user.client.ui.SuggestOracle.Suggestion suggestion)
      Returns whether the chip defined by the suggestion should be selected when the user clicks on it.
    • Method Detail

      • getChip

        gwt.material.design.client.ui.MaterialChip getChip​(com.google.gwt.user.client.ui.SuggestOracle.Suggestion suggestion)
        Creates and returns a MaterialChip based on the selected SuggestOracle.Suggestion.
        Parameters:
        suggestion - the selected SuggestOracle.Suggestion
        Returns:
        the created MaterialChip, or null if the suggestion should be ignored.
      • isChipSelectable

        boolean isChipSelectable​(com.google.gwt.user.client.ui.SuggestOracle.Suggestion suggestion)
        Returns whether the chip defined by the suggestion should be selected when the user clicks on it.

        Selecion of chips is used to batch remove suggestions, for example.

        Parameters:
        suggestion - the selected SuggestOracle.Suggestion
        See Also:
        MaterialAutoComplete.setSelectedChipStyle(String)
      • isChipRemovable

        boolean isChipRemovable​(com.google.gwt.user.client.ui.SuggestOracle.Suggestion suggestion)
        Returns whether the chip defined by the suggestion should be removed from the autocomplete when clicked on its icon.

        Override this method returning false to implement your own logic when the user clicks on the chip icon.

        Parameters:
        suggestion - the selected SuggestOracle.Suggestion