|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.ibm.as400.util.reportwriter.pdfwriter.PDFContext
The PDFContext class defines the methods necessary to render an area tree to a PDF data stream according to the rendering model of the XSL FO specification. An application is only required to create an instance of the PDFContext. The public methods defined in PDFContext are called internally.
Constructor Summary | |
PDFContext(java.io.OutputStream out,
java.awt.print.PageFormat pF)
Constructs a PDFContext object. |
Method Summary | |
void |
drawBorder(com.ibm.xsl.composer.prim.Border inTop,
com.ibm.xsl.composer.prim.Border inLeft,
com.ibm.xsl.composer.prim.Border inBottom,
com.ibm.xsl.composer.prim.Border inRight,
com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint inLocation,
com.ibm.as400.util.reportwriter.pdfwriter.CSSExtent inSize)
Draw the border using the border traits given. |
void |
drawGlyph(char code,
com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint location)
Draw a single glyph at the given location. |
void |
drawGraphic(java.lang.String Uri,
com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint location,
com.ibm.as400.util.reportwriter.pdfwriter.CSSExtent size)
Draw an image resource at the given location. |
void |
drawOrientatedGlyph(char code,
com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint location,
short referenceOrientation)
Draw a single glyph at the given location with the specified orientation. |
void |
drawRule(com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint start,
com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint end,
com.ibm.xsl.composer.prim.Border border)
Draw a rule from the start point to the end point with given border properties. |
void |
drawString(java.lang.String series,
com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint location)
Draw a series of glyphs at the given location. |
void |
endDocument()
Called at the end of processing a document, after all other output methods. |
void |
fillBackground(com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint location,
com.ibm.as400.util.reportwriter.pdfwriter.CSSExtent size,
com.ibm.as400.util.reportwriter.pdfwriter.CSSColor color)
Fill a rectangle with color. |
void |
fillBackground(com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint location,
com.ibm.as400.util.reportwriter.pdfwriter.CSSExtent size,
java.lang.String imageName,
com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint offset,
int howToRepeat)
Fill a rectangle with an image. |
com.ibm.as400.util.reportwriter.pdfwriter.ExtendedFont |
getExtendedFont(com.ibm.xsl.composer.properties.FontProperty fontProperty)
Get the class which reports metrics for a font that most nearly satisfies the given properties. |
com.ibm.as400.util.reportwriter.pdfwriter.CSSExtent |
getGraphicDimension(java.lang.String image)
Retrieve the dimensions of an image resource. |
com.ibm.as400.util.reportwriter.pdfwriter.CSSExtent |
getPageSize()
Get the size of the output media in fo space (long units). |
long |
getUnitsPerPixel()
Get number of units in fo space equal to one pixel in device space. |
long |
getUnitsPerPoint()
Get number of units in fo space equal to one point in device space. |
void |
notifyGraphic(java.net.URL image)
Indicate to the context that an image resource may be used in a later call to fillBackground or drawGraphic. |
void |
setFont(com.ibm.as400.util.reportwriter.pdfwriter.ExtendedFont extendedFont)
Set the font for rendering text to a font that most nearly satisfies the given properties. |
void |
setTextColor(com.ibm.as400.util.reportwriter.pdfwriter.CSSColor color)
Set the color for rendering text and rules. |
void |
startDocument()
Called at the start of processing a document, before any other output methods. |
void |
startViewport(com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint location,
com.ibm.as400.util.reportwriter.pdfwriter.CSSExtent extent,
boolean isPage)
Start a viewport with the given location and extent. |
Constructor Detail |
public PDFContext(java.io.OutputStream out, java.awt.print.PageFormat pF) throws java.lang.NullPointerException
out
- The OutputStream used to hold the PDF data.pF
- The PageFormat describes the size and orientation of a page to
be printed.Method Detail |
public com.ibm.as400.util.reportwriter.pdfwriter.CSSExtent getPageSize()
public long getUnitsPerPoint()
public long getUnitsPerPixel()
public void startDocument()
public void endDocument()
public void startViewport(com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint location, com.ibm.as400.util.reportwriter.pdfwriter.CSSExtent extent, boolean isPage)
location
- the location of the start of the viewport.extent
- the extent of the vieport.isPage
- if true, on a page device, open the viewport on a new
page; on a screen device, open a new window.public com.ibm.as400.util.reportwriter.pdfwriter.ExtendedFont getExtendedFont(com.ibm.xsl.composer.properties.FontProperty fontProperty)
fontProperty
- an XSL font property objectpublic void setFont(com.ibm.as400.util.reportwriter.pdfwriter.ExtendedFont extendedFont)
extendedFont
- the font information from the framework#getExtendedFont()
public void setTextColor(com.ibm.as400.util.reportwriter.pdfwriter.CSSColor color)
color
- text colorpublic void drawGlyph(char code, com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint location)
code
- the codepointlocation
- the location of the start of the glyph at it's baseline.setFont(com.ibm.as400.util.reportwriter.pdfwriter.ExtendedFont)
,
setTextColor(com.ibm.as400.util.reportwriter.pdfwriter.CSSColor)
public void drawOrientatedGlyph(char code, com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint location, short referenceOrientation)
code
- the codepointlocation
- the location of the start of the glyph at it's baseline.referenceOrientation
- the orientation of the glyphsetFont(com.ibm.as400.util.reportwriter.pdfwriter.ExtendedFont)
,
setTextColor(com.ibm.as400.util.reportwriter.pdfwriter.CSSColor)
public void drawString(java.lang.String series, com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint location)
series
- the sequence of codepointslocation
- the location of the start of the first
glyph at it's baseline.setFont(com.ibm.as400.util.reportwriter.pdfwriter.ExtendedFont)
,
setTextColor(com.ibm.as400.util.reportwriter.pdfwriter.CSSColor)
public void drawRule(com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint start, com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint end, com.ibm.xsl.composer.prim.Border border)
start
- the first endpoint.end
- the second endpoint.border
- the properties of the borderpublic void drawBorder(com.ibm.xsl.composer.prim.Border inTop, com.ibm.xsl.composer.prim.Border inLeft, com.ibm.xsl.composer.prim.Border inBottom, com.ibm.xsl.composer.prim.Border inRight, com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint inLocation, com.ibm.as400.util.reportwriter.pdfwriter.CSSExtent inSize)
inTop
- properties of the top borderinLeft
- properties of the left borderinBottom
- properties of the bottom borderinRight
- properties of the right borderinLocation
- of the rectangle internal to the borderinSize
- of the rectangle internal to the borderpublic void fillBackground(com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint location, com.ibm.as400.util.reportwriter.pdfwriter.CSSExtent size, com.ibm.as400.util.reportwriter.pdfwriter.CSSColor color)
location
- of the rectangle.size
- of the rectanglecolor
- to fillpublic void fillBackground(com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint location, com.ibm.as400.util.reportwriter.pdfwriter.CSSExtent size, java.lang.String imageName, com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint offset, int howToRepeat)
location
- of the rectangle.size
- of the rectangleimageName
- uri for the imageoffset
- the offset of the origin of the imagehowToRepeat
- whether and how to tile the imagepublic void notifyGraphic(java.net.URL image)
image
- the uri for the imagepublic void drawGraphic(java.lang.String Uri, com.ibm.as400.util.reportwriter.pdfwriter.CSSPoint location, com.ibm.as400.util.reportwriter.pdfwriter.CSSExtent size)
Uri
- the uri for the imagelocation
- the location of the start of the glyph at it's baseline.size
- of the image (context must scale to this size)public com.ibm.as400.util.reportwriter.pdfwriter.CSSExtent getGraphicDimension(java.lang.String image)
image
- the uri for the image
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |