public static interface Display.DisplayExtension
LLUIDisplayImpl
interface (provided by MicroUI graphical engine and
required to use a MicroUI Display in a MicroEJ application).
It provides a set of minimal methods to customize the Display
widget (which implements
LLUIDisplayImpl
) without needing to subclass it (no need to create a sub-widget "display" with same
characteritics and same Widget.WidgetAttribute
, just to override one setting).
An implementation classname of this interface can be set thanks the widget attribute
Display.setExtensionClass(String)
.
Modifier and Type | Method and Description |
---|---|
int |
convertARGBColorToDisplayColor(Display display,
int argbColor)
Converts the 32-bit ARGB color format (A-R-G-B) into the display color format.
|
int |
convertDisplayColorToARGBColor(Display display,
int displayColor)
Converts the display color format into a 32-bit ARGB color format (A-R-G-B).
|
int |
getNumberOfColors(Display display)
Gets the number of colors that can be represented on the device.
|
boolean |
isColor(Display display)
Asks if the display is a colored display or not.
|
default boolean |
prepareBlendingOfIndexedColors(Display display,
java.util.concurrent.atomic.AtomicInteger foreground,
java.util.concurrent.atomic.AtomicInteger background)
Prepares the blending of two ARGB colors (only useful when the LCD is a palletized LCD).
|
int convertARGBColorToDisplayColor(Display display, int argbColor)
display
- the display widget.argbColor
- the color to convert.microUIColor
.LLUIDisplayImpl.convertARGBColorToDisplayColor(int)
int convertDisplayColorToARGBColor(Display display, int displayColor)
display
- the display widget.displayColor
- the color to convert.displayColor
.LLUIDisplayImpl.convertDisplayColorToARGBColor(int)
int getNumberOfColors(Display display)
display
- the display widget.LLUIDisplayImpl.getNumberOfColors()
boolean isColor(Display display)
display
- the display widget.LLUIDisplayImpl.isColor()
default boolean prepareBlendingOfIndexedColors(Display display, java.util.concurrent.atomic.AtomicInteger foreground, java.util.concurrent.atomic.AtomicInteger background)
By default this feature is not used.
display
- the display widget.foreground
- the foreground ARGB color to convert.background
- the background ARGB color to convert.LLUIDisplayImpl.prepareBlendingOfIndexedColors(AtomicInteger, AtomicInteger)