Package org.apache.poi.hslf.usermodel
Class HSLFObjectShape
- java.lang.Object
 - 
- org.apache.poi.hslf.usermodel.HSLFShape
 - 
- org.apache.poi.hslf.usermodel.HSLFSimpleShape
 - 
- org.apache.poi.hslf.usermodel.HSLFPictureShape
 - 
- org.apache.poi.hslf.usermodel.HSLFObjectShape
 
 
 
 
 
- 
- All Implemented Interfaces:
 IAdjustableShape,ObjectShape<HSLFShape,HSLFTextParagraph>,PictureShape<HSLFShape,HSLFTextParagraph>,PlaceableShape<HSLFShape,HSLFTextParagraph>,Shape<HSLFShape,HSLFTextParagraph>,SimpleShape<HSLFShape,HSLFTextParagraph>
public final class HSLFObjectShape extends HSLFPictureShape implements ObjectShape<HSLFShape,HSLFTextParagraph>
A shape representing embedded OLE object. 
- 
- 
Field Summary
- 
Fields inherited from class org.apache.poi.hslf.usermodel.HSLFSimpleShape
DEFAULT_LINE_WIDTH 
 - 
 
- 
Constructor Summary
Constructors Constructor Description HSLFObjectShape(EscherContainerRecord escherRecord, ShapeContainer<HSLFShape,HSLFTextParagraph> parent)Create aOLEShapeobjectHSLFObjectShape(HSLFPictureData data)Create a newOLEShapeHSLFObjectShape(HSLFPictureData data, ShapeContainer<HSLFShape,HSLFTextParagraph> parent)Create a newOLEShape 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExEmbedgetExEmbed()Return the record container for this embedded object.java.lang.StringgetFullName()Returns the full name of the embedded object, e.g.java.lang.StringgetInstanceName()Returns the instance name of the embedded object, e.g.HSLFObjectDatagetObjectData()Returns unique identifier for the OLE object.intgetObjectID()Returns unique identifier for the OLE object.java.lang.StringgetProgId()Returns the ProgID that stores the OLE Programmatic Identifier.voidsetFullName(java.lang.String fullName)voidsetObjectID(int objectId)Set the unique identifier for the OLE object and register it in the necessary structuresvoidsetProgId(java.lang.String progId)java.io.OutputStreamupdateObjectData(ObjectMetaData.Application application, ObjectMetaData metaData)Updates the ole data.- 
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFPictureShape
getClipping, getPictureData, getPictureIndex, getPictureName, getShapeType, setPictureName 
- 
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFSimpleShape
createHyperlink, getAdjustValue, getFillColor, getGeometry, getHyperlink, getLineBackgroundColor, getLineCap, getLineColor, getLineCompound, getLineDash, getLineDecoration, getLineHeadDecoration, getLineHeadLength, getLineHeadWidth, getLineTailDecoration, getLineTailLength, getLineTailWidth, getLineWidth, getPlaceholder, getPlaceholderDetails, getShadow, getShadowAngle, getShadowColor, getShadowDistance, getStrokeStyle, isPlaceholder, setFillColor, setLineBackgroundColor, setLineCap, setLineColor, setLineCompound, setLineDash, setLineHeadDecoration, setLineHeadLength, setLineHeadWidth, setLineTailDecoration, setLineTailLength, setLineTailWidth, setLineWidth, setPlaceholder, setStrokeStyle 
- 
Methods inherited from class org.apache.poi.hslf.usermodel.HSLFShape
draw, getAnchor, getClientDataRecord, getEscherChild, getEscherChild, getEscherChild, getEscherChild, getEscherOptRecord, getEscherProperty, getEscherProperty, getEscherProperty, getFill, getFillStyle, getFlipHorizontal, getFlipVertical, getParent, getRotation, getShapeId, getShapeName, getSheet, getSpContainer, moveTo, setAnchor, setEscherProperty, setEscherProperty, setFlipHorizontal, setFlipVertical, setRotation, setShapeId, setShapeType, setSheet 
- 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface org.apache.poi.sl.draw.geom.IAdjustableShape
getAdjustValue 
- 
Methods inherited from interface org.apache.poi.sl.usermodel.ObjectShape
getPictureData, readObjectData, readObjectDataRaw 
- 
Methods inherited from interface org.apache.poi.sl.usermodel.PlaceableShape
getAnchor, getFlipHorizontal, getFlipVertical, getParent, getRotation, getSheet, setAnchor, setFlipHorizontal, setFlipVertical, setRotation 
- 
Methods inherited from interface org.apache.poi.sl.usermodel.Shape
draw, getAnchor, getParent, getShapeId, getShapeName, getSheet 
- 
Methods inherited from interface org.apache.poi.sl.usermodel.SimpleShape
createHyperlink, getFillColor, getFillStyle, getGeometry, getHyperlink, getLineDecoration, getPlaceholder, getPlaceholderDetails, getShadow, getStrokeStyle, isPlaceholder, setFillColor, setPlaceholder, setShapeType, setStrokeStyle 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
HSLFObjectShape
public HSLFObjectShape(HSLFPictureData data)
Create a newOLEShape- Parameters:
 data- the picture data
 
- 
HSLFObjectShape
public HSLFObjectShape(HSLFPictureData data, ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
Create a newOLEShape- Parameters:
 data- the picture dataparent- the parent shape
 
- 
HSLFObjectShape
public HSLFObjectShape(EscherContainerRecord escherRecord, ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
Create aOLEShapeobject- Parameters:
 escherRecord- theEscherSpContainerrecord which holds information about this picture in theSlideparent- the parent shape of this picture
 
 - 
 
- 
Method Detail
- 
getObjectID
public int getObjectID()
Returns unique identifier for the OLE object.- Returns:
 - the unique identifier for the OLE object
 
 
- 
setObjectID
public void setObjectID(int objectId)
Set the unique identifier for the OLE object and register it in the necessary structures- Parameters:
 objectId- the unique identifier for the OLE object
 
- 
getObjectData
public HSLFObjectData getObjectData()
Returns unique identifier for the OLE object.- Specified by:
 getObjectDatain interfaceObjectShape<HSLFShape,HSLFTextParagraph>- Returns:
 - the unique identifier for the OLE object
 
 
- 
getExEmbed
public ExEmbed getExEmbed()
Return the record container for this embedded object.It contains: 1. ExEmbedAtom.(4045) 2. ExOleObjAtom (4035) 3. CString (4026), Instance MenuName (1) used for menus and the Links dialog box. 4. CString (4026), Instance ProgID (2) that stores the OLE Programmatic Identifier. A ProgID is a string that uniquely identifies a given object. 5. CString (4026), Instance ClipboardName (3) that appears in the paste special dialog. 6. MetaFile( 4033), optional
 
- 
getInstanceName
public java.lang.String getInstanceName()
Returns the instance name of the embedded object, e.g. "Document" or "Workbook".- Returns:
 - the instance name of the embedded object
 
 
- 
getFullName
public java.lang.String getFullName()
Description copied from interface:ObjectShapeReturns the full name of the embedded object, e.g. "Microsoft Word Document" or "Microsoft Office Excel Worksheet".- Specified by:
 getFullNamein interfaceObjectShape<HSLFShape,HSLFTextParagraph>- Returns:
 - the full name of the embedded object
 
 
- 
setFullName
public void setFullName(java.lang.String fullName)
 
- 
getProgId
public java.lang.String getProgId()
Description copied from interface:ObjectShapeReturns the ProgID that stores the OLE Programmatic Identifier. A ProgID is a string that uniquely identifies a given object, for example, "Word.Document.8" or "Excel.Sheet.8".- Specified by:
 getProgIdin interfaceObjectShape<HSLFShape,HSLFTextParagraph>- Returns:
 - the ProgID
 
 
- 
setProgId
public void setProgId(java.lang.String progId)
 
- 
updateObjectData
public java.io.OutputStream updateObjectData(ObjectMetaData.Application application, ObjectMetaData metaData) throws java.io.IOException
Description copied from interface:ObjectShapeUpdates the ole data. If there wasn't an object registered before, a new ole embedding is registered in the parent slideshow.For HSLF this needs to be a
POIFSFileSystemstream.- Specified by:
 updateObjectDatain interfaceObjectShape<HSLFShape,HSLFTextParagraph>- Parameters:
 application- a preset application enummetaData- or a custom metaData object, can benullif the application has been set- Returns:
 - an 
OutputStreamwhich receives the new data, the data will be persisted onclose() - Throws:
 java.io.IOException- if the linked object data couldn't be found or a new object data couldn't be initialized
 
 - 
 
 -