public abstract class MicroUILED
extends ej.fp.Widget
A LED is a widget that represents a LED. Its intensity is variable.
Note the widget label must be an integer. It allows MicroUI implementation to retrieve a LED from an integer index.
The first LED index must be 0
and last LED index must be availableNumberOfLEDs - 1
, where
availableNumberOfLEDs
is retrieved using method
Device.getDevice().getWidgets(MicroUILED.class).size()
.
Modifier and Type | Field and Description |
---|---|
static int |
MAX_INTENSITY
Maximal value of intensity according MicroUI specification.
|
static int |
MIN_INTENSITY
Minimal value of intensity according MicroUI specification.
|
Constructor and Description |
---|
MicroUILED()
Creates a widget LED compatible with MicroUI implementation.
|
Modifier and Type | Method and Description |
---|---|
void |
finalizeConfiguration() |
int |
getID()
Gets the LED identifier (equals to its label).
|
abstract int |
getIntensity()
Gets the intensity of this led.
|
abstract void |
setIntensity(int intensity)
Sets the intensity of this led.
|
dispose, getAbsoluteX, getAbsoluteY, getCurrentSkin, getFilter, getHeight, getLabel, getParent, getSkin, getWidth, getX, getY, isOver, repaint, repaint, setCurrentSkin, setFilter, setHeight, setLabel, setOverlay, setSkin, setWidth, setX, setY, showYourself, start
public static final int MIN_INTENSITY
public static final int MAX_INTENSITY
public MicroUILED()
public void finalizeConfiguration()
finalizeConfiguration
in class ej.fp.Widget
public int getID()
public abstract void setIntensity(int intensity)
intensity
- the intensity to set.public abstract int getIntensity()