Class ColorParameter

All Implemented Interfaces:
LXPath, LXParameter
Direct Known Subclasses:
LinkedColorParameter

public class ColorParameter extends AggregateParameter
  • Field Details

  • Constructor Details

    • ColorParameter

      public ColorParameter(String label)
    • ColorParameter

      public ColorParameter(String label, int color)
  • Method Details

    • getRemoteControl

      public LXListenableNormalizedParameter getRemoteControl()
      Description copied from class: AggregateParameter
      Subclasses may override. By default an AggregateParameter returns its first subparameter that is an LXListenableNormalizedParameter for remote control surface.
      Overrides:
      getRemoteControl in class AggregateParameter
      Returns:
      Subparameter to be used by a remote control surface
    • setDescription

      public ColorParameter setDescription(String description)
      Overrides:
      setDescription in class LXListenableParameter
    • getColor

      public int getColor()
      Returns the fixed color defined by this parameter. Note that this does not take into account any modulation applied to the hue/saturation/brightness values.
      Returns:
      fixed color specified by the parameter
    • getBaseColor

      public int getBaseColor()
    • calcColor

      public int calcColor()
      Calculates the potentially modulated value of the color parameter based upon the parameter values at this precise instance.
      Returns:
      Generated color value
    • setColor

      public ColorParameter setColor(int color)
    • isBlack

      public boolean isBlack()
    • getHexString

      public String getHexString()
    • onUpdateValue

      protected double onUpdateValue(double value)
      Description copied from class: AggregateParameter
      Subclasses may optionally override to take action based upon directly updated value
      Overrides:
      onUpdateValue in class AggregateParameter
      Parameters:
      value - Updated value
      Returns:
      Value to store
    • updateSubparameters

      protected void updateSubparameters(double value)
      Description copied from class: AggregateParameter
      Subclasses should update the subparameter values based upon the raw parameter value if it has been set directly.
      Specified by:
      updateSubparameters in class AggregateParameter
    • onSubparameterUpdate

      protected void onSubparameterUpdate(LXParameter p)
      Description copied from class: AggregateParameter
      Subclasses should update the main parameter value when a sub-parameter has changed
      Specified by:
      onSubparameterUpdate in class AggregateParameter
      Parameters:
      p - Subparameter that has changed