public class PageObject extends AbstractResourceGroupContainer
AbstractAFPObject.Category, AbstractAFPObject.Type
resourceGroup, started
activeEnvironmentGroup, complete, factory, objects, rotation
name
triplets
LOG, SF_CLASS, SF_HEADER_LENGTH
Constructor and Description |
---|
PageObject(Factory factory,
java.lang.String name,
int width,
int height,
int rotation,
int widthRes,
int heightRes)
Construct a new page object for the specified name argument, the page
name should be an 8 character identifier.
|
Modifier and Type | Method and Description |
---|---|
void |
addObject(java.lang.Object obj)
Adds an AFP object reference to this page
|
protected boolean |
canWrite(AbstractAFPObject ao)
Returns true if this object can be written
|
void |
createIncludePageOverlay(java.lang.String name,
int x,
int y,
int orientation)
Creates an IncludePageOverlay on the page.
|
void |
createShading(int x,
int y,
int w,
int h,
int red,
int green,
int blue)
This method will create shading on the page using the specified
coordinates (the shading contrast is controlled via the red, green blue
parameters, by converting this to grayscale).
|
java.lang.String |
toString() |
protected void |
writeContent(java.io.OutputStream os)
Helper method to write the contents of the Object.
|
protected void |
writeEnd(java.io.OutputStream os)
Helper method to write the end of the Object.
|
protected void |
writeStart(java.io.OutputStream os)
Helper method to write the start of the Object.
|
getResourceCount, getResourceGroup, hasResources, writeObjects, writeObjects, writeToStream
createFont, createIncludePageSegment, createLine, createNoOperation, createTagLogicalElement, createText, endPage, endPresentationObject, getActiveEnvironmentGroup, getHeight, getPresentationTextObject, getRotation, getTagLogicalElements, getWidth, isComplete, setComplete
copySF, getName, getNameBytes, getNameLength, setName
addTriplet, addTriplets, getFullyQualifiedName, getTripletDataLength, getTriplets, hasTriplet, hasTriplets, setComment, setFullyQualifiedName, setObjectClassification, writeTriplets
copySF, truncate, writeChunksToStream
public PageObject(Factory factory, java.lang.String name, int width, int height, int rotation, int widthRes, int heightRes)
factory
- the resource managername
- the name of the page.width
- the width of the page.height
- the height of the page.rotation
- the rotation of the page.widthRes
- the width resolution of the page.heightRes
- the height resolution of the page.public void createIncludePageOverlay(java.lang.String name, int x, int y, int orientation)
name
- the name of the overlayx
- the x position of the overlayy
- the y position of the overlayorientation
- the orientation required for the overlaypublic void createShading(int x, int y, int w, int h, int red, int green, int blue)
x
- the x coordinate of the shadingy
- the y coordinate of the shadingw
- the width of the shaded areah
- the height of the shaded areared
- the red valuegreen
- the green valueblue
- the blue valueprotected void writeStart(java.io.OutputStream os) throws java.io.IOException
writeStart
in class AbstractStructuredObject
os
- The stream to write tojava.io.IOException
- throws an I/O exception if one occurredprotected void writeContent(java.io.OutputStream os) throws java.io.IOException
writeContent
in class AbstractPageObject
os
- The stream to write tojava.io.IOException
- throws an I/O exception if one occurredprotected void writeEnd(java.io.OutputStream os) throws java.io.IOException
writeEnd
in class AbstractStructuredObject
os
- The stream to write tojava.io.IOException
- an I/O exception if one occurredpublic void addObject(java.lang.Object obj)
addObject
in class AbstractPageObject
obj
- an AFP objectpublic java.lang.String toString()
toString
in class AbstractNamedAFPObject
protected boolean canWrite(AbstractAFPObject ao)
canWrite
in class AbstractResourceGroupContainer
ao
- an AFP objectCopyright 1999-2012 The Apache Software Foundation. All Rights Reserved.