Package org.apache.fop.afp
Class Factory
java.lang.Object
org.apache.fop.afp.Factory
Creator of MO:DCA structured field objects
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private int
the active environment group countprivate static final String
private static final String
private int
the document countprivate static final String
private int
the graphic countprivate static final String
private static final String
private static final String
private int
the image countprivate int
the image segment countprivate int
the im image countprivate static final String
private static final String
private int
the object container countprivate int
the object environment group countprivate static final String
private int
the overlay countprivate static final String
private static final String
private int
the page countprivate int
the page group countprivate static final String
private static final String
private static final String
private int
the resource countprivate int
the resource group countprivate int
the presentation text object count -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateActiveEnvironmentGroup
(int width, int height, int widthRes, int heightRes) Creates a new MO:DCAActiveEnvironmentGroup
createContainerDataDescriptor
(int dataWidth, int dataHeight, int widthRes, int heightRes) Creates a new MO:DCAContainerDataDescriptor
createDataStream
(AFPPaintingState paintingState, OutputStream outputStream) Creates a newDataStream
Creates a MO:DCADocument
Creates a new GOCAGraphicsData
createGraphicsDataDescriptor
(int xlwind, int xrwind, int ybwind, int ytwind, int widthRes, int heightRes) Creates a new GOCAGraphicsDataDescriptor
Creates a new GOCAGraphicsObject
Creates an new IOCAImageContent
createImageDataDescriptor
(int width, int height, int widthRes, int heightRes) Creates a newImageDataDescriptor
Creates a new IOCAImageObject
createImageRasterData
(byte[] rasterData) Creates a new IOCAImageRasterData
Creates a new IOCAImageSegment
createImageSizeParameter
(int hsize, int vsize, int hresol, int vresol) Creates an new IOCAImageSizeParameter
.Creates an IOCAIMImageObject
createInclude
(String name) Creates a MO:DCAIncludeObject
createIncludePageSegment
(String name, int x, int y) Creates a MO:DCAIncludePageSegment
createInvokeMediumMap
(String name) Creates a new MO:DCAInvokeMediumMap
Creates a MO:DCAMapCodedFont
createMapContainerData
(byte optionValue) Creates a new MO:DCAMapContainerData
Creates a new MO:DCAMapDataResource
createObjectAreaDescriptor
(int width, int height, int widthRes, int heightRes) Creates a newObjectAreaDescriptor
createObjectAreaPosition
(int x, int y, int rotation) Creates a newObjectAreaPosition
Creates a new MO:DCAObjectContainer
Returns a new MO:DCAObjectEnvironmentGroup
createOverlay
(int width, int height, int widthRes, int heightRes, int overlayRotation) Creates a new MO:DCAOverlay
.createPage
(int pageWidth, int pageHeight, int pageRotation, int pageWidthRes, int pageHeightRes) Creates a new MO:DCAPageObject
.createPageDescriptor
(int width, int height, int widthRes, int heightRes) Creates a new MO:DCAPageDescriptor
Creates a new MO:DCAPageGroup
Creates a new MO:DCAPresentationEnvironmentControl
createPresentationTextDataDescriptor
(int width, int height, int widthRes, int heightRes) Creates a new PTOCAPresentationTextDescriptor
Creates a new MO:DCAPresentationTextObject
.Creates a new MO:DCAResourceObject
createResource
(String resourceName) Creates a new MO:DCAResourceObject
Creates a new MO:DCAResourceEnvironmentGroup
Creates a new MO:DCAResourceGroup
Creates a new MO:DCAStreamedResourceGroup
Creates a MO:DCATagLogicalElement
createTileSize
(int dataWidth, int dataHeight, int dataWidthRes, int dataHeightRes)
-
Field Details
-
OBJECT_ENVIRONMENT_GROUP_NAME_PREFIX
- See Also:
-
ACTIVE_ENVIRONMENT_GROUP_NAME_PREFIX
- See Also:
-
IMAGE_NAME_PREFIX
- See Also:
-
GRAPHIC_NAME_PREFIX
- See Also:
-
BARCODE_NAME_PREFIX
- See Also:
-
OBJECT_CONTAINER_NAME_PREFIX
- See Also:
-
RESOURCE_NAME_PREFIX
- See Also:
-
RESOURCE_GROUP_NAME_PREFIX
- See Also:
-
PAGE_GROUP_NAME_PREFIX
- See Also:
-
PAGE_NAME_PREFIX
- See Also:
-
OVERLAY_NAME_PREFIX
- See Also:
-
PRESENTATION_TEXT_NAME_PREFIX
- See Also:
-
DOCUMENT_NAME_PREFIX
- See Also:
-
IM_IMAGE_NAME_PREFIX
- See Also:
-
IMAGE_SEGMENT_NAME_PREFIX
- See Also:
-
pageGroupCount
private int pageGroupCountthe page group count -
pageCount
private int pageCountthe page count -
imageCount
private int imageCountthe image count -
imImageCount
private int imImageCountthe im image count -
imageSegmentCount
private int imageSegmentCountthe image segment count -
graphicCount
private int graphicCountthe graphic count -
objectContainerCount
private int objectContainerCountthe object container count -
resourceCount
private int resourceCountthe resource count -
resourceGroupCount
private int resourceGroupCountthe resource group count -
overlayCount
private int overlayCountthe overlay count -
textObjectCount
private int textObjectCountthe presentation text object count -
activeEnvironmentGroupCount
private int activeEnvironmentGroupCountthe active environment group count -
documentCount
private int documentCountthe document count -
objectEnvironmentGroupCount
private int objectEnvironmentGroupCountthe object environment group count
-
-
Constructor Details
-
Factory
public Factory()Main constructor
-
-
Method Details
-
createImageObject
Creates a new IOCAImageObject
- Returns:
- a new
ImageObject
-
createIMImageObject
Creates an IOCAIMImageObject
- Returns:
- a new
IMImageObject
-
createGraphicsObject
Creates a new GOCAGraphicsObject
- Returns:
- a new
GraphicsObject
-
createObjectContainer
Creates a new MO:DCAObjectContainer
- Returns:
- a new
ObjectContainer
-
createResource
Creates a new MO:DCAResourceObject
- Parameters:
resourceName
- the resource object name- Returns:
- a new
ResourceObject
-
createResource
Creates a new MO:DCAResourceObject
- Returns:
- a new
ResourceObject
-
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
Creates a new MO:DCAResourceGroup
- Returns:
- a new
ResourceGroup
-
createStreamedResourceGroup
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
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
.
-
createDocument
Creates a MO:DCADocument
- Returns:
- a new
Document
-
createMapCodedFont
Creates a MO:DCAMapCodedFont
- Returns:
- a new
MapCodedFont
-
createIncludePageSegment
Creates a MO:DCAIncludePageSegment
- Parameters:
name
- the page segment namex
- the x coordinatey
- the y coordinate- Returns:
- a new
IncludePageSegment
-
createInclude
Creates a MO:DCAIncludeObject
- Parameters:
name
- the name of this include object- Returns:
- a new
IncludeObject
-
createTagLogicalElement
Creates a MO:DCATagLogicalElement
- Parameters:
state
- the attribute state for the TLE- Returns:
- a new
TagLogicalElement
-
createDataStream
Creates a newDataStream
- Parameters:
paintingState
- the AFP painting stateoutputStream
- an outputstream to write to- Returns:
- a new
DataStream
-
createPageDescriptor
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
Returns a new MO:DCAObjectEnvironmentGroup
- Returns:
- a new
ObjectEnvironmentGroup
-
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
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
Creates a new MO:DCAMapContainerData
- Parameters:
optionValue
- the option value- Returns:
- a new
MapContainerData
-
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
Creates a new MO:DCAPresentationEnvironmentControl
- Returns:
- a new
PresentationEnvironmentControl
-
createInvokeMediumMap
Creates a new MO:DCAInvokeMediumMap
- Parameters:
name
- the object name- Returns:
- a new
InvokeMediumMap
-
createResourceEnvironmentGroup
Creates a new MO:DCAResourceEnvironmentGroup
- Returns:
- a new
ResourceEnvironmentGroup
-
createImageSegment
Creates a new IOCAImageSegment
- Returns:
- a new
ImageSegment
-
createImageContent
Creates an new IOCAImageContent
- Returns:
- an
ImageContent
-
createImageRasterData
Creates a new IOCAImageRasterData
- Parameters:
rasterData
- raster data- Returns:
- a new
ImageRasterData
-
createImageSizeParameter
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
-
createTileSize
-
createTilePosition
-
createTile
-
createBandImage
-