Class SingleLiveSearchSelectionHandler<TYPE>
- java.lang.Object
-
- org.uberfire.ext.widgets.common.client.dropdown.SingleLiveSearchSelectionHandler<TYPE>
-
- All Implemented Interfaces:
LiveSearchSelectionHandler<TYPE>
public class SingleLiveSearchSelectionHandler<TYPE> extends Object implements LiveSearchSelectionHandler<TYPE>
-
-
Field Summary
Fields Modifier and Type Field Description protected List<LiveSearchSelectorItem<TYPE>>visibleItems
-
Constructor Summary
Constructors Constructor Description SingleLiveSearchSelectionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearSelection()Clears the selectionStringgetDropDownMenuHeader()Retrieves the text for theLiveSearchDropDownheader based on the selected valuesTYPEgetSelectedKey()StringgetSelectedValue()booleanisMultipleSelection()Determines if the handler supports multiple selection or not.voidregisterItem(LiveSearchSelectorItem<TYPE> item)Registers and initializes the givenLiveSearchSelectorItemvoidselectItem(LiveSearchSelectorItem<TYPE> item)Sets the givenLiveSearchSelectorItemas a selected valuevoidselectKey(TYPE key)Selects theLiveSearchSelectorItemthat has the given keyvoidsetLiveSearchSelectionCallback(org.uberfire.mvp.Command command)Sets theCommandcallback to notify theLiveSearchDropDownwhen there's a selection change.
-
-
-
Field Detail
-
visibleItems
protected List<LiveSearchSelectorItem<TYPE>> visibleItems
-
-
Method Detail
-
getDropDownMenuHeader
public String getDropDownMenuHeader()
Description copied from interface:LiveSearchSelectionHandlerRetrieves the text for theLiveSearchDropDownheader based on the selected values- Specified by:
getDropDownMenuHeaderin interfaceLiveSearchSelectionHandler<TYPE>- Returns:
- The
LiveSearchDropDownheader
-
registerItem
public void registerItem(LiveSearchSelectorItem<TYPE> item)
Description copied from interface:LiveSearchSelectionHandlerRegisters and initializes the givenLiveSearchSelectorItem- Specified by:
registerItemin interfaceLiveSearchSelectionHandler<TYPE>
-
selectItem
public void selectItem(LiveSearchSelectorItem<TYPE> item)
Description copied from interface:LiveSearchSelectionHandlerSets the givenLiveSearchSelectorItemas a selected value- Specified by:
selectItemin interfaceLiveSearchSelectionHandler<TYPE>
-
selectKey
public void selectKey(TYPE key)
Description copied from interface:LiveSearchSelectionHandlerSelects theLiveSearchSelectorItemthat has the given key- Specified by:
selectKeyin interfaceLiveSearchSelectionHandler<TYPE>
-
getSelectedKey
public TYPE getSelectedKey()
-
getSelectedValue
public String getSelectedValue()
-
setLiveSearchSelectionCallback
public void setLiveSearchSelectionCallback(org.uberfire.mvp.Command command)
Description copied from interface:LiveSearchSelectionHandlerSets theCommandcallback to notify theLiveSearchDropDownwhen there's a selection change.- Specified by:
setLiveSearchSelectionCallbackin interfaceLiveSearchSelectionHandler<TYPE>
-
clearSelection
public void clearSelection()
Description copied from interface:LiveSearchSelectionHandlerClears the selection- Specified by:
clearSelectionin interfaceLiveSearchSelectionHandler<TYPE>
-
isMultipleSelection
public boolean isMultipleSelection()
Description copied from interface:LiveSearchSelectionHandlerDetermines if the handler supports multiple selection or not.- Specified by:
isMultipleSelectionin interfaceLiveSearchSelectionHandler<TYPE>- Returns:
- True if supports multiple selection, false if not.
-
-