Package space.maxus.flare.ui.compose
Interface Selection.Builder<E>
- Type Parameters:
E- The type of selected value
- All Superinterfaces:
ComposableLike
The selection builder
-
Method Summary
Modifier and TypeMethodDescriptiondefault ComposableConverts self to a composablebuild()Builds this selectionSets the formatter.isDisabled(boolean isDisabled) Sets the disabled state of selectionitem(ItemProvider provider) Sets the item provider.selected(int index) Sets the currently selected item indexselectedItem(E item) Sets the currently selected itemMethods inherited from interface space.maxus.flare.ui.ComposableLike
inside
-
Method Details
-
item
Sets the item provider. Either item provider orformatter(org.apache.commons.lang3.concurrent.Computable<E, java.lang.String>)should be set.- Parameters:
provider- The item provider to use- Returns:
- This builder
-
selected
Sets the currently selected item index- Parameters:
index- The currently selected item index- Returns:
- This builder
-
selectedItem
Sets the currently selected item- Parameters:
item- The currently selected item- Returns:
- This builder
-
isDisabled
Sets the disabled state of selection- Parameters:
isDisabled- The disabled state- Returns:
- This builder
-
formatter
Sets the formatter. Either formatter oritem(space.maxus.flare.item.ItemProvider)should be set.- Parameters:
mapper- The formatter function- Returns:
- This builder
-
build
Builds this selection- Returns:
- The selection
-
asComposable
Description copied from interface:ComposableLikeConverts self to a composable- Specified by:
asComposablein interfaceComposableLike- Returns:
- The composable
-