Package heronarts.lx.parameter
Class LXVirtualParameter
java.lang.Object
heronarts.lx.parameter.LXVirtualParameter
- All Implemented Interfaces:
LXPath
,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.
-
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
Fields inherited from interface heronarts.lx.LXPath
ROOT, ROOT_PREFIX, ROOT_SLASH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetLabel()
Gets the label for this parameterprotected abstract LXParameter
The parameter to operate on.double
getValue()
Retrieves the value of the parameterfloat
Utility helper function to get the value of the parameter as a float.final LXParameter
reset()
A method to reset the value of the parameter, if a default is available.final LXParameter
setValue
(double value) Sets the value of the parameter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface heronarts.lx.parameter.LXParameter
dispose, getBaseValue, getBaseValuef, getFormatter, getParentParameter, getPolarity, getUnits, isMappable, setComponent, setFormatter, setMappable
Methods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getDescription, getParent, getPath, isDescendant
-
Constructor Details
-
LXVirtualParameter
public LXVirtualParameter()
-
-
Method Details
-
getRealParameter
The parameter to operate on.- Returns:
- The underlying real parameter to operate on.
-
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 interfaceLXParameter
- Returns:
- this
-
setValue
Description copied from interface:LXParameter
Sets the value of the parameter.- Specified by:
setValue
in interfaceLXParameter
- 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 interfaceLXParameter
- 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 interfaceLXParameter
- Returns:
- Parameter value as float
-
getLabel
Description copied from interface:LXParameter
Gets the label for this parameter- Specified by:
getLabel
in interfaceLXParameter
- Specified by:
getLabel
in interfaceLXPath
- Returns:
- Label of parameter
-