public class BoundedParameter extends LXListenableNormalizedParameter
Modifier and Type | Class and Description |
---|---|
static class |
BoundedParameter.Range |
LXParameter.Formatter, LXParameter.Polarity, LXParameter.Units
Modifier and Type | Field and Description |
---|---|
BoundedParameter.Range |
range
Range of the parameter
|
description
Modifier | Constructor and Description |
---|---|
|
BoundedParameter(LXListenableParameter underlying,
double v0,
double v1)
Creates a BoundedParameter which limits the value of an underlying MutableParameter to a given
range.
|
|
BoundedParameter(String label)
Labeled parameter with value of 0 and range of 0-1
|
|
BoundedParameter(String label,
double value)
A bounded parameter with label and value, initial value of 0 and a range of 0-1
|
|
BoundedParameter(String label,
double value,
double max)
A bounded parameter with an initial value, and range from 0 to max
|
|
BoundedParameter(String label,
double value,
double v0,
double v1)
A bounded parameter with initial value and range from v0 to v1.
|
protected |
BoundedParameter(String label,
double value,
double v0,
double v1,
LXListenableParameter underlying) |
Modifier and Type | Method and Description |
---|---|
double |
getNormalized()
Gets a normalized value of the parameter from 0 to 1
|
float |
getNormalizedf()
Normalized value as a float
|
double |
getRange()
Get the range of values for this parameter
|
BoundedParameter |
incrementValue(double amount,
boolean wrap) |
BoundedParameter |
setDescription(String description) |
BoundedParameter |
setExponent(double exponent) |
BoundedParameter |
setNormalized(double normalized)
Sets the value of parameter using normal 0-1
|
BoundedParameter |
setPolarity(LXParameter.Polarity polarity) |
protected double |
updateValue(double value)
Invoked when the value has changed.
|
getExponent, isMappable, setMappable
addListener, bang, dispose, getDescription, getFormatter, getLabel, getParent, getPath, getPolarity, getUnits, getValue, getValuef, incrementValue, removeListener, reset, reset, setComponent, setFormatter, setUnits, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose, getDescription, getFormatter, getLabel, getPolarity, getUnits, getValue, getValuef, reset, setComponent, setValue
get, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter, getParent, getPath
public final BoundedParameter.Range range
public BoundedParameter(String label)
label
- Label for parameterpublic BoundedParameter(String label, double value)
label
- Labelvalue
- valuepublic BoundedParameter(String label, double value, double max)
label
- Labelvalue
- valuemax
- Maximum valuepublic BoundedParameter(String label, double value, double v0, double v1)
label
- Labelvalue
- Initial valuev0
- Start of rangev1
- End of rangepublic BoundedParameter(LXListenableParameter underlying, double v0, double v1)
underlying
- The underlying parameterv0
- Beginning of rangev1
- End of rangeprotected BoundedParameter(String label, double value, double v0, double v1, LXListenableParameter underlying)
public BoundedParameter setDescription(String description)
setDescription
in class LXListenableParameter
public BoundedParameter setPolarity(LXParameter.Polarity polarity)
setPolarity
in class LXListenableParameter
public BoundedParameter setExponent(double exponent)
setExponent
in class LXListenableNormalizedParameter
public BoundedParameter incrementValue(double amount, boolean wrap)
public BoundedParameter setNormalized(double normalized)
normalized
- Value from 0-1 through the parameter rangepublic double getRange()
public double getNormalized()
public float getNormalizedf()
protected double updateValue(double value)
LXListenableParameter
updateValue
in class LXListenableParameter
value
- New valueLX library by Mark C. Slee. © 2012-2020