org.apache.poi.xssf.usermodel
Class XSSFDrawing

java.lang.Object
  extended by org.apache.poi.POIXMLDocumentPart
      extended by org.apache.poi.xssf.usermodel.XSSFDrawing
All Implemented Interfaces:
org.apache.poi.ss.usermodel.Drawing

public final class XSSFDrawing
extends POIXMLDocumentPart
implements org.apache.poi.ss.usermodel.Drawing

Represents a SpreadsheetML drawing

Author:
Yegor Kozlov

Field Summary
 
Fields inherited from class org.apache.poi.POIXMLDocumentPart
DEFAULT_XML_OPTIONS
 
Method Summary
 org.apache.poi.ss.usermodel.ClientAnchor createAnchor(int dx1, int dy1, int dx2, int dy2, int col1, int row1, int col2, int row2)
           
 org.apache.poi.ss.usermodel.Comment createCellComment(org.apache.poi.ss.usermodel.ClientAnchor anchor)
          Creates a comment.
 org.apache.poi.ss.usermodel.Chart createChart(org.apache.poi.ss.usermodel.ClientAnchor anchor)
           
 XSSFChart createChart(XSSFClientAnchor anchor)
          Creates a chart.
 XSSFConnector createConnector(XSSFClientAnchor anchor)
          Creates a simple shape.
 XSSFShapeGroup createGroup(XSSFClientAnchor anchor)
          Creates a simple shape.
 org.apache.poi.ss.usermodel.Picture createPicture(org.apache.poi.ss.usermodel.ClientAnchor anchor, int pictureIndex)
           
 XSSFPicture createPicture(XSSFClientAnchor anchor, int pictureIndex)
          Creates a picture.
 XSSFSimpleShape createSimpleShape(XSSFClientAnchor anchor)
          Creates a simple shape.
 XSSFTextBox createTextbox(XSSFClientAnchor anchor)
          Constructs a textbox under the drawing.
 java.util.List getCharts()
          Returns all charts in this drawing.
 org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTDrawing getCTDrawing()
          Return the underlying CTDrawing bean, the root element of the SpreadsheetML Drawing part.
 java.util.List getShapes()
           
 
Methods inherited from class org.apache.poi.POIXMLDocumentPart
addRelation, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelationById, getRelationId, getRelations, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getCTDrawing

public org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTDrawing getCTDrawing()
Return the underlying CTDrawing bean, the root element of the SpreadsheetML Drawing part.

Returns:
the underlying CTDrawing bean

createAnchor

public org.apache.poi.ss.usermodel.ClientAnchor createAnchor(int dx1,
                                                             int dy1,
                                                             int dx2,
                                                             int dy2,
                                                             int col1,
                                                             int row1,
                                                             int col2,
                                                             int row2)
Specified by:
createAnchor in interface org.apache.poi.ss.usermodel.Drawing

createTextbox

public XSSFTextBox createTextbox(XSSFClientAnchor anchor)
Constructs a textbox under the drawing.

Parameters:
anchor - the client anchor describes how this group is attached to the sheet.
Returns:
the newly created textbox.

createPicture

public XSSFPicture createPicture(XSSFClientAnchor anchor,
                                 int pictureIndex)
Creates a picture.

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, XSSFWorkbook.getAllPictures() .
Returns:
the newly created picture shape.

createPicture

public org.apache.poi.ss.usermodel.Picture createPicture(org.apache.poi.ss.usermodel.ClientAnchor anchor,
                                                         int pictureIndex)
Specified by:
createPicture in interface org.apache.poi.ss.usermodel.Drawing

createChart

public XSSFChart createChart(XSSFClientAnchor anchor)
Creates a chart.

Parameters:
anchor - the client anchor describes how this chart is attached to the sheet.
Returns:
the newly created chart
See Also:
createChart(ClientAnchor)

createChart

public org.apache.poi.ss.usermodel.Chart createChart(org.apache.poi.ss.usermodel.ClientAnchor anchor)
Specified by:
createChart in interface org.apache.poi.ss.usermodel.Drawing

createSimpleShape

public XSSFSimpleShape createSimpleShape(XSSFClientAnchor anchor)
Creates a simple shape. This includes such shapes as lines, rectangles, and ovals.

Parameters:
anchor - the client anchor describes how this group is attached to the sheet.
Returns:
the newly created shape.

createConnector

public XSSFConnector createConnector(XSSFClientAnchor anchor)
Creates a simple shape. This includes such shapes as lines, rectangles, and ovals.

Parameters:
anchor - the client anchor describes how this group is attached to the sheet.
Returns:
the newly created shape.

createGroup

public XSSFShapeGroup createGroup(XSSFClientAnchor anchor)
Creates a simple shape. This includes such shapes as lines, rectangles, and ovals.

Parameters:
anchor - the client anchor describes how this group is attached to the sheet.
Returns:
the newly created shape.

createCellComment

public org.apache.poi.ss.usermodel.Comment createCellComment(org.apache.poi.ss.usermodel.ClientAnchor anchor)
Creates a comment.

Specified by:
createCellComment in interface org.apache.poi.ss.usermodel.Drawing
Parameters:
anchor - the client anchor describes how this comment is attached to the sheet.
Returns:
the newly created comment.

getCharts

public java.util.List getCharts()
Returns all charts in this drawing.


getShapes

public java.util.List getShapes()
Returns:
list of shapes in this drawing