Class DialogInput.SingleOption.Builder
java.lang.Object
fr.fidorial.dialog.DialogInput.SingleOption.Builder
- Enclosing class:
DialogInput.SingleOption
Fluent builder for
DialogInput.SingleOption.- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns the built input control.label(ComponentLike label) labelVisible(boolean labelVisible) option(DialogInput.SingleOption.Entry option) option(String id, ComponentLike display) options(List<DialogInput.SingleOption.Entry> options) width(int width)
-
Method Details
-
label
- Parameters:
label- the label displayed to the left of the control- Returns:
- this builder
- Since:
- 0.1.0
-
labelVisible
- Parameters:
labelVisible- whether the label is drawn at all- Returns:
- this builder
- Since:
- 0.1.0
-
width
- Parameters:
width- the width of the control- Returns:
- this builder
- Since:
- 0.1.0
-
option
@Contract("_ -> this") public DialogInput.SingleOption.Builder option(DialogInput.SingleOption.Entry option) - Parameters:
option- the entry to append- Returns:
- this builder
- Since:
- 0.1.0
-
option
@Contract("_, _ -> this") public DialogInput.SingleOption.Builder option(String id, ComponentLike display) - Parameters:
id- the value sent when this entry is pickeddisplay- how the entry reads on screen- Returns:
- this builder
- Since:
- 0.1.0
-
options
@Contract("_ -> this") public DialogInput.SingleOption.Builder options(List<DialogInput.SingleOption.Entry> options) - Parameters:
options- the entries to append- Returns:
- this builder
- Since:
- 0.1.0
-
build
Returns the built input control.- Returns:
- the built input control
- Since:
- 0.1.0
-