Class BooleanParameter

All Implemented Interfaces:
LXPath, LXNormalizedParameter, LXParameter
Direct Known Subclasses:
TriggerParameter

public class BooleanParameter extends LXListenableNormalizedParameter
A simple parameter that has a binary value of off or on
  • Constructor Details

    • BooleanParameter

      public BooleanParameter(String label)
    • BooleanParameter

      public BooleanParameter(String label, boolean on)
  • Method Details

    • setMappable

      public BooleanParameter setMappable(boolean mappable)
      Description copied from interface: LXParameter
      Sets whether this parameter should be eligible for MIDI/modulation mapping or not.
      Specified by:
      setMappable in interface LXParameter
      Overrides:
      setMappable in class LXListenableParameter
      Parameters:
      mappable - Whether parameter should be available for mapping
      Returns:
      this
    • setDescription

      public BooleanParameter setDescription(String description)
      Overrides:
      setDescription in class LXListenableParameter
    • setMode

      public BooleanParameter setMode(BooleanParameter.Mode mode)
    • getMode

      public BooleanParameter.Mode getMode()
    • isOn

      public boolean isOn()
    • getValueb

      public boolean getValueb()
    • setValue

      public BooleanParameter setValue(boolean value)
    • toggle

      public BooleanParameter toggle()
    • updateValue

      protected double updateValue(double value)
      Description copied from class: LXListenableParameter
      Invoked when the value has changed. Subclasses should update any special internal state according to this new value.
      Specified by:
      updateValue in class LXListenableParameter
      Parameters:
      value - New value
      Returns:
      this
    • getNormalized

      public double getNormalized()
      Description copied from interface: LXNormalizedParameter
      Gets the value of the parameter in a normalized space from 0 to 1
      Returns:
      Value of parameter, normalized to range from 0 to 1
    • getNormalizedf

      public float getNormalizedf()
      Description copied from interface: LXNormalizedParameter
      Gets the value of the parameter in a normalized space as a float
      Returns:
      Normalized value of parameter, in range from 0 to 1
    • setNormalized

      public BooleanParameter setNormalized(double normalized)
      Description copied from interface: LXNormalizedParameter
      Sets the value or the parameter in normalized space from 0 to 1
      Parameters:
      normalized - The normalized value, from 0 to 1
      Returns:
      this, for method chaining