org.apache.fop.render.afp.modca

Class PageObject


public class PageObject
extends AbstractPageObject

Pages contain the data objects that comprise a presentation document. Each page has a set of data objects associated with it. Each page within a document is independent from any other page, and each must establish its own environment parameters. The page is the level in the document component hierarchy that is used for printing or displaying a document's content. The data objects contained in the page envelope in the data stream are presented when the page is presented. Each data object has layout information associated with it that directs the placement and orientation of the data on the page. In addition, each page contains layout information that specifies the measurement units, page width, and page depth. A page is initiated by a begin page structured field and terminated by an end page structured field. Structured fields that define objects and active environment groups or that specify attributes of the page may be encountered in page state.

Field Summary

Fields inherited from class org.apache.fop.render.afp.modca.AbstractPageObject

activeEnvironmentGroup, objects, segments, tagLogicalElements

Fields inherited from class org.apache.fop.render.afp.modca.AbstractNamedAFPObject

name, nameBytes

Fields inherited from class org.apache.fop.render.afp.modca.AbstractAFPObject

log

Constructor Summary

PageObject(String name, int width, int height, int rotation, int widthResolution, int heightResolution)
Construct a new page object for the specified name argument, the page name should be an 8 character identifier.

Method Summary

void
addOverlay(Overlay overlay)
Adds an overlay to the page resources
void
createIncludePageOverlay(String name, int x, int y, int orientation)
Creates an IncludePageOverlay on the page.
void
writeDataStream(OutputStream os)
Accessor method to write the AFP datastream for the page.

Methods inherited from class org.apache.fop.render.afp.modca.AbstractPageObject

createFont, createIncludePageSegment, createLine, createNoOperation, createShading, createTagLogicalElement, createText, endPage, getActiveEnvironmentGroup, getHeight, getImageObject, getRotation, getWidth, isComplete

Methods inherited from class org.apache.fop.render.afp.modca.AbstractAFPObject

writeDataStream, writeObjectList

Constructor Details

PageObject

public PageObject(String name,
                  int width,
                  int height,
                  int rotation,
                  int widthResolution,
                  int heightResolution)
Construct a new page object for the specified name argument, the page name should be an 8 character identifier.
Parameters:
name - the name of the page.
width - the width of the page.
height - the height of the page.
rotation - the rotation of the page.
widthResolution - the width resolution of the page.
heightResolution - the height resolution of the page.

Method Details

addOverlay

public void addOverlay(Overlay overlay)
Adds an overlay to the page resources
Parameters:
overlay - the overlay to add

createIncludePageOverlay

public void createIncludePageOverlay(String name,
                                     int x,
                                     int y,
                                     int orientation)
Creates an IncludePageOverlay on the page.
Parameters:
name - the name of the overlay
x - the x position of the overlay
y - the y position of the overlay
orientation - the orientation required for the overlay

writeDataStream

public void writeDataStream(OutputStream os)
            throws IOException
Accessor method to write the AFP datastream for the page.
Overrides:
writeDataStream in interface AbstractAFPObject
Parameters:
os - The stream to write to

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.