Class Params.NoopParams

java.lang.Object
cit244.api.Params.NoopParams
All Implemented Interfaces:
Params
Enclosing interface:
Params

public static final class Params.NoopParams extends Object implements Params
No-op implementation for compatibility rendering mode. WARNING: Always returns defaults!
  • Nested Class Summary

    Nested classes/interfaces inherited from interface cit244.api.Params

    Params.NoopParams
  • Field Summary

    Fields inherited from interface cit244.api.Params

    NO_OP
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a parameters view that returns defaults for all controls.
  • Method Summary

    Modifier and Type
    Method
    Description
    at(String morePrefix)
    Returns a new Params that prepends the given prefix to all paths.
    boolean
    button(String path)
    A momentary button that returns true for exactly one frame when clicked.
    void
    info(String path, String message)
    Displays a read-only text label in the GUI.
    radio(String path, String[] options)
    A radio button group.
    radio(String path, String[] options, String defaultOption)
    A radio button group with an explicit default selection.
    radio(String path, List<String> options)
    A radio button group with options supplied as a list.
    radio(String path, List<String> options, String defaultOption)
    A radio button group with an explicit default selection.
    double
    slider(String path, double defaultValue)
    A floating-point slider with a default value and no explicit bounds.
    double
    slider(String path, double defaultValue, double min, double max)
    A floating-point slider with a default value and explicit bounds.
    int
    sliderInt(String path, int defaultValue)
    An integer slider with a default value and no explicit bounds.
    int
    sliderInt(String path, int defaultValue, int min, int max)
    An integer slider with a default value and explicit bounds.
    boolean
    toggle(String path, boolean defaultValue)
    A boolean toggle (checkbox).

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NoopParams

      public NoopParams()
      Creates a parameters view that returns defaults for all controls.
  • Method Details

    • at

      public Params at(String morePrefix)
      Description copied from interface: Params
      Returns a new Params that prepends the given prefix to all paths.

      Prefixes nest: params.at("a").at("b").slider("x", 1) resolves to the path "a/b/x".

      Specified by:
      at in interface Params
      Parameters:
      morePrefix - folder prefix (for example "osc" or "colors")
      Returns:
      a prefixed view of this Params
    • slider

      public double slider(String path, double defaultValue)
      Description copied from interface: Params
      A floating-point slider with a default value and no explicit bounds.
      Specified by:
      slider in interface Params
      Parameters:
      path - parameter path
      defaultValue - initial value
      Returns:
      the current slider value
    • slider

      public double slider(String path, double defaultValue, double min, double max)
      Description copied from interface: Params
      A floating-point slider with a default value and explicit bounds.
      Specified by:
      slider in interface Params
      Parameters:
      path - parameter path
      defaultValue - initial value
      min - minimum bound
      max - maximum bound
      Returns:
      the current slider value, clamped to [min, max]
    • sliderInt

      public int sliderInt(String path, int defaultValue)
      Description copied from interface: Params
      An integer slider with a default value and no explicit bounds.
      Specified by:
      sliderInt in interface Params
      Parameters:
      path - parameter path
      defaultValue - initial value
      Returns:
      the current slider value
    • sliderInt

      public int sliderInt(String path, int defaultValue, int min, int max)
      Description copied from interface: Params
      An integer slider with a default value and explicit bounds.
      Specified by:
      sliderInt in interface Params
      Parameters:
      path - parameter path
      defaultValue - initial value
      min - minimum bound
      max - maximum bound
      Returns:
      the current slider value, clamped to [min, max]
    • toggle

      public boolean toggle(String path, boolean defaultValue)
      Description copied from interface: Params
      A boolean toggle (checkbox).
      Specified by:
      toggle in interface Params
      Parameters:
      path - parameter path
      defaultValue - initial state
      Returns:
      true if the toggle is on
    • button

      public boolean button(String path)
      Description copied from interface: Params
      A momentary button that returns true for exactly one frame when clicked.
      Specified by:
      button in interface Params
      Parameters:
      path - parameter path
      Returns:
      true on the frame the button is pressed
    • info

      public void info(String path, String message)
      Description copied from interface: Params
      Displays a read-only text label in the GUI. Useful for showing computed values or status messages.
      Specified by:
      info in interface Params
      Parameters:
      path - parameter path
      message - text to display
    • radio

      public String radio(String path, String[] options)
      Description copied from interface: Params
      A radio button group. The first option is selected by default.
      Specified by:
      radio in interface Params
      Parameters:
      path - parameter path
      options - available choices
      Returns:
      the currently selected option
    • radio

      public String radio(String path, String[] options, String defaultOption)
      Description copied from interface: Params
      A radio button group with an explicit default selection.

      If defaultOption is null/blank, or not present in options, the first option is used as the default.

      Specified by:
      radio in interface Params
      Parameters:
      path - parameter path
      options - available choices
      defaultOption - initially selected option
      Returns:
      the currently selected option
    • radio

      public String radio(String path, List<String> options)
      Description copied from interface: Params
      A radio button group with options supplied as a list.
      Specified by:
      radio in interface Params
      Parameters:
      path - parameter path
      options - available choices; the first is selected by default
      Returns:
      the currently selected option
      See Also:
    • radio

      public String radio(String path, List<String> options, String defaultOption)
      Description copied from interface: Params
      A radio button group with an explicit default selection.
      Specified by:
      radio in interface Params
      Parameters:
      path - parameter path
      options - available choices
      defaultOption - initially selected option
      Returns:
      the currently selected option
      See Also: