Example usage for org.apache.poi.xssf.usermodel XSSFPictureData getMimeType

List of usage examples for org.apache.poi.xssf.usermodel XSSFPictureData getMimeType

Introduction

In this page you can find the example usage for org.apache.poi.xssf.usermodel XSSFPictureData getMimeType.

Prototype

public String getMimeType() 

Source Link

Usage

From source file:com.vaadin.addon.spreadsheet.SpreadsheetFactory.java

License:Open Source License

private static SheetImageWrapper loadXSSFPicture(XSSFPicture shape) {
    // in XSSFPicture.getPreferredSize(double) POI presumes that
    // XSSFAnchor is always of type XSSFClientAnchor
    XSSFClientAnchor anchor = (XSSFClientAnchor) shape.getAnchor();

    XSSFPictureData pictureData = shape.getPictureData();

    SheetImageWrapper image = new SheetImageWrapper(anchor, pictureData.getMimeType(), pictureData.getData());

    return image;
}