org.apache.fop.render.afp.modca
public abstract class AbstractPageObject extends AbstractNamedAFPObject
Modifier and Type | Field and Description |
---|---|
protected ActiveEnvironmentGroup |
activeEnvironmentGroup
The active environment group for the page
|
protected java.util.List |
objects
The list of objects within the page
|
protected java.util.ArrayList |
segments
The list of the include page segments
|
protected java.util.ArrayList |
tagLogicalElements
The list of tag logical elements
|
name, nameBytes
log
Constructor and Description |
---|
AbstractPageObject(java.lang.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.
|
Modifier and Type | Method and Description |
---|---|
void |
createFont(byte fontReference,
AFPFont font,
int size)
Helper method to create a map coded font object on the current page, this
method delegates the construction of the map coded font object to the
active environment group on the page.
|
void |
createIncludePageSegment(java.lang.String name,
int xCoor,
int yCoor)
Creates an IncludePageSegment on the current page.
|
void |
createLine(int x1,
int y1,
int x2,
int y2,
int thickness,
int lineRotation,
java.awt.Color col)
Helper method to create a line on the current page, this method delegates
to the presentation text object in order to construct the line.
|
void |
createNoOperation(java.lang.String content)
Creates a NoOperation 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 grey scale).
|
void |
createTagLogicalElement(java.lang.String name,
java.lang.String value)
Creates a TagLogicalElement on the page.
|
void |
createText(int fontNumber,
int x,
int y,
int textRotation,
java.awt.Color col,
int vsci,
int ica,
byte[] data)
Helper method to create text on the current page, this method delegates
to the presentation text object in order to construct the text.
|
void |
endPage()
Helper method to mark the end of the page.
|
ActiveEnvironmentGroup |
getActiveEnvironmentGroup()
Returns the ActiveEnvironmentGroup associated with this page.
|
int |
getHeight()
Returns the height of the page
|
ImageObject |
getImageObject()
Helper method to create an image on the current page and to return
the object.
|
int |
getRotation()
Returns the rotation of the page
|
int |
getWidth()
Returns the width of the page
|
boolean |
isComplete()
Returns an indication if the page is complete
|
writeDataStream, writeObjectList
protected ActiveEnvironmentGroup activeEnvironmentGroup
protected java.util.List objects
protected java.util.ArrayList tagLogicalElements
protected java.util.ArrayList segments
public AbstractPageObject(java.lang.String name, int width, int height, int rotation, int widthResolution, int heightResolution)
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.public void createFont(byte fontReference, AFPFont font, int size)
fontReference
- the font number used as the resource identifierfont
- the fontsize
- the point size of the fontpublic void createLine(int x1, int y1, int x2, int y2, int thickness, int lineRotation, java.awt.Color col)
x1
- the first x coordinate of the liney1
- the first y coordinate of the linex2
- the second x coordinate of the liney2
- the second y coordinate of the linethickness
- the thickness of the linelineRotation
- the rotation of the linecol
- The text color.public void createText(int fontNumber, int x, int y, int textRotation, java.awt.Color col, int vsci, int ica, byte[] data)
fontNumber
- the font number used as the resource identifierx
- the x coordinate of the text datay
- the y coordinate of the text datatextRotation
- the rotation of the text datacol
- the text colorvsci
- The variable space character increment.ica
- The inter character adjustment.data
- the text data to createpublic void endPage()
public 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 valuepublic ImageObject getImageObject()
public void createTagLogicalElement(java.lang.String name, java.lang.String value)
name
- the name of the tagvalue
- the value of the tagpublic void createNoOperation(java.lang.String content)
content
- the byte datapublic void createIncludePageSegment(java.lang.String name, int xCoor, int yCoor)
name
- the name of the page segmentxCoor
- the x cooridinate of the page segment.yCoor
- the y cooridinate of the page segment.public ActiveEnvironmentGroup getActiveEnvironmentGroup()
public boolean isComplete()
public int getHeight()
public int getWidth()
public int getRotation()
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.