Interface MaterialAutoComplete.MaterialChipProvider
-
- All Known Implementing Classes:
MaterialAutoComplete.DefaultMaterialChipProvider
- Enclosing class:
- MaterialAutoComplete
public static interface MaterialAutoComplete.MaterialChipProviderInterface that defines how aMaterialChipis created, given aSuggestOracle.Suggestion.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description gwt.material.design.client.ui.MaterialChipgetChip(com.google.gwt.user.client.ui.SuggestOracle.Suggestion suggestion)Creates and returns aMaterialChipbased on the selectedSuggestOracle.Suggestion.booleanisChipRemovable(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.booleanisChipSelectable(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 aMaterialChipbased on the selectedSuggestOracle.Suggestion.- Parameters:
suggestion- the selectedSuggestOracle.Suggestion- Returns:
- the created MaterialChip, or
nullif 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 selectedSuggestOracle.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
falseto implement your own logic when the user clicks on the chip icon.- Parameters:
suggestion- the selectedSuggestOracle.Suggestion
-
-