Package heronarts.lx.parameter
Class FunctionalParameter
java.lang.Object
heronarts.lx.parameter.FunctionalParameter
- All Implemented Interfaces:
LXPath,LXParameter
- Direct Known Subclasses:
BoundedFunctionalParameter
An LXParameter that has a value computed by a function, which may combine the
values of other parameters, or call some function, etc.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface heronarts.lx.parameter.LXParameter
LXParameter.Collection, LXParameter.Formatter, LXParameter.Monitor, LXParameter.MultiMonitor, LXParameter.Polarity, LXParameter.Units -
Field Summary
FieldsFields inherited from interface heronarts.lx.LXPath
DEFAULT_SEPARATOR, ROOT, ROOT_PREFIX, ROOT_SLASH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FunctionalParameterstatic FunctionalParametercreate(String label, FunctionalParameter.Interface iface) voiddispose()Invoked when the parameter is done being used and none of its resources are needed anymore.Returns a contextual help message explaining the purpose of this parameter or component to the user, or null if none is available.Gets the formatter to be used for printing this parameter's valuefinal StringgetLabel()Gets the label for this parameterReturns the component that this object belongs togetPath()Returns the immediate path of this component, relative to its parentGets the polarity of this parameter.getUnits()Gets the unit format that this parameter's value stores.abstract doublegetValue()Retrieves the value of the parameter, subclass must implement.reset()Does nothing, subclass may override.setComponent(LXComponent parent, String path) Sets the component that owns this parametersetDescription(String description) setFormatter(LXParameter.Formatter formatter) Sets the formatter used for printing this parameter's valuesetValue(double value) Not supported for this parameter type unless subclass overrides.Methods 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, getParentParameter, getValuef, isMappable, setMappableMethods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, isDescendant
-
Field Details
-
description
-
-
Constructor Details
-
FunctionalParameter
protected FunctionalParameter() -
FunctionalParameter
-
-
Method Details
-
create
-
create
-
getDescription
Description copied from interface:LXPathReturns a contextual help message explaining the purpose of this parameter or component to the user, or null if none is available.- Specified by:
getDescriptionin interfaceLXPath- Returns:
- Contextual help string explaining purpose of the element
-
setDescription
-
setComponent
Description copied from interface:LXParameterSets the component that owns this parameter- Specified by:
setComponentin interfaceLXParameter- Parameters:
parent- Componentpath- Path name for parameter- Returns:
- this
-
getParent
Description copied from interface:LXPathReturns the component that this object belongs to -
getPath
Description copied from interface:LXPathReturns the immediate path of this component, relative to its parent -
getPolarity
Description copied from interface:LXParameterGets the polarity of this parameter.- Specified by:
getPolarityin interfaceLXParameter- Returns:
- polarity of this parameter
-
getFormatter
Description copied from interface:LXParameterGets the formatter to be used for printing this parameter's value- Specified by:
getFormatterin interfaceLXParameter- Returns:
- Formatter
-
setFormatter
Description copied from interface:LXParameterSets the formatter used for printing this parameter's value- Specified by:
setFormatterin interfaceLXParameter- Parameters:
formatter- Formatter- Returns:
- The parameter
-
getUnits
Description copied from interface:LXParameterGets the unit format that this parameter's value stores.- Specified by:
getUnitsin interfaceLXParameter- Returns:
- Units
-
dispose
public void dispose()Description copied from interface:LXParameterInvoked when the parameter is done being used and none of its resources are needed anymore.- Specified by:
disposein interfaceLXParameter
-
reset
Does nothing, subclass may override.- Specified by:
resetin interfaceLXParameter- Returns:
- this
-
setValue
Not supported for this parameter type unless subclass overrides.- Specified by:
setValuein interfaceLXParameter- Parameters:
value- The value- Returns:
- this
-
getValue
public abstract double getValue()Retrieves the value of the parameter, subclass must implement.- Specified by:
getValuein interfaceLXParameter- Returns:
- Parameter value
-
getLabel
Gets the label for this parameter- Specified by:
getLabelin interfaceLXParameter- Specified by:
getLabelin interfaceLXPath- Returns:
- Label of parameter
-