Interface MultiStateHardwareLight
- All Superinterfaces:
HardwareElement,HardwareLight,HardwareOutputElement
Represents a physical hardware light on a controller. The light has an on/off state and may also be
optionally colored.
- Since:
- API version 10
-
Method Summary
Modifier and TypeMethodDescriptiongetBestLightStateForColor(Color color) Determines the best light state for the supplied color.voidTries to set this light's state to be the best state to represent the suppliedColor.voidsetColorSupplier(Supplier<Color> colorSupplier) Tries to set this light's state to be the best state to represent the value supplied by theSupplier.voidSets a function that can be used to convert a color to the closest possible state representing that color.state()Object that represents the current state of this light.Methods inherited from interface com.bitwig.extension.controller.api.HardwareElement
getHeight, getId, getLabel, getLabelColor, getLabelPosition, getWidth, getX, getY, setBounds, setLabel, setLabelColor, setLabelPositionMethods inherited from interface com.bitwig.extension.controller.api.HardwareOutputElement
onUpdateHardware
-
Method Details
-
state
Object that represents the current state of this light. The interpretation of this value is entirely up to the implementation. -
setColorToStateFunction
Sets a function that can be used to convert a color to the closest possible state representing that color. Once this function has been provided it is possible to then use the convenientsetColor(Color)andsetColorSupplier(Supplier)methods. -
setColor
Tries to set this light's state to be the best state to represent the suppliedColor. For this to be used you must first call.invalid reference
#setColorToStateFunction(IntFunction) -
setColorSupplier
Tries to set this light's state to be the best state to represent the value supplied by theSupplier. For this to be used you must first call.invalid reference
#setColorToStateFunction(IntFunction) -
getBestLightStateForColor
Determines the best light state for the supplied color. For this to be used you must first call.invalid reference
#setColorToStateFunction(IntFunction)
-