org.apache.poi.xssf.streaming
Class SXSSFDrawing

java.lang.Object
  extended by org.apache.poi.xssf.streaming.SXSSFDrawing
All Implemented Interfaces:
java.lang.Iterable<XSSFShape>, Drawing<XSSFShape>, ShapeContainer<XSSFShape>

public class SXSSFDrawing
extends java.lang.Object
implements Drawing<XSSFShape>

Streaming version of Drawing. Delegates most tasks to the non-streaming XSSF code. TODO: Potentially, Comment and Chart need a similar streaming wrapper like Picture.


Constructor Summary
SXSSFDrawing(SXSSFWorkbook workbook, XSSFDrawing drawing)
           
 
Method Summary
 ClientAnchor createAnchor(int dx1, int dy1, int dx2, int dy2, int col1, int row1, int col2, int row2)
          Creates a new client anchor and sets the top-left and bottom-right coordinates of the anchor.
 Comment createCellComment(ClientAnchor anchor)
          Creates a comment.
 Chart createChart(ClientAnchor anchor)
          Creates a chart.
 ObjectData createObjectData(ClientAnchor anchor, int storageId, int pictureIndex)
          Adds a new OLE Package Shape
 SXSSFPicture createPicture(ClientAnchor anchor, int pictureIndex)
          Creates a picture.
 java.util.Iterator<XSSFShape> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SXSSFDrawing

public SXSSFDrawing(SXSSFWorkbook workbook,
                    XSSFDrawing drawing)
Method Detail

createPicture

public SXSSFPicture createPicture(ClientAnchor anchor,
                                  int pictureIndex)
Description copied from interface: Drawing
Creates a picture.

Specified by:
createPicture in interface Drawing<XSSFShape>
Parameters:
anchor - the client anchor describes how this picture is attached to the sheet.
pictureIndex - the index of the picture in the workbook collection of pictures.
Returns:
the newly created picture.

createCellComment

public Comment createCellComment(ClientAnchor anchor)
Description copied from interface: Drawing
Creates a comment.

Specified by:
createCellComment in interface Drawing<XSSFShape>
Parameters:
anchor - the client anchor describes how this comment is attached to the sheet.
Returns:
the newly created comment.

createChart

public Chart createChart(ClientAnchor anchor)
Description copied from interface: Drawing
Creates a chart.

Specified by:
createChart in interface Drawing<XSSFShape>
Parameters:
anchor - the client anchor describes how this chart is attached to the sheet.
Returns:
the newly created chart

createAnchor

public ClientAnchor createAnchor(int dx1,
                                 int dy1,
                                 int dx2,
                                 int dy2,
                                 int col1,
                                 int row1,
                                 int col2,
                                 int row2)
Description copied from interface: Drawing
Creates a new client anchor and sets the top-left and bottom-right coordinates of the anchor.

Specified by:
createAnchor in interface Drawing<XSSFShape>
Parameters:
dx1 - the x coordinate in EMU within the first cell.
dy1 - the y coordinate in EMU within the first cell.
dx2 - the x coordinate in EMU within the second cell.
dy2 - the y coordinate in EMU within the second cell.
col1 - the column (0 based) of the first cell.
row1 - the row (0 based) of the first cell.
col2 - the column (0 based) of the second cell.
row2 - the row (0 based) of the second cell.
Returns:
the newly created client anchor

createObjectData

public ObjectData createObjectData(ClientAnchor anchor,
                                   int storageId,
                                   int pictureIndex)
Description copied from interface: Drawing
Adds a new OLE Package Shape

Specified by:
createObjectData in interface Drawing<XSSFShape>
Parameters:
anchor - the client anchor describes how this picture is attached to the sheet.
storageId - the storageId returned by Workbook.addOlePackage(byte[], String, String, String)
pictureIndex - the index of the picture (used as preview image) in the workbook collection of pictures.
Returns:
newly created shape

iterator

public java.util.Iterator<XSSFShape> iterator()
Specified by:
iterator in interface java.lang.Iterable<XSSFShape>


Copyright 2017 The Apache Software Foundation or its licensors, as applicable.