Interface SettingInput
- All Known Implementing Classes:
SettingInput.Choice, SettingInput.Numeric, SettingInput.Selection, SettingInput.Text, SettingInput.Toggle
public sealed interface SettingInput
permits SettingInput.Choice, SettingInput.Toggle, SettingInput.Numeric, SettingInput.Text, SettingInput.Selection
An input the dialog editor shows for one argument of a
SettingProvider.
The values entered are turned back into the argument tokens the provider parses, in the order the inputs are declared. Labels and option names may be locale codes.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordExactly one of the options.static final recordA whole number within bounds.static final recordAny number of the options.static final recordFree text.static final recordOn or off. -
Method Summary
Modifier and TypeMethodDescriptionstatic SettingInput.ChoiceExactly one of the options.label()Label shown next to the input.static SettingInput.NumericA whole number within bounds.static SettingInput.SelectionAny number of the options.static SettingInput.TextFree text.static SettingInput.ToggleOn or off.
-
Method Details
-
label
-
choice
Exactly one of the options. Produces the chosen option as one token.- Parameters:
label- labeloptions- options as they are parsedinitial- option chosen at first- Returns:
- input
-
toggle
On or off. Producestrueorfalseas one token.- Parameters:
label- labelinitial- initial state- Returns:
- input
-
numeric
A whole number within bounds. Produces the number as one token.- Parameters:
label- labelmin- lowest valuemax- highest valueinitial- initial value- Returns:
- input
-
text
Free text. Produces one token per word, none if left empty. Offers no suggestions unlessSettingInput.Text.withSuggestions()is called.- Parameters:
label- labelinitial- initial text- Returns:
- input
-
selection
Any number of the options. Produces one token per selected option, in the order of the options.- Parameters:
label- labeloptions- options as they are parsedinitial- options selected at first- Returns:
- input
-