|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.POIXMLDocumentPart org.apache.poi.xssf.usermodel.XSSFDrawing
public final class XSSFDrawing
Represents a SpreadsheetML drawing
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.poi.POIXMLDocumentPart |
---|
POIXMLDocumentPart.RelationPart |
Field Summary | |
---|---|
protected static java.lang.String |
NAMESPACE_A
|
protected static java.lang.String |
NAMESPACE_C
|
Constructor Summary | |
---|---|
protected |
XSSFDrawing()
Create a new SpreadsheetML drawing |
|
XSSFDrawing(PackagePart part)
Construct a SpreadsheetML drawing from a package part |
Method Summary | |
---|---|
protected PackageRelationship |
addPictureReference(int pictureIndex)
Add the indexed picture to this drawing relations |
protected void |
commit()
Save the content in the underlying package part. |
XSSFClientAnchor |
createAnchor(int dx1,
int dy1,
int dx2,
int dy2,
int col1,
int row1,
int col2,
int row2)
|
XSSFComment |
createCellComment(ClientAnchor anchor)
Creates a comment. |
XSSFChart |
createChart(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. |
XSSFObjectData |
createObjectData(ClientAnchor anchor,
int storageId,
int pictureIndex)
|
XSSFPicture |
createPicture(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<XSSFChart> |
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<XSSFShape> |
getShapes()
|
java.util.List<XSSFShape> |
getShapes(XSSFShapeGroup groupshape)
|
XSSFSheet |
getSheet()
|
java.util.Iterator<XSSFShape> |
iterator()
|
Methods inherited from class org.apache.poi.POIXMLDocumentPart |
---|
_invokeOnDocumentRead, addRelation, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getRelationById, getRelationId, getRelationParts, getRelations, getTargetPart, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, prepareForCommit, read, rebase, removeRelation, removeRelation, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String NAMESPACE_A
protected static final java.lang.String NAMESPACE_C
Constructor Detail |
---|
protected XSSFDrawing()
XSSFSheet.createDrawingPatriarch()
public XSSFDrawing(PackagePart part) throws java.io.IOException, org.apache.xmlbeans.XmlException
part
- the package part holding the drawing data,
the content type must be application/vnd.openxmlformats-officedocument.drawing+xml
java.io.IOException
org.apache.xmlbeans.XmlException
Method Detail |
---|
@Internal public org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTDrawing getCTDrawing()
protected void commit() throws java.io.IOException
POIXMLDocumentPart
protected void commit() throws IOException { PackagePart part = getPackagePart(); OutputStream out = part.getOutputStream(); XmlObject bean = getXmlBean(); //the "model" which holds changes in memory bean.save(out, DEFAULT_XML_OPTIONS); out.close(); }
commit
in class POIXMLDocumentPart
java.io.IOException
- a subclass may throw an IOException if the changes can't be committedpublic XSSFClientAnchor createAnchor(int dx1, int dy1, int dx2, int dy2, int col1, int row1, int col2, int row2)
createAnchor
in interface Drawing<XSSFShape>
public XSSFTextBox createTextbox(XSSFClientAnchor anchor)
anchor
- the client anchor describes how this group is attached
to the sheet.
public XSSFPicture createPicture(XSSFClientAnchor anchor, int pictureIndex)
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()
.
public XSSFPicture createPicture(ClientAnchor anchor, int pictureIndex)
createPicture
in interface Drawing<XSSFShape>
public XSSFChart createChart(XSSFClientAnchor anchor)
anchor
- the client anchor describes how this chart is attached to
the sheet.
createChart(ClientAnchor)
public XSSFChart createChart(ClientAnchor anchor)
createChart
in interface Drawing<XSSFShape>
protected PackageRelationship addPictureReference(int pictureIndex)
pictureIndex
- the index of the picture in the workbook collection of pictures,
XSSFWorkbook.getAllPictures()
.public XSSFSimpleShape createSimpleShape(XSSFClientAnchor anchor)
anchor
- the client anchor describes how this group is attached
to the sheet.
public XSSFConnector createConnector(XSSFClientAnchor anchor)
anchor
- the client anchor describes how this group is attached
to the sheet.
public XSSFShapeGroup createGroup(XSSFClientAnchor anchor)
anchor
- the client anchor describes how this group is attached
to the sheet.
public XSSFComment createCellComment(ClientAnchor anchor)
createCellComment
in interface Drawing<XSSFShape>
anchor
- the client anchor describes how this comment is attached
to the sheet.
public XSSFObjectData createObjectData(ClientAnchor anchor, int storageId, int pictureIndex)
createObjectData
in interface Drawing<XSSFShape>
public java.util.List<XSSFChart> getCharts()
public java.util.List<XSSFShape> getShapes()
public java.util.List<XSSFShape> getShapes(XSSFShapeGroup groupshape)
public java.util.Iterator<XSSFShape> iterator()
iterator
in interface java.lang.Iterable<XSSFShape>
public XSSFSheet getSheet()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |