public class Display
extends ej.fp.widget.MicroUIDisplay
The filter image is used to define the display rendering area. Outside this area, the display buffer data is not
drawn. This image must have the same size (@see Widget.setWidth(int)
and Widget.setHeight(int)
) than the widget
itself. If not, an error is thrown in MicroUIDisplay.finalizeConfiguration()
.
Modifier and Type | Field and Description |
---|---|
protected ej.fp.Image |
drawingBuffer
When the display is double buffered, the backBuffer represents the back buffer where drawings are done.
|
protected ej.fp.Image |
frameBuffer
This buffer contains the application drawings after the call to
MicroUIDisplay.flush() in double buffer mode or during
application rendering in simple buffer mode. |
protected ej.fp.Image |
visibleBuffer
Buffer visible on front panel viewer: contains application drawings (see
frameBuffer ) and some post
transformations like mask reduction, backlight and contrast. |
Constructor and Description |
---|
Display()
Creates the widget display
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
protected void |
drawBacklight(ej.fp.Image imageSkin)
Transforms the skin data applying an algorithm to simulate the display backlight.
|
protected void |
drawContrast(ej.fp.Image imageSkin)
Transforms the skin data applying an algorithm to simulate the display contrast.
|
void |
flush(int x,
int y,
int width,
int height) |
ej.fp.Image |
getCurrentSkin()
Gets the current displayed skin.
|
ej.fp.Image |
getDrawingBuffer() |
int |
getInitialColor()
Gets the initial color of the display.
|
boolean |
hasBacklight()
Overrides default behavior: backlight is always available on a pixalated display.
|
protected ej.fp.Image |
newDisplayImage()
Creates a new image with the same size than display (not widget size).
|
protected ej.fp.Image |
newWidgetImage()
Creates a new image with the same size than widget (not display size).
|
void |
setAlpha(int alpha)
Sets the opacity level (alpha) of the display in order to obtain a translucent display.
|
void |
setInitialColor(int initialColor)
Sets the initial color of the display (color used on startup, just before first drawing).
|
void |
showYourself(boolean appearSwitchedOn) |
void |
start()
Called by the parser after filling all the fields defined in the xml.
|
convertARGBColorToDisplayColor, convertDisplayColorToARGBColor, finalizeConfiguration, flush, getBacklight, getContrast, getDisplayHeight, getDisplayWidth, getNbBitsPerPixel, getNumberOfColors, isColor, isDoubleBuffered, prepareBlendingOfIndexedColors, setBacklight, setContrast, setDisplayHeight, setDisplayWidth, setExtensionClass, switchBacklight
protected ej.fp.Image drawingBuffer
protected ej.fp.Image frameBuffer
MicroUIDisplay.flush()
in double buffer mode or during
application rendering in simple buffer mode.protected ej.fp.Image visibleBuffer
frameBuffer
) and some post
transformations like mask reduction, backlight and contrast.public void setInitialColor(int initialColor)
This is a RGB color (24 bits: 8-8-8). Alpha level is ignored.
This method should only be called by front panel parser.
initialColor
- the initial color to set.public void setAlpha(int alpha)
This method should only be called by front panel parser.
alpha
- the opacity level to set, 0x00 is fully transparent and 0xff fully opaque.java.lang.IllegalArgumentException
- if the given argument is not between 0x0 and 0xff.public void showYourself(boolean appearSwitchedOn)
showYourself
in class ej.fp.Widget
public void start()
start
in class ej.fp.widget.MicroUIDisplay
public void dispose()
dispose
in class ej.fp.Widget
public ej.fp.Image getCurrentSkin()
getCurrentSkin
in class ej.fp.Widget
public ej.fp.Image getDrawingBuffer()
getDrawingBuffer
in class ej.fp.widget.MicroUIDisplay
public int getInitialColor()
public boolean hasBacklight()
hasBacklight
in class ej.fp.widget.MicroUIDisplay
public void flush(int x, int y, int width, int height)
flush
in class ej.fp.widget.MicroUIDisplay
protected ej.fp.Image newDisplayImage()
protected ej.fp.Image newWidgetImage()
protected void drawContrast(ej.fp.Image imageSkin)
The default implementation performs nothing.
imageSkin
- the image where applying the algorithm.protected void drawBacklight(ej.fp.Image imageSkin)
imageSkin
- the image where applying the algorithm.