Package org.apache.fop.afp
Class Factory
- java.lang.Object
-
- org.apache.fop.afp.Factory
-
public class Factory extends java.lang.Object
Creator of MO:DCA structured field objects
-
-
Constructor Summary
Constructors Constructor Description Factory()
Main constructor
-
Method Summary
-
-
-
Method Detail
-
createImageObject
public ImageObject createImageObject()
Creates a new IOCAImageObject
- Returns:
- a new
ImageObject
-
createIMImageObject
public IMImageObject createIMImageObject()
Creates an IOCAIMImageObject
- Returns:
- a new
IMImageObject
-
createGraphicsObject
public GraphicsObject createGraphicsObject()
Creates a new GOCAGraphicsObject
- Returns:
- a new
GraphicsObject
-
createObjectContainer
public ObjectContainer createObjectContainer()
Creates a new MO:DCAObjectContainer
- Returns:
- a new
ObjectContainer
-
createResource
public ResourceObject createResource(java.lang.String resourceName)
Creates a new MO:DCAResourceObject
- Parameters:
resourceName
- the resource object name- Returns:
- a new
ResourceObject
-
createResource
public ResourceObject createResource()
Creates a new MO:DCAResourceObject
- Returns:
- a new
ResourceObject
-
createPageGroup
public PageGroup createPageGroup()
Creates a new MO:DCAPageGroup
- Returns:
- a new
PageGroup
-
createActiveEnvironmentGroup
public ActiveEnvironmentGroup createActiveEnvironmentGroup(int width, int height, int widthRes, int heightRes)
Creates a new MO:DCAActiveEnvironmentGroup
- Parameters:
width
- the page widthheight
- the page heightwidthRes
- the page width resolutionheightRes
- the page height resolution- Returns:
- a new
ActiveEnvironmentGroup
-
createResourceGroup
public ResourceGroup createResourceGroup()
Creates a new MO:DCAResourceGroup
- Returns:
- a new
ResourceGroup
-
createStreamedResourceGroup
public StreamedResourceGroup createStreamedResourceGroup(java.io.OutputStream os)
Creates a new MO:DCAStreamedResourceGroup
- 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:DCAPageObject
.- Parameters:
pageWidth
- the width of the pagepageHeight
- the height of the pagepageRotation
- the rotation of the pagepageWidthRes
- the width resolution of the pagepageHeightRes
- the height resolution of the page- Returns:
- a new
PageObject
-
createPresentationTextObject
public PresentationTextObject createPresentationTextObject()
Creates a new MO:DCAPresentationTextObject
.- Returns:
- a new
PresentationTextObject
-
createOverlay
public Overlay createOverlay(int width, int height, int widthRes, int heightRes, int overlayRotation)
Creates a new MO:DCAOverlay
.- Parameters:
width
- the width of the overlayheight
- the height of the overlaywidthRes
- the width resolution of the overlayheightRes
- the height resolution of the overlayoverlayRotation
- the rotation of the overlay- Returns:
- a new
Overlay
.
-
createMapCodedFont
public MapCodedFont createMapCodedFont()
Creates a MO:DCAMapCodedFont
- Returns:
- a new
MapCodedFont
-
createIncludePageSegment
public IncludePageSegment createIncludePageSegment(java.lang.String name, int x, int y)
Creates a MO:DCAIncludePageSegment
- Parameters:
name
- the page segment namex
- the x coordinatey
- the y coordinate- Returns:
- a new
IncludePageSegment
-
createInclude
public IncludeObject createInclude(java.lang.String name)
Creates a MO:DCAIncludeObject
- Parameters:
name
- the name of this include object- Returns:
- a new
IncludeObject
-
createTagLogicalElement
public TagLogicalElement createTagLogicalElement(TagLogicalElement.State state)
Creates a MO:DCATagLogicalElement
- Parameters:
state
- the attribute state for the TLE- Returns:
- a new
TagLogicalElement
-
createDataStream
public DataStream createDataStream(AFPPaintingState paintingState, java.io.OutputStream outputStream)
Creates a newDataStream
- Parameters:
paintingState
- the AFP painting stateoutputStream
- 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:DCAPageDescriptor
- 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:DCAObjectEnvironmentGroup
- Returns:
- a new
ObjectEnvironmentGroup
-
createGraphicsData
public GraphicsData createGraphicsData()
Creates a new GOCAGraphicsData
- Returns:
- a new
GraphicsData
-
createObjectAreaDescriptor
public ObjectAreaDescriptor createObjectAreaDescriptor(int width, int height, int widthRes, int heightRes)
Creates a newObjectAreaDescriptor
- 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 newObjectAreaPosition
- 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 newImageDataDescriptor
- Parameters:
width
- the image widthheight
- the image heightwidthRes
- the x resolution of the imageheightRes
- 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 GOCAGraphicsDataDescriptor
- Parameters:
xlwind
- the left edge of the graphics windowxrwind
- the right edge of the graphics windowybwind
- the top edge of the graphics windowytwind
- the bottom edge of the graphics windowwidthRes
- the x resolution of the graphics windowheightRes
- 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:DCAContainerDataDescriptor
- Parameters:
dataWidth
- the container data widthdataHeight
- the container data heightwidthRes
- the container data width resolutionheightRes
- the container data height resolution- Returns:
- a new
ContainerDataDescriptor
-
createMapContainerData
public MapContainerData createMapContainerData(byte optionValue)
Creates a new MO:DCAMapContainerData
- Parameters:
optionValue
- the option value- Returns:
- a new
MapContainerData
-
createMapDataResource
public MapDataResource createMapDataResource()
Creates a new MO:DCAMapDataResource
- Returns:
- a new
MapDataResource
-
createPresentationTextDataDescriptor
public PresentationTextDescriptor createPresentationTextDataDescriptor(int width, int height, int widthRes, int heightRes)
Creates a new PTOCAPresentationTextDescriptor
- Parameters:
width
- presentation widthheight
- presentation heightwidthRes
- resolution of presentation widthheightRes
- resolution of presentation height- Returns:
- a new
PresentationTextDescriptor
-
createPresentationEnvironmentControl
public PresentationEnvironmentControl createPresentationEnvironmentControl()
Creates a new MO:DCAPresentationEnvironmentControl
- Returns:
- a new
PresentationEnvironmentControl
-
createInvokeMediumMap
public InvokeMediumMap createInvokeMediumMap(java.lang.String name)
Creates a new MO:DCAInvokeMediumMap
- Parameters:
name
- the object name- Returns:
- a new
InvokeMediumMap
-
createResourceEnvironmentGroup
public ResourceEnvironmentGroup createResourceEnvironmentGroup()
Creates a new MO:DCAResourceEnvironmentGroup
- Returns:
- a new
ResourceEnvironmentGroup
-
createImageSegment
public ImageSegment createImageSegment()
Creates a new IOCAImageSegment
- Returns:
- a new
ImageSegment
-
createImageContent
public ImageContent createImageContent()
Creates an new IOCAImageContent
- Returns:
- an
ImageContent
-
createImageRasterData
public ImageRasterData createImageRasterData(byte[] rasterData)
Creates a new IOCAImageRasterData
- Parameters:
rasterData
- raster data- Returns:
- a new
ImageRasterData
-
createImageSizeParameter
public ImageSizeParameter createImageSizeParameter(int hsize, int vsize, int hresol, int vresol)
Creates an new IOCAImageSizeParameter
.- 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()
-
-