Package heronarts.lx.color
Class ColorParameter
java.lang.Object
heronarts.lx.parameter.LXListenableParameter
heronarts.lx.parameter.AggregateParameter
heronarts.lx.color.ColorParameter
- All Implemented Interfaces:
LXPath,LXParameter
- Direct Known Subclasses:
LinkedColorParameter
-
Nested Class Summary
Nested classes/interfaces inherited from interface heronarts.lx.parameter.LXParameter
LXParameter.Collection, LXParameter.Formatter, LXParameter.Monitor, LXParameter.MultiMonitor, LXParameter.Polarity, LXParameter.Units -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal CompoundParameterprotected intfinal CompoundParameterstatic final Stringstatic final Stringstatic final Stringfinal CompoundParameterFields inherited from class heronarts.lx.parameter.AggregateParameter
subparametersFields inherited from class heronarts.lx.parameter.LXListenableParameter
descriptionFields inherited from interface heronarts.lx.LXPath
DEFAULT_SEPARATOR, ROOT, ROOT_PREFIX, ROOT_SLASH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCalculates the potentially modulated value of the color parameter based upon the parameter values at this precise instance.intintgetColor()Returns the fixed color defined by this parameter.Subclasses may override.booleanisBlack()protected voidSubclasses should update the main parameter value when a sub-parameter has changedprotected doubleonUpdateValue(double value) Subclasses may optionally override to take action based upon directly updated valuesetColor(int color) setDescription(String description) protected voidupdateSubparameters(double value) Subclasses should update the subparameter values based upon the raw parameter value if it has been set directly.Methods inherited from class heronarts.lx.parameter.AggregateParameter
addSubparameter, dispose, updateValueMethods inherited from class heronarts.lx.parameter.LXListenableParameter
addListener, addListener, bang, getDescription, getFormatter, getLabel, getParent, getParentParameter, getPath, getPolarity, getUnits, getValue, incrementValue, isDefault, isMappable, removeListener, reset, reset, setComponent, setFormatter, setMappable, setPolarity, setUnits, setValue, setValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface heronarts.lx.parameter.LXParameter
getBaseValue, getBaseValuef, getValuefMethods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, isDescendant
-
Field Details
-
hue
-
saturation
-
brightness
-
PATH_BRIGHTNESS
- See Also:
-
PATH_SATURATION
- See Also:
-
PATH_HUE
- See Also:
-
color
protected int color
-
-
Constructor Details
-
ColorParameter
-
ColorParameter
-
-
Method Details
-
getRemoteControl
Description copied from class:AggregateParameterSubclasses may override. By default an AggregateParameter returns its first subparameter that is an LXListenableNormalizedParameter for remote control surface.- Overrides:
getRemoteControlin classAggregateParameter- Returns:
- Subparameter to be used by a remote control surface
-
setDescription
- Overrides:
setDescriptionin classLXListenableParameter
-
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
-
isBlack
public boolean isBlack() -
getHexString
-
onUpdateValue
protected double onUpdateValue(double value) Description copied from class:AggregateParameterSubclasses may optionally override to take action based upon directly updated value- Overrides:
onUpdateValuein classAggregateParameter- Parameters:
value- Updated value- Returns:
- Value to store
-
updateSubparameters
protected void updateSubparameters(double value) Description copied from class:AggregateParameterSubclasses should update the subparameter values based upon the raw parameter value if it has been set directly.- Specified by:
updateSubparametersin classAggregateParameter
-
onSubparameterUpdate
Description copied from class:AggregateParameterSubclasses should update the main parameter value when a sub-parameter has changed- Specified by:
onSubparameterUpdatein classAggregateParameter- Parameters:
p- Subparameter that has changed
-