org.apache.poi.xssf.usermodel.XSSFPicture.prototype()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中org.apache.poi.xssf.usermodel.XSSFPicture.prototype()方法的一些代码示例,展示了XSSFPicture.prototype()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSSFPicture.prototype()方法的具体详情如下:
包路径:org.apache.poi.xssf.usermodel.XSSFPicture
类名称:XSSFPicture
方法名:prototype

XSSFPicture.prototype介绍

[英]A default instance of CTShape used for creating new shapes.
[中]用于创建新形状的CTShape的默认实例。

代码示例

代码示例来源:origin: org.apache.poi/poi-ooxml

/**
 * Creates a picture.
 *
 * @param anchor       the client anchor describes how this picture is attached to the sheet.
 * @param pictureIndex the index of the picture in the workbook collection of pictures,
 *                     {@link XSSFWorkbook#getAllPictures()} .
 * @return the newly created picture shape.
 */
public XSSFPicture createPicture(XSSFClientAnchor anchor, int pictureIndex) {
  PackageRelationship rel = getDrawing().addPictureReference(pictureIndex);
  CTPicture ctShape = ctGroup.addNewPic();
  ctShape.set(XSSFPicture.prototype());
  XSSFPicture shape = new XSSFPicture(getDrawing(), ctShape);
  shape.parent = this;
  shape.anchor = anchor;
  shape.setPictureReference(rel);
  return shape;
}

代码示例来源:origin: org.apache.poi/poi-ooxml

/**
 * Creates a picture.
 *
 * @param anchor
 *            the client anchor describes how this picture is attached to
 *            the sheet.
 * @param pictureIndex
 *            the index of the picture in the workbook collection of
 *            pictures,
 *            {@link org.apache.poi.xssf.usermodel.XSSFWorkbook#getAllPictures()}
 *            .
 *
 * @return the newly created picture shape.
 */
public XSSFPicture createPicture(XSSFClientAnchor anchor, int pictureIndex) {
  PackageRelationship rel = addPictureReference(pictureIndex);
  long shapeId = newShapeId();
  CTTwoCellAnchor ctAnchor = createTwoCellAnchor(anchor);
  CTPicture ctShape = ctAnchor.addNewPic();
  ctShape.set(XSSFPicture.prototype());
  ctShape.getNvPicPr().getCNvPr().setId(shapeId);
  XSSFPicture shape = new XSSFPicture(this, ctShape);
  shape.anchor = anchor;
  shape.setPictureReference(rel);
  ctShape.getSpPr().setXfrm(createXfrm(anchor));
  return shape;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 * Creates a picture.
 *
 * @param anchor       the client anchor describes how this picture is attached to the sheet.
 * @param pictureIndex the index of the picture in the workbook collection of pictures,
 *                     {@link XSSFWorkbook#getAllPictures()} .
 * @return the newly created picture shape.
 */
public XSSFPicture createPicture(XSSFClientAnchor anchor, int pictureIndex) {
  PackageRelationship rel = getDrawing().addPictureReference(pictureIndex);
  CTPicture ctShape = ctGroup.addNewPic();
  ctShape.set(XSSFPicture.prototype());
  XSSFPicture shape = new XSSFPicture(getDrawing(), ctShape);
  shape.parent = this;
  shape.anchor = anchor;
  shape.setPictureReference(rel);
  return shape;
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * Creates a picture.
 *
 * @param anchor       the client anchor describes how this picture is attached to the sheet.
 * @param pictureIndex the index of the picture in the workbook collection of pictures,
 *                     {@link XSSFWorkbook#getAllPictures()} .
 * @return the newly created picture shape.
 */
public XSSFPicture createPicture(XSSFClientAnchor anchor, int pictureIndex) {
  PackageRelationship rel = getDrawing().addPictureReference(pictureIndex);
  CTPicture ctShape = ctGroup.addNewPic();
  ctShape.set(XSSFPicture.prototype());
  XSSFPicture shape = new XSSFPicture(getDrawing(), ctShape);
  shape.parent = this;
  shape.anchor = anchor;
  shape.setPictureReference(rel);
  return shape;
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * Creates a picture.
 *
 * @param anchor    the client anchor describes how this picture is attached to the sheet.
 * @param pictureIndex the index of the picture in the workbook collection of pictures,
 *   {@link org.apache.poi.xssf.usermodel.XSSFWorkbook#getAllPictures()} .
 *
 * @return  the newly created picture shape.
 */
public XSSFPicture createPicture(XSSFClientAnchor anchor, int pictureIndex)
{
  PackageRelationship rel = addPictureReference(pictureIndex);
  long shapeId = newShapeId();
  CTTwoCellAnchor ctAnchor = createTwoCellAnchor(anchor);
  CTPicture ctShape = ctAnchor.addNewPic();
  ctShape.set(XSSFPicture.prototype());
  ctShape.getNvPicPr().getCNvPr().setId(shapeId);
  XSSFPicture shape = new XSSFPicture(this, ctShape);
  shape.anchor = anchor;
  shape.setPictureReference(rel);
  return shape;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 * Creates a picture.
 *
 * @param anchor
 *            the client anchor describes how this picture is attached to
 *            the sheet.
 * @param pictureIndex
 *            the index of the picture in the workbook collection of
 *            pictures,
 *            {@link org.apache.poi.xssf.usermodel.XSSFWorkbook#getAllPictures()}
 *            .
 *
 * @return the newly created picture shape.
 */
public XSSFPicture createPicture(XSSFClientAnchor anchor, int pictureIndex) {
  PackageRelationship rel = addPictureReference(pictureIndex);
  long shapeId = newShapeId();
  CTTwoCellAnchor ctAnchor = createTwoCellAnchor(anchor);
  CTPicture ctShape = ctAnchor.addNewPic();
  ctShape.set(XSSFPicture.prototype());
  ctShape.getNvPicPr().getCNvPr().setId(shapeId);
  XSSFPicture shape = new XSSFPicture(this, ctShape);
  shape.anchor = anchor;
  shape.setPictureReference(rel);
  ctShape.getSpPr().setXfrm(createXfrm(anchor));
  return shape;
}

相关文章