Interface SettingInput

All Known Implementing Classes:
SettingInput.Choice, SettingInput.Numeric, SettingInput.Selection, SettingInput.Text, SettingInput.Toggle

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.

  • Method Details

    • label

      String label()
      Label shown next to the input.
      Returns:
      text or locale code
    • choice

      static SettingInput.Choice choice(String label, List<String> options, String initial)
      Exactly one of the options. Produces the chosen option as one token.
      Parameters:
      label - label
      options - options as they are parsed
      initial - option chosen at first
      Returns:
      input
    • toggle

      static SettingInput.Toggle toggle(String label, boolean initial)
      On or off. Produces true or false as one token.
      Parameters:
      label - label
      initial - initial state
      Returns:
      input
    • numeric

      static SettingInput.Numeric numeric(String label, int min, int max, int initial)
      A whole number within bounds. Produces the number as one token.
      Parameters:
      label - label
      min - lowest value
      max - highest value
      initial - initial value
      Returns:
      input
    • text

      static SettingInput.Text text(String label, String initial)
      Free text. Produces one token per word, none if left empty. Offers no suggestions unless SettingInput.Text.withSuggestions() is called.
      Parameters:
      label - label
      initial - initial text
      Returns:
      input
    • selection

      static SettingInput.Selection selection(String label, List<String> options, List<String> initial)
      Any number of the options. Produces one token per selected option, in the order of the options.
      Parameters:
      label - label
      options - options as they are parsed
      initial - options selected at first
      Returns:
      input