Interface View.Form

Enclosing interface:
View

public static interface View.Form
The fields of View.form(String, Consumer), in order.
  • Method Details

    • text

      View.Field text(String name, String label)
      Parameters:
      name - the value's name for the action
      label - what the field asks
      Returns:
      the field, to set it up further
    • number

      View.Field number(String name, String label)
      Parameters:
      name - the value's name for the action
      label - what the field asks
      Returns:
      a field of numbers, to set up further
    • select

      View.Field select(String name, String label)
      Parameters:
      name - the value's name for the action
      label - what the field asks
      Returns:
      a list to choose from, filled by View.Field.option(String, String)
    • toggle

      View.Field toggle(String name, String label)
      Parameters:
      name - the value's name for the action, a boolean
      label - what the switch turns on
      Returns:
      the switch, to set it up further
    • range

      View.Field range(String name, String label, double min, double max)
      Parameters:
      name - the value's name for the action
      label - what the slider sets
      min - its lowest value
      max - its highest value
      Returns:
      the slider, to set it up further
    • textarea

      View.Field textarea(String name, String label)
      Parameters:
      name - the value's name for the action
      label - what the field asks
      Returns:
      a field of several lines, to set up further
    • player

      View.Field player(String name, String label)
      Parameters:
      name - the value's name for the action, a player's name (ActionContext.player(String))
      label - what the field asks
      Returns:
      a field that suggests the players online, to set up further
    • hidden

      View.Form hidden(String name, Object value)
      Parameters:
      name - the value's name for the action
      value - a value sent as it is
      Returns:
      this form
    • submit

      View.Form submit(String label)
      Parameters:
      label - what the form's button says, "Save" until set
      Returns:
      this form
    • submit

      View.Form submit(String label, Tone tone)
      Parameters:
      label - what the form's button says
      tone - the button's colour
      Returns:
      this form
    • confirm

      View.Form confirm(String question)
      Parameters:
      question - asked first, in a dialog, before the form is sent
      Returns:
      this form