org.apache.fop.afp

## Class Factory

- java.lang.Object
- - org.apache.fop.afp.Factory

-     public class Factory
      extends Object

  Creator of MO:DCA structured field objects

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Factory()` Main constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ActiveEnvironmentGroup` | `createActiveEnvironmentGroup(int width, int height, int widthRes, int heightRes)` Creates a new MO:DCA `ActiveEnvironmentGroup`
    `BandImage` | `createBandImage()`
    `ContainerDataDescriptor` | `createContainerDataDescriptor(int dataWidth, int dataHeight, int widthRes, int heightRes)` Creates a new MO:DCA `ContainerDataDescriptor`
    `DataStream` | `createDataStream(AFPPaintingState paintingState, OutputStream outputStream)` Creates a new `DataStream`
    `Document` | `createDocument()` Creates a MO:DCA `Document`
    `GraphicsData` | `createGraphicsData()` Creates a new GOCA `GraphicsData`
    `GraphicsDataDescriptor` | `createGraphicsDataDescriptor(int xlwind, int xrwind, int ybwind, int ytwind, int widthRes, int heightRes)` Creates a new GOCA `GraphicsDataDescriptor`
    `GraphicsObject` | `createGraphicsObject()` Creates a new GOCA `GraphicsObject`
    `ImageContent` | `createImageContent()` Creates an new IOCA `ImageContent`
    `ImageDataDescriptor` | `createImageDataDescriptor(int width, int height, int widthRes, int heightRes)` Creates a new `ImageDataDescriptor`
    `ImageObject` | `createImageObject()` Creates a new IOCA `ImageObject`
    `ImageRasterData` | `createImageRasterData(byte[] rasterData)` Creates a new IOCA `ImageRasterData`
    `ImageSegment` | `createImageSegment()` Creates a new IOCA `ImageSegment`
    `ImageSizeParameter` | `createImageSizeParameter(int hsize, int vsize, int hresol, int vresol)` Creates an new IOCA `ImageSizeParameter`.
    `IMImageObject` | `createIMImageObject()` Creates an IOCA `IMImageObject`
    `IncludeObject` | `createInclude(String name)` Creates a MO:DCA `IncludeObject`
    `IncludePageSegment` | `createIncludePageSegment(String name, int x, int y)` Creates a MO:DCA `IncludePageSegment`
    `InvokeMediumMap` | `createInvokeMediumMap(String name)` Creates a new MO:DCA `InvokeMediumMap`
    `MapCodedFont` | `createMapCodedFont()` Creates a MO:DCA `MapCodedFont`
    `MapContainerData` | `createMapContainerData(byte optionValue)` Creates a new MO:DCA `MapContainerData`
    `MapDataResource` | `createMapDataResource()` Creates a new MO:DCA `MapDataResource`
    `ObjectAreaDescriptor` | `createObjectAreaDescriptor(int width, int height, int widthRes, int heightRes)` Creates a new `ObjectAreaDescriptor`
    `ObjectAreaPosition` | `createObjectAreaPosition(int x, int y, int rotation)` Creates a new `ObjectAreaPosition`
    `ObjectContainer` | `createObjectContainer()` Creates a new MO:DCA `ObjectContainer`
    `ObjectEnvironmentGroup` | `createObjectEnvironmentGroup()` Returns a new MO:DCA `ObjectEnvironmentGroup`
    `Overlay` | `createOverlay(int width, int height, int widthRes, int heightRes, int overlayRotation)` Creates a new MO:DCA `Overlay`.
    `PageObject` | `createPage(int pageWidth, int pageHeight, int pageRotation, int pageWidthRes, int pageHeightRes)` Creates a new MO:DCA `PageObject`.
    `PageDescriptor` | `createPageDescriptor(int width, int height, int widthRes, int heightRes)` Creates a new MO:DCA `PageDescriptor`
    `PageGroup` | `createPageGroup()` Creates a new MO:DCA `PageGroup`
    `PresentationEnvironmentControl` | `createPresentationEnvironmentControl()` Creates a new MO:DCA `PresentationEnvironmentControl`
    `PresentationTextDescriptor` | `createPresentationTextDataDescriptor(int width, int height, int widthRes, int heightRes)` Creates a new PTOCA `PresentationTextDescriptor`
    `PresentationTextObject` | `createPresentationTextObject()` Creates a new MO:DCA `PresentationTextObject`.
    `ResourceObject` | `createResource()` Creates a new MO:DCA `ResourceObject`
    `ResourceObject` | `createResource(String resourceName)` Creates a new MO:DCA `ResourceObject`
    `ResourceEnvironmentGroup` | `createResourceEnvironmentGroup()` Creates a new MO:DCA `ResourceEnvironmentGroup`
    `ResourceGroup` | `createResourceGroup()` Creates a new MO:DCA `ResourceGroup`
    `StreamedResourceGroup` | `createStreamedResourceGroup(OutputStream os)` Creates a new MO:DCA `StreamedResourceGroup`
    `TagLogicalElement` | `createTagLogicalElement(TagLogicalElement.State state)` Creates a MO:DCA `TagLogicalElement`
    `Tile` | `createTile()`
    `TilePosition` | `createTilePosition()`
    `TileSize` | `createTileSize(int dataWidth, int dataHeight, int dataWidthRes, int dataHeightRes)`
    `TileTOC` | `createTileTOC()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Factory

          public Factory()

      Main constructor

  - ### Method Detail

    - #### createImageObject

          public ImageObject createImageObject()

      Creates a new IOCA `ImageObject`
      Returns:
        a new `ImageObject`

    - #### createIMImageObject

          public IMImageObject createIMImageObject()

      Creates an IOCA `IMImageObject`
      Returns:
        a new `IMImageObject`

    - #### createGraphicsObject

          public GraphicsObject createGraphicsObject()

      Creates a new GOCA `GraphicsObject`
      Returns:
        a new `GraphicsObject`

    - #### createObjectContainer

          public ObjectContainer createObjectContainer()

      Creates a new MO:DCA `ObjectContainer`
      Returns:
        a new `ObjectContainer`

    - #### createResource

          public ResourceObject createResource(String resourceName)

      Creates a new MO:DCA `ResourceObject`
      Parameters:
        `resourceName` - the resource object name
      Returns:
        a new `ResourceObject`

    - #### createResource

          public ResourceObject createResource()

      Creates a new MO:DCA `ResourceObject`
      Returns:
        a new `ResourceObject`

    - #### createPageGroup

          public PageGroup createPageGroup()

      Creates a new MO:DCA `PageGroup`
      Returns:
        a new `PageGroup`

    - #### createActiveEnvironmentGroup

          public ActiveEnvironmentGroup createActiveEnvironmentGroup(int width,
                                                                     int height,
                                                                     int widthRes,
                                                                     int heightRes)

      Creates a new MO:DCA `ActiveEnvironmentGroup`
      Parameters:
        `width` - the page width
        `height` - the page height
        `widthRes` - the page width resolution
        `heightRes` - the page height resolution
      Returns:
        a new `ActiveEnvironmentGroup`

    - #### createResourceGroup

          public ResourceGroup createResourceGroup()

      Creates a new MO:DCA `ResourceGroup`
      Returns:
        a new `ResourceGroup`

    - #### createStreamedResourceGroup

          public StreamedResourceGroup createStreamedResourceGroup(OutputStream os)

      Creates a new MO:DCA `StreamedResourceGroup`
      Parameters:
        `os` - the outputstream of the streamed resource group
      Returns:
        a new `StreamedResourceGroup`

    - #### createPage

          public PageObject createPage(int pageWidth,
                                       int pageHeight,
                                       int pageRotation,
                                       int pageWidthRes,
                                       int pageHeightRes)

      Creates a new MO:DCA `PageObject`.
      Parameters:
        `pageWidth` - the width of the page
        `pageHeight` - the height of the page
        `pageRotation` - the rotation of the page
        `pageWidthRes` - the width resolution of the page
        `pageHeightRes` - the height resolution of the page
      Returns:
        a new `PageObject`

    - #### createPresentationTextObject

          public PresentationTextObject createPresentationTextObject()

      Creates a new MO:DCA `PresentationTextObject`.
      Returns:
        a new `PresentationTextObject`

    - #### createOverlay

          public Overlay createOverlay(int width,
                                       int height,
                                       int widthRes,
                                       int heightRes,
                                       int overlayRotation)

      Creates a new MO:DCA `Overlay`.
      Parameters:
        `width` - the width of the overlay
        `height` - the height of the overlay
        `widthRes` - the width resolution of the overlay
        `heightRes` - the height resolution of the overlay
        `overlayRotation` - the rotation of the overlay
      Returns:
        a new `Overlay`.

    - #### createDocument

          public Document createDocument()

      Creates a MO:DCA `Document`
      Returns:
        a new `Document`

    - #### createMapCodedFont

          public MapCodedFont createMapCodedFont()

      Creates a MO:DCA `MapCodedFont`
      Returns:
        a new `MapCodedFont`

    - #### createIncludePageSegment

          public IncludePageSegment createIncludePageSegment(String name,
                                                             int x,
                                                             int y)

      Creates a MO:DCA `IncludePageSegment`
      Parameters:
        `name` - the page segment name
        `x` - the x coordinate
        `y` - the y coordinate
      Returns:
        a new `IncludePageSegment`

    - #### createInclude

          public IncludeObject createInclude(String name)

      Creates a MO:DCA `IncludeObject`
      Parameters:
        `name` - the name of this include object
      Returns:
        a new `IncludeObject`

    - #### createTagLogicalElement

          public TagLogicalElement createTagLogicalElement(TagLogicalElement.State state)

      Creates a MO:DCA `TagLogicalElement`
      Parameters:
        `state` - the attribute state for the TLE
      Returns:
        a new `TagLogicalElement`

    - #### createDataStream

          public DataStream createDataStream(AFPPaintingState paintingState,
                                             OutputStream outputStream)

      Creates a new `DataStream`
      Parameters:
        `paintingState` - the AFP painting state
        `outputStream` - an outputstream to write to
      Returns:
        a new `DataStream`

    - #### createPageDescriptor

          public PageDescriptor createPageDescriptor(int width,
                                                     int height,
                                                     int widthRes,
                                                     int heightRes)

      Creates a new MO:DCA `PageDescriptor`
      Parameters:
        `width` - the page width.
        `height` - the page height.
        `widthRes` - the page width resolution.
        `heightRes` - the page height resolution.
      Returns:
        a new `PageDescriptor`

    - #### createObjectEnvironmentGroup

          public ObjectEnvironmentGroup createObjectEnvironmentGroup()

      Returns a new MO:DCA `ObjectEnvironmentGroup`
      Returns:
        a new `ObjectEnvironmentGroup`

    - #### createGraphicsData

          public GraphicsData createGraphicsData()

      Creates a new GOCA `GraphicsData`
      Returns:
        a new `GraphicsData`

    - #### createObjectAreaDescriptor

          public ObjectAreaDescriptor createObjectAreaDescriptor(int width,
                                                                 int height,
                                                                 int widthRes,
                                                                 int heightRes)

      Creates a new `ObjectAreaDescriptor`
      Parameters:
        `width` - the object width.
        `height` - the object height.
        `widthRes` - the object width resolution.
        `heightRes` - the object height resolution.
      Returns:
        a new `ObjectAreaDescriptor`

    - #### createObjectAreaPosition

          public ObjectAreaPosition createObjectAreaPosition(int x,
                                                             int y,
                                                             int rotation)

      Creates a new `ObjectAreaPosition`
      Parameters:
        `x` - the x coordinate.
        `y` - the y coordinate.
        `rotation` - the coordinate system rotation (must be 0, 90, 180, 270).
      Returns:
        a new `ObjectAreaPosition`

    - #### createImageDataDescriptor

          public ImageDataDescriptor createImageDataDescriptor(int width,
                                                               int height,
                                                               int widthRes,
                                                               int heightRes)

      Creates a new `ImageDataDescriptor`
      Parameters:
        `width` - the image width
        `height` - the image height
        `widthRes` - the x resolution of the image
        `heightRes` - the y resolution of the image
      Returns:
        a new `ImageDataDescriptor`

    - #### createGraphicsDataDescriptor

          public GraphicsDataDescriptor createGraphicsDataDescriptor(int xlwind,
                                                                     int xrwind,
                                                                     int ybwind,
                                                                     int ytwind,
                                                                     int widthRes,
                                                                     int heightRes)

      Creates a new GOCA `GraphicsDataDescriptor`
      Parameters:
        `xlwind` - the left edge of the graphics window
        `xrwind` - the right edge of the graphics window
        `ybwind` - the top edge of the graphics window
        `ytwind` - the bottom edge of the graphics window
        `widthRes` - the x resolution of the graphics window
        `heightRes` - the y resolution of the graphics window
      Returns:
        a new `GraphicsDataDescriptor`

    - #### createContainerDataDescriptor

          public ContainerDataDescriptor createContainerDataDescriptor(int dataWidth,
                                                                       int dataHeight,
                                                                       int widthRes,
                                                                       int heightRes)

      Creates a new MO:DCA `ContainerDataDescriptor`
      Parameters:
        `dataWidth` - the container data width
        `dataHeight` - the container data height
        `widthRes` - the container data width resolution
        `heightRes` - the container data height resolution
      Returns:
        a new `ContainerDataDescriptor`

    - #### createMapContainerData

          public MapContainerData createMapContainerData(byte optionValue)

      Creates a new MO:DCA `MapContainerData`
      Parameters:
        `optionValue` - the option value
      Returns:
        a new `MapContainerData`

    - #### createMapDataResource

          public MapDataResource createMapDataResource()

      Creates a new MO:DCA `MapDataResource`
      Returns:
        a new `MapDataResource`

    - #### createPresentationTextDataDescriptor

          public PresentationTextDescriptor createPresentationTextDataDescriptor(int width,
                                                                                 int height,
                                                                                 int widthRes,
                                                                                 int heightRes)

      Creates a new PTOCA `PresentationTextDescriptor`
      Parameters:
        `width` - presentation width
        `height` - presentation height
        `widthRes` - resolution of presentation width
        `heightRes` - resolution of presentation height
      Returns:
        a new `PresentationTextDescriptor`

    - #### createPresentationEnvironmentControl

          public PresentationEnvironmentControl createPresentationEnvironmentControl()

      Creates a new MO:DCA `PresentationEnvironmentControl`
      Returns:
        a new `PresentationEnvironmentControl`

    - #### createInvokeMediumMap

          public InvokeMediumMap createInvokeMediumMap(String name)

      Creates a new MO:DCA `InvokeMediumMap`
      Parameters:
        `name` - the object name
      Returns:
        a new `InvokeMediumMap`

    - #### createResourceEnvironmentGroup

          public ResourceEnvironmentGroup createResourceEnvironmentGroup()

      Creates a new MO:DCA `ResourceEnvironmentGroup`
      Returns:
        a new `ResourceEnvironmentGroup`

    - #### createImageSegment

          public ImageSegment createImageSegment()

      Creates a new IOCA `ImageSegment`
      Returns:
        a new `ImageSegment`

    - #### createImageContent

          public ImageContent createImageContent()

      Creates an new IOCA `ImageContent`
      Returns:
        an `ImageContent`

    - #### createImageRasterData

          public ImageRasterData createImageRasterData(byte[] rasterData)

      Creates a new IOCA `ImageRasterData`
      Parameters:
        `rasterData` - raster data
      Returns:
        a new `ImageRasterData`

    - #### createImageSizeParameter

          public ImageSizeParameter createImageSizeParameter(int hsize,
                                                             int vsize,
                                                             int hresol,
                                                             int vresol)

      Creates an new IOCA `ImageSizeParameter`.
      Parameters:
        `hsize` - The horizontal size of the image.
        `vsize` - The vertical size of the image.
        `hresol` - The horizontal resolution of the image.
        `vresol` - The vertical resolution of the image.
      Returns:
        a new `ImageSizeParameter`

    - #### createTileTOC

          public TileTOC createTileTOC()

    - #### createTileSize

          public TileSize createTileSize(int dataWidth,
                                         int dataHeight,
                                         int dataWidthRes,
                                         int dataHeightRes)

    - #### createTilePosition

          public TilePosition createTilePosition()

    - #### createTile

          public Tile createTile()

    - #### createBandImage

          public BandImage createBandImage()

Copyright © 2025 Apache Software Foundation. All rights reserved.