APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.glass.ui.monocle

pack-priv Class EPDSettings

extends Object
Class Inheritance
Imports
com.sun.javafx.logging.PlatformLogger, .PlatformLogger.Level, com.sun.javafx.util.Logging, java.text.MessageFormat, java.util.Arrays, .HashMap

Provides the values of the EPD system properties.

Field Summary

Modifier and TypeField and Description
private static final String
BITS_PER_PIXEL

Sets the frame buffer color depth and pixel format: 8 for 8-bit grayscale in the Y8 pixel format, 16 for 16-bit color in the RGB565 pixel format, or 32 for 32-bit color in the ARGB32 pixel format.

private static final int
private static final int[]
pack-priv final int
private static final String[]
private static final String
FIX_WIDTH_Y8UR

Indicates whether to work around the bug found on devices, such as the Kobo Clara HD Model N249, which require a screen width equal to the visible x-resolution, instead of the normal virtual x-resolution, when using an 8-bit, unrotated, and uninverted frame buffer in the Y8 pixel format: true to work around the bug; otherwise false.

private final boolean
private static final String
FLAG_ENABLE_INVERSION

Sets the update flag for pixel inversion: true to invert the pixels of each update; otherwise false.

private static final String
FLAG_FORCE_MONOCHROME

Sets the update flag for monochrome conversion: true to convert the pixels of each update to pure black and white using a 50-percent threshold; otherwise false.

private static final String
FLAG_USE_DITHERING_Y1

Sets the update flag for 1-bit dithering: true to dither each update in an 8-bit Y8 frame buffer to 1-bit black and white, if available; otherwise false.

private static final String
FLAG_USE_DITHERING_Y4

Sets the update flag for 4-bit dithering: true to dither each update in an 8-bit Y8 frame buffer to 4-bit grayscale, if available; otherwise false.

private final boolean
private final boolean
pack-priv final int
private final boolean
private final boolean
pack-priv final boolean
pack-priv final int
private final PlatformLogger
private static final String
NO_WAIT

Indicates whether to wait for the previous update to complete before sending the next update: true to avoid waiting and send updates as quickly as possible; otherwise false.

pack-priv final boolean
private static final String
ROTATE

Sets the frame buffer rotation: 0 for unrotated (UR), 1 for 90 degrees clockwise (CW), 2 for 180 degrees upside-down (UD), and 3 for 90 degrees counter-clockwise (CCW).

pack-priv final int
private static final int
private static final int[]
private static final String
WAVEFORM_MODE

Sets the waveform mode used for updates: 1 for black-and-white direct update (DU), 2 for 16 levels of gray (GC16), 3 for 4 levels of gray (GC4), 4 for pure black-and-white animation (A2), and 257 for the automatic selection of waveform mode based on the number of gray levels in the update (AUTO).

private static final int
private static final int[]
pack-priv final int
private static final String
Y8_INVERTED

Sets an indicator for the frame buffer grayscale value: true to invert the pixels of all updates when using 8-bit grayscale in the Y8 pixel format; otherwise false.

private final boolean

Constructor Summary

AccessConstructor and Description
private
EPDSettings()

Creates a new EPDSettings, capturing the current values of the EPD system properties.

Method Summary

Modifier and TypeMethod and Description
private int

Returns:

the value provided for the property if it is equal to one of the permitted values; otherwise, the default value
getInteger
(String
the property name
key
,
int
the default value
def
,
int...
a list of the permitted values for the property
list
)

Gets an integer system property.

pack-priv static EPDSettings

Returns:

a new EPDSettings instance
newInstance
()

Obtains a new instance of this class with the current values of the EPD system properties.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

BITS_PER_PIXELback to summary
private static final String BITS_PER_PIXEL

Sets the frame buffer color depth and pixel format: 8 for 8-bit grayscale in the Y8 pixel format, 16 for 16-bit color in the RGB565 pixel format, or 32 for 32-bit color in the ARGB32 pixel format. The default is 32.

Using the 32-bit format allows JavaFX to render directly into the Linux frame buffer and avoid the step of copying and converting each pixel from an off-screen composition buffer.

Implementation Note

Corresponds to the bits_per_pixel field of fb_var_screeninfo in linux/fb.h.

BITS_PER_PIXEL_DEFAULTback to summary
private static final int BITS_PER_PIXEL_DEFAULT
BITS_PER_PIXEL_PERMITTEDback to summary
private static final int[] BITS_PER_PIXEL_PERMITTED
bitsPerPixelback to summary
pack-priv final int bitsPerPixel
EPD_PROPERTIESback to summary
private static final String[] EPD_PROPERTIES
FIX_WIDTH_Y8URback to summary
private static final String FIX_WIDTH_Y8UR

Indicates whether to work around the bug found on devices, such as the Kobo Clara HD Model N249, which require a screen width equal to the visible x-resolution, instead of the normal virtual x-resolution, when using an 8-bit, unrotated, and uninverted frame buffer in the Y8 pixel format: true to work around the bug; otherwise false. The default is false.

fixWidthY8URback to summary
private final boolean fixWidthY8UR
FLAG_ENABLE_INVERSIONback to summary
private static final String FLAG_ENABLE_INVERSION

Sets the update flag for pixel inversion: true to invert the pixels of each update; otherwise false. The default is false.

Implementation Note

Corresponds to the EPDC_FLAG_ENABLE_INVERSION constant in linux/mxcfb.h.

FLAG_FORCE_MONOCHROMEback to summary
private static final String FLAG_FORCE_MONOCHROME

Sets the update flag for monochrome conversion: true to convert the pixels of each update to pure black and white using a 50-percent threshold; otherwise false. The default is false.

Implementation Note

Corresponds to the EPDC_FLAG_FORCE_MONOCHROME constant in linux/mxcfb.h.

FLAG_USE_DITHERING_Y1back to summary
private static final String FLAG_USE_DITHERING_Y1

Sets the update flag for 1-bit dithering: true to dither each update in an 8-bit Y8 frame buffer to 1-bit black and white, if available; otherwise false. The default is false.

Implementation Note

Corresponds to the EPDC_FLAG_USE_DITHERING_Y1 constant in linux/mxcfb.h.

FLAG_USE_DITHERING_Y4back to summary
private static final String FLAG_USE_DITHERING_Y4

Sets the update flag for 4-bit dithering: true to dither each update in an 8-bit Y8 frame buffer to 4-bit grayscale, if available; otherwise false. The default is false.

Implementation Note

Corresponds to the EPDC_FLAG_USE_DITHERING_Y4 constant in linux/mxcfb.h.

flagEnableInversionback to summary
private final boolean flagEnableInversion
flagForceMonochromeback to summary
private final boolean flagForceMonochrome
flagsback to summary
pack-priv final int flags
flagUseDitheringY1back to summary
private final boolean flagUseDitheringY1
flagUseDitheringY4back to summary
private final boolean flagUseDitheringY4
getWidthVisibleback to summary
pack-priv final boolean getWidthVisible
grayscaleback to summary
pack-priv final int grayscale
loggerback to summary
private final PlatformLogger logger
NO_WAITback to summary
private static final String NO_WAIT

Indicates whether to wait for the previous update to complete before sending the next update: true to avoid waiting and send updates as quickly as possible; otherwise false. The default is false.

The number of outstanding updates is limited by the device controller to either 16 or 64 concurrent non-colliding updates, depending on the model. A value of true may result in errors if the maximum number of concurrent non-colliding updates is exceeded.

Implementation Note

Corresponds to the IOCTL call constant MXCFB_WAIT_FOR_UPDATE_COMPLETE in linux/mxcfb.h.

noWaitback to summary
pack-priv final boolean noWait
ROTATEback to summary
private static final String ROTATE

Sets the frame buffer rotation: 0 for unrotated (UR), 1 for 90 degrees clockwise (CW), 2 for 180 degrees upside-down (UD), and 3 for 90 degrees counter-clockwise (CCW). The default is 0.

The unrotated and upside-down settings are in landscape mode, while the clockwise and counter-clockwise settings are in portrait.

Implementation Note

Corresponds to the rotate field of fb_var_screeninfo in linux/fb.h.

rotateback to summary
pack-priv final int rotate
ROTATE_DEFAULTback to summary
private static final int ROTATE_DEFAULT
ROTATIONS_PERMITTEDback to summary
private static final int[] ROTATIONS_PERMITTED
WAVEFORM_MODEback to summary
private static final String WAVEFORM_MODE

Sets the waveform mode used for updates: 1 for black-and-white direct update (DU), 2 for 16 levels of gray (GC16), 3 for 4 levels of gray (GC4), 4 for pure black-and-white animation (A2), and 257 for the automatic selection of waveform mode based on the number of gray levels in the update (AUTO). The default is 257.

Automatic selection chooses one of 1 (DU), 2 (GC16), or 3 (GC4). If the waveform mode is set to 2 (GC16), it may be upgraded to a compatible but optimized mode internal to the driver, if available.

Implementation Note

Corresponds to the waveform_mode field of mxcfb_update_data in linux/mxcfb.h.

WAVEFORM_MODE_DEFAULTback to summary
private static final int WAVEFORM_MODE_DEFAULT
WAVEFORM_MODES_PERMITTEDback to summary
private static final int[] WAVEFORM_MODES_PERMITTED
waveformModeback to summary
pack-priv final int waveformMode
Y8_INVERTEDback to summary
private static final String Y8_INVERTED

Sets an indicator for the frame buffer grayscale value: true to invert the pixels of all updates when using 8-bit grayscale in the Y8 pixel format; otherwise false. The default is false.

The value is ignored when the frame buffer is not set to 8-bit grayscale in the Y8 pixel format.

Implementation Note

Corresponds to the GRAYSCALE_8BIT_INVERTED constant in linux/mxcfb.h.

y8invertedback to summary
private final boolean y8inverted

Constructor Detail

EPDSettingsback to summary
private EPDSettings()

Creates a new EPDSettings, capturing the current values of the EPD system properties.

Method Detail

getIntegerback to summary
private int getInteger(String key, int def, int... list)

Gets an integer system property.

Parameters
key:String

the property name

def:int

the default value

list:int[]

a list of the permitted values for the property

Returns:int

the value provided for the property if it is equal to one of the permitted values; otherwise, the default value

newInstanceback to summary
pack-priv static EPDSettings newInstance()

Obtains a new instance of this class with the current values of the EPD system properties.

Returns:EPDSettings

a new EPDSettings instance

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override