[]
        
(Showing Draft Content)

CellPicture

Class CellPicture

java.lang.Object
com.grapecity.documents.excel.CellPicture

public class CellPicture extends Object
Represents a picture embedded in a cell (Picture-In-Cell).
  • Constructor Summary

    Constructors
    Constructor
    Description
    CellPicture(byte[] imageData)
    Initializes a new instance of the CellPicture class with the specified image data.The provided array is copied, so subsequent changes to the input array do not affect this instance.
    CellPicture(byte[] imageData, String altText)
    Initializes a new instance of the CellPicture class with the specified image data and alt text.The provided array is copied, so subsequent changes to the input array do not affect this instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the alt text of the picture.
    byte[]
    Gets a copy of the image binary data.
    void
    setAltText(String altText)
    Sets the alt text of the picture.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CellPicture

      public CellPicture(byte[] imageData)
      Initializes a new instance of the CellPicture class with the specified image data.The provided array is copied, so subsequent changes to the input array do not affect this instance.
      Parameters:
      imageData - The image binary data. Supported types: PNG, JPG, GIF, BMP, SVG.
    • CellPicture

      public CellPicture(byte[] imageData, String altText)
      Initializes a new instance of the CellPicture class with the specified image data and alt text.The provided array is copied, so subsequent changes to the input array do not affect this instance.
      Parameters:
      imageData - The image binary data. Supported types: PNG, JPG, GIF, BMP, SVG.
      altText - The alt text of the picture.
  • Method Details

    • getImageData

      public byte[] getImageData()
      Gets a copy of the image binary data.
      Returns:
      A copy of the image binary data, or null if no image data exists.Modifying the returned array does not affect the data stored in this CellPicture.
    • getAltText

      public String getAltText()
      Gets the alt text of the picture. The alt text is also used as the display value for Filter and Sort.
      Returns:
      The alt text of the picture.
    • setAltText

      public void setAltText(String altText)
      Sets the alt text of the picture. After modification, it must be reassigned to IRange.setCellPicture(CellPicture) to take effect.
      Parameters:
      altText - The alt text of the picture.