Intel

Developer Zone

Image

com.intel.ui

Class Image



  • public abstract class Image
    extends Widget
    This abstract class represents a leaf Widget 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 throw UiNotSupportedException.
      byte getFormat()
      Returns the format of the image
      byte[] getImage()
      Returns the image buffer.
      void releaseImage()
      This method is deprecated.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, toString
    • 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 this Widget 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 the Widget
        relLocation - The relative location from the parent Widget
        format - The Image format
        imageData - A buffer representing the Image 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/or Widget.MAX_HEIGHT.
        • Image location exceeds upper bound Widget.MAX_WIDTH and/or Widget.MAX_HEIGHT.
        • The provided image format is not supported.
        • imageData size does not match the dimensions provided in size parameter.
        UiException
      • addImageBlock

        public void addImageBlock(byte[] block,
                         int offset,
                         int length)
        This method is deprecated. Call to this method will cause to UiNotSupportedException 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 throw UiNotSupportedException.
        Overrides:
        getColor in class Widget
        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