Class AbstractDataObject

All Implemented Interfaces:
Completable, Startable, Streamable
Direct Known Subclasses:
GraphicsObject, ImageObject, ObjectContainer

public abstract class AbstractDataObject extends AbstractNamedAFPObject implements Startable, Completable
Abstract base class used by the ImageObject and GraphicsObject which both have define an ObjectEnvironmentGroup
  • Field Details

    • objectEnvironmentGroup

      protected ObjectEnvironmentGroup objectEnvironmentGroup
      the object environment group
    • factory

      protected final Factory factory
      the object factory
  • Constructor Details

    • AbstractDataObject

      public AbstractDataObject(Factory factory, String name)
      Named constructor
      Parameters:
      factory - the object factory
      name - data object name
  • Method Details

    • setViewport

      public void setViewport(AFPDataObjectInfo dataObjectInfo)
      Sets the object view port (area position and size).
      Parameters:
      dataObjectInfo - the object area info
    • getObjectEnvironmentGroup

      public ObjectEnvironmentGroup getObjectEnvironmentGroup()
      Gets the ObjectEnvironmentGroup
      Returns:
      the object environment group
    • writeStart

      protected void writeStart(OutputStream os) throws IOException
      Helper method to write the start of the Object.
      Overrides:
      writeStart in class AbstractStructuredObject
      Parameters:
      os - The stream to write to
      Throws:
      IOException - throws an I/O exception if one occurred
    • writeContent

      protected void writeContent(OutputStream os) throws IOException
      Helper method to write the contents of the Object.
      Overrides:
      writeContent in class AbstractStructuredObject
      Parameters:
      os - The stream to write to
      Throws:
      IOException - throws an I/O exception if one occurred
    • setStarted

      public void setStarted(boolean started)
      Sets whether or not this object has started or not
      Specified by:
      setStarted in interface Startable
      Parameters:
      started - true if this object has started
    • isStarted

      public boolean isStarted()
      Returns true if this object has started
      Specified by:
      isStarted in interface Startable
      Returns:
      true if this object has started
    • setComplete

      public void setComplete(boolean complete)
      Sets whether or not this object is complete or not
      Specified by:
      setComplete in interface Completable
      Parameters:
      complete - true if this object is complete
    • isComplete

      public boolean isComplete()
      Returns true if this object is complete
      Specified by:
      isComplete in interface Completable
      Returns:
      true if this object is complete