com.intel.ui
Class Image
- java.lang.Object
-
- com.intel.ui.Widget
-
- com.intel.ui.Image
-
public abstract class Image extends Widget
This abstract class represents a leafWidget
which is a Bitmap image with a given format to be drawn.
-
-
Field Summary
Fields Modifier and Type Field and Description static byte
FORMAT_RGB_24BPP
Standard RGB color format: bits 0-7 are blue, bits 8-15 are green, bits 16-23 are red.static byte
FORMAT_RGB_32BPP
XRGB color format: bits 0-7 are blue, bits 8-15 are green, bits 16-23 are red, bits 24-31 are reserved.
-
Method Summary
Methods Modifier and Type Method and Description void
addImageBlock(byte[] block, int offset, int length)
This method is deprecated.static Image
create(short id, XYPair size, XYPair relLocation, byte format)
This method is deprecated.static Image
create(short id, XYPair size, XYPair relLocation, byte format, byte[] imageData)
Factory method for creating a concrete instance initialized with the specified parameters.int
getColor()
This method is not supported for this widget type and will throwUiNotSupportedException
.byte
getFormat()
Returns the format of the imagebyte[]
getImage()
Returns the image buffer.void
releaseImage()
This method is deprecated.-
Methods inherited from class com.intel.ui.Widget
getId, getRelativeLocation, getSize
-
-
-
-
Field Detail
-
FORMAT_RGB_32BPP
public static final byte FORMAT_RGB_32BPP
XRGB color format: bits 0-7 are blue, bits 8-15 are green, bits 16-23 are red, bits 24-31 are reserved.- See Also:
- Constant Field Values
-
FORMAT_RGB_24BPP
public static final byte FORMAT_RGB_24BPP
Standard RGB color format: bits 0-7 are blue, bits 8-15 are green, bits 16-23 are red.- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static final Image create(short id, XYPair size, XYPair relLocation, byte format, byte[] imageData) throws UiException
Factory method for creating a concrete instance initialized with the specified parameters.- Parameters:
id
- An ID representing thisWidget
for quick reference by the calling application. The ID does not have to be unique and is not used internally by the package.size
- The size of theWidget
relLocation
- The relative location from the parentWidget
format
- TheImage
formatimageData
- A buffer representing theImage
in the specified format. Data is not duplicated.- Returns:
Image
instance- Throws:
UiIllegalParameterException
- in one of the following cases:- Image size is negative.
- Image location is negative.
- Image size exceeds upper bound
Widget.MAX_WIDTH
and/orWidget.MAX_HEIGHT
. - Image location exceeds upper bound
Widget.MAX_WIDTH
and/orWidget.MAX_HEIGHT
. - The provided image format is not supported.
-
imageData
size does not match the dimensions provided insize
parameter.
UiException
-
create
public static final Image create(short id, XYPair size, XYPair relLocation, byte format) throws UiException
This method is deprecated. Call to this method will cause toUiNotSupportedException
to be thrown.- Throws:
UiNotSupportedException
- alwaysUiException
-
releaseImage
public void releaseImage() throws UiException
This method is deprecated. Call to this method will cause toUiNotSupportedException
to be thrown.- Throws:
UiNotSupportedException
- alwaysUiException
-
addImageBlock
public void addImageBlock(byte[] block, int offset, int length)
This method is deprecated. Call to this method will cause toUiNotSupportedException
to be thrown.- Throws:
UiNotSupportedException
- always
-
getFormat
public byte getFormat()
Returns the format of the image- Returns:
- Returns the format of the image
-
getImage
public byte[] getImage()
Returns the image buffer.- Returns:
- Returns the image buffer. Data is not duplicated.
-
getColor
public int getColor() throws UiException
This method is not supported for this widget type and will throwUiNotSupportedException
.- Overrides:
getColor
in classWidget
- Returns:
- Returns the RGB color of the widget (bits 0-7 are blue, bits 8-15 are green, bits 16-23 are red, bits 24-31 are reserved).
- Throws:
UiNotSupportedException
- always.UiException
-
-