Class LXVirtualParameter

java.lang.Object
heronarts.lx.parameter.LXVirtualParameter
All Implemented Interfaces:
LXPath, LXParameter

public abstract class LXVirtualParameter extends Object implements LXParameter
A virtual parameter is one that wraps or forwards to another real parameter. Typically this is done in situations in which the parameter to forward to varies based on some other contextual action or UI, for instance a virtual knob that maps to whatever pattern is currently active. This type of parameter is not listenable, since the underlying parameter is dynamic.
  • Constructor Details

    • LXVirtualParameter

      public LXVirtualParameter()
  • Method Details

    • getRealParameter

      protected abstract LXParameter getRealParameter()
      The parameter to operate on.
      Returns:
      The underlying real parameter to operate on.
    • reset

      public final LXParameter reset()
      Description copied from interface: LXParameter
      A method to reset the value of the parameter, if a default is available. Not necessarily defined for all parameters, may be ignored.
      Specified by:
      reset in interface LXParameter
      Returns:
      this
    • setValue

      public final LXParameter setValue(double value)
      Description copied from interface: LXParameter
      Sets the value of the parameter.
      Specified by:
      setValue in interface LXParameter
      Parameters:
      value - The value
      Returns:
      this
    • getValue

      public double getValue()
      Description copied from interface: LXParameter
      Retrieves the value of the parameter
      Specified by:
      getValue in interface LXParameter
      Returns:
      Parameter value
    • getValuef

      public float getValuef()
      Description copied from interface: LXParameter
      Utility helper function to get the value of the parameter as a float.
      Specified by:
      getValuef in interface LXParameter
      Returns:
      Parameter value as float
    • getLabel

      public String getLabel()
      Description copied from interface: LXParameter
      Gets the label for this parameter
      Specified by:
      getLabel in interface LXParameter
      Specified by:
      getLabel in interface LXPath
      Returns:
      Label of parameter