Class KeyedWidgetListBuilder
java.lang.Object
dev.pfaff.altargui.util.KeyedWidgetListBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(Key.CallSite key, Widget widget) addIf
(boolean condition, Key.CallSite key, Widget widget) addIf
(boolean condition, Supplier<Key.CallSite> keySupplier, Supplier<Widget> widgetSupplier) build()
static Consumer
<LayoutContext> buildKeyedWidgetList
(int expectedCapacity, Consumer<KeyedWidgetListBuilder> builder) static KeyedWidgetListBuilder
keyedWidgetListBuilder
(int expectedCapacity)
-
Constructor Details
-
KeyedWidgetListBuilder
public KeyedWidgetListBuilder(int expectedCapacity)
-
-
Method Details
-
add
-
addIf
public KeyedWidgetListBuilder addIf(boolean condition, Supplier<Key.CallSite> keySupplier, Supplier<Widget> widgetSupplier) -
addIf
-
build
-
buildKeyedWidgetList
public static Consumer<LayoutContext> buildKeyedWidgetList(int expectedCapacity, Consumer<KeyedWidgetListBuilder> builder) -
keyedWidgetListBuilder
-