Class OleObjectImpl

java.lang.Object
io.keikai.model.impl.OleObjectImpl
All Implemented Interfaces:
SOleObject, Serializable

public class OleObjectImpl extends Object implements SOleObject, Serializable
Default implementation of SOleObject.
Since:
7.0.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    OleObjectImpl(String progId, int shapeId, ViewAnchor anchor, byte[] embeddedData, byte[] previewImage, String linkPath, boolean linked, boolean displayAsIcon)
    Constructs an OLE object.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the anchor that positions this OLE object on the sheet.
    byte[]
    Returns the raw binary data of the embedded document.
    Returns the file path for linked OLE objects.
    byte[]
    Returns the preview image data (typically EMF or WMF format) used to display the OLE object when the source application is not available.
    Returns the programmatic identifier of the OLE object, e.g., "Word.Document.12", "Excel.Sheet.12", "Equation.3".
    int
    Returns the shape ID associated with this OLE object in the drawing layer.
    boolean
    Returns whether this OLE object is displayed as an icon rather than showing the document preview.
    boolean
    Returns whether this OLE object is linked (rather than embedded).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OleObjectImpl

      public OleObjectImpl(String progId, int shapeId, ViewAnchor anchor, byte[] embeddedData, byte[] previewImage, String linkPath, boolean linked, boolean displayAsIcon)
      Constructs an OLE object.
      Parameters:
      progId - the programmatic identifier (e.g., "Word.Document.12")
      shapeId - the shape ID in the drawing layer
      anchor - the position anchor on the sheet
      embeddedData - the embedded document bytes (null for linked objects)
      previewImage - the preview image bytes (EMF/WMF)
      linkPath - the link path (null for embedded objects)
      linked - true if linked, false if embedded
      displayAsIcon - true if displayed as an icon
  • Method Details

    • getProgId

      public String getProgId()
      Description copied from interface: SOleObject
      Returns the programmatic identifier of the OLE object, e.g., "Word.Document.12", "Excel.Sheet.12", "Equation.3".
      Specified by:
      getProgId in interface SOleObject
      Returns:
      the ProgID string, or null if not available
    • getShapeId

      public int getShapeId()
      Description copied from interface: SOleObject
      Returns the shape ID associated with this OLE object in the drawing layer.
      Specified by:
      getShapeId in interface SOleObject
      Returns:
      the shape ID
    • getAnchor

      public ViewAnchor getAnchor()
      Description copied from interface: SOleObject
      Returns the anchor that positions this OLE object on the sheet.
      Specified by:
      getAnchor in interface SOleObject
      Returns:
      the view anchor
    • getEmbeddedData

      public byte[] getEmbeddedData()
      Description copied from interface: SOleObject
      Returns the raw binary data of the embedded document. For linked objects, this returns null.
      Specified by:
      getEmbeddedData in interface SOleObject
      Returns:
      the embedded document bytes, or null if linked
    • getPreviewImage

      public byte[] getPreviewImage()
      Description copied from interface: SOleObject
      Returns the preview image data (typically EMF or WMF format) used to display the OLE object when the source application is not available.
      Specified by:
      getPreviewImage in interface SOleObject
      Returns:
      the preview image bytes, or null if not available
    • getLinkPath

      public String getLinkPath()
      Description copied from interface: SOleObject
      Returns the file path for linked OLE objects. For embedded objects, this returns null.
      Specified by:
      getLinkPath in interface SOleObject
      Returns:
      the link path, or null if embedded
    • isLinked

      public boolean isLinked()
      Description copied from interface: SOleObject
      Returns whether this OLE object is linked (rather than embedded).
      Specified by:
      isLinked in interface SOleObject
      Returns:
      true if linked, false if embedded
    • isDisplayAsIcon

      public boolean isDisplayAsIcon()
      Description copied from interface: SOleObject
      Returns whether this OLE object is displayed as an icon rather than showing the document preview.
      Specified by:
      isDisplayAsIcon in interface SOleObject
      Returns:
      true if displayed as icon