Package heronarts.lx.parameter
Class BooleanParameter
java.lang.Object
heronarts.lx.parameter.LXListenableParameter
heronarts.lx.parameter.LXListenableNormalizedParameter
heronarts.lx.parameter.BooleanParameter
- All Implemented Interfaces:
LXPath,LXNormalizedParameter,LXParameter
- Direct Known Subclasses:
DJTTMidiFighterTwister.Switch,TriggerParameter
A simple parameter that has a binary value of off or on
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface heronarts.lx.parameter.LXNormalizedParameter
LXNormalizedParameter.OscModeNested 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 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 TypeMethodDescriptiongetMode()doubleGets the value of the parameter in a normalized space from 0 to 1floatGets the value of the parameter in a normalized space as a floatbooleanbooleanisOn()setDescription(String description) setMappable(boolean mappable) Sets whether this parameter should be eligible for MIDI/modulation mapping or not.setMode(BooleanParameter.Mode mode) setNormalized(double normalized) Sets the value or the parameter in normalized space from 0 to 1setValue(boolean value) toggle()protected doubleupdateValue(double value) Invoked when the value has changed.Methods inherited from class heronarts.lx.parameter.LXListenableNormalizedParameter
getExponent, getNormalizedWithModulation, getOscMode, incrementNormalized, incrementNormalized, isWrappable, setExponent, setOscMode, setUnits, setWrappableMethods inherited from class heronarts.lx.parameter.LXListenableParameter
addListener, addListener, bang, dispose, getDescription, getFormatter, getLabel, getParent, getParentParameter, getPath, getPolarity, getUnits, getValue, incrementValue, isDefault, isMappable, removeListener, reset, reset, setComponent, setFormatter, setPolarity, 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.LXNormalizedParameter
getBaseNormalized, getBaseNormalizedf, getValueFromNormalizedMethods inherited from interface heronarts.lx.parameter.LXParameter
dispose, getBaseValue, getBaseValuef, getFormatter, getLabel, getParentParameter, getPolarity, getUnits, getValue, getValuef, isMappable, reset, setComponent, setFormatter, setValueMethods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getDescription, getParent, getPath, isDescendant
-
Constructor Details
-
BooleanParameter
-
BooleanParameter
-
-
Method Details
-
setMappable
Description copied from interface:LXParameterSets whether this parameter should be eligible for MIDI/modulation mapping or not.- Specified by:
setMappablein interfaceLXParameter- Overrides:
setMappablein classLXListenableParameter- Parameters:
mappable- Whether parameter should be available for mapping- Returns:
- this
-
setDescription
- Overrides:
setDescriptionin classLXListenableParameter
-
setMode
-
getMode
-
isOn
public boolean isOn() -
getValueb
public boolean getValueb() -
setValue
-
toggle
-
updateValue
protected double updateValue(double value) Description copied from class:LXListenableParameterInvoked when the value has changed. Subclasses should update any special internal state according to this new value.- Specified by:
updateValuein classLXListenableParameter- Parameters:
value- New value- Returns:
- this
-
getNormalized
public double getNormalized()Description copied from interface:LXNormalizedParameterGets the value of the parameter in a normalized space from 0 to 1- Returns:
- Value of parameter, normalized to range from 0 to 1
-
getNormalizedf
public float getNormalizedf()Description copied from interface:LXNormalizedParameterGets the value of the parameter in a normalized space as a float- Returns:
- Normalized value of parameter, in range from 0 to 1
-
setNormalized
Description copied from interface:LXNormalizedParameterSets the value or the parameter in normalized space from 0 to 1- Parameters:
normalized- The normalized value, from 0 to 1- Returns:
- this, for method chaining
-
getTriggerSource
-