|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.fop.render.AbstractRenderer
org.apache.fop.render.PrintRenderer
org.apache.fop.render.AbstractPathOrientedRenderer
org.apache.fop.render.java2d.Java2DRenderer
org.apache.fop.render.awt.AWTRenderer
public class AWTRenderer
The AWTRender outputs the pages generated by the layout engine to a Swing window. This Swing window serves as default viewer for the -awt switch and as an example of how to embed the AWTRenderer into an AWT/Swing application.
| Field Summary | |
|---|---|
boolean |
debug
flag for debugging |
static java.lang.String |
MIME_TYPE
The MIME type for AWT-Rendering |
protected StatusListener |
statusListener
Will be notified when rendering progresses |
| Fields inherited from class org.apache.fop.render.java2d.Java2DRenderer |
|---|
antialiasing, JAVA2D_TRANSPARENT_PAGE_BACKGROUND, pageHeight, pageViewportList, pageWidth, qualityRendering, scaleFactor, state, transparentPageBackground |
| Fields inherited from class org.apache.fop.render.AbstractPathOrientedRenderer |
|---|
FOX_TRANSFORM |
| Fields inherited from class org.apache.fop.render.PrintRenderer |
|---|
embedFontInfoList, fontInfo, fontResolver |
| Fields inherited from class org.apache.fop.render.AbstractRenderer |
|---|
containingBPPosition, containingIPPosition, currentBPPosition, currentIPPosition, currentPageViewport, log, userAgent |
| Fields inherited from interface java.awt.print.Pageable |
|---|
UNKNOWN_NUMBER_OF_PAGES |
| Fields inherited from interface java.awt.print.Printable |
|---|
NO_SUCH_PAGE, PAGE_EXISTS |
| Fields inherited from interface org.apache.fop.render.Renderer |
|---|
ROLE |
| Constructor Summary | |
|---|---|
AWTRenderer(FOUserAgent userAgent)
Creates a new AWTRenderer instance. |
|
AWTRenderer(FOUserAgent userAgent,
Renderable renderable,
boolean previewAsMainWindow,
boolean show)
Creates a new AWTRenderer instance. |
|
| Method Summary | |
|---|---|
protected void |
drawBackAndBorders(Area area,
float startx,
float starty,
float width,
float height)
Draws the background and borders and adds a basic debug view // TODO implement visual-debugging as standalone Draw the background and borders. float, float, float, float) |
java.lang.String |
getMimeType()
Get the MIME type of the renderer. |
java.awt.print.PageFormat |
getPageFormat(int pageIndex)
|
java.awt.Dimension |
getPageImageSize(int pageNum)
|
java.awt.print.Printable |
getPrintable(int pageIndex)
|
StatusListener |
getStatusListener()
|
void |
renderPage(PageViewport pageViewport)
This method override only stores the PageViewport in a List. |
void |
setStatusListener(StatusListener statusListener)
Sets a StatusListener this renderer uses to notify about events. |
void |
stopRenderer()
Signals the end of the rendering phase. |
boolean |
supportsOutOfOrder()
Check if this renderer supports out of order rendering. |
| Methods inherited from class org.apache.fop.render.AbstractPathOrientedRenderer |
|---|
drawBackAndBorders, drawBackground, drawBackground, drawBorders, drawBorders, drawImage, establishTransformationMatrix, handleBlockTraits, handleRegionTraits, renderBlockViewport, renderFlow, renderForeignObject, renderInlineAreaBackAndBorders, renderInlineViewport, renderReferenceArea, renderTextDecoration |
| Methods inherited from class org.apache.fop.render.PrintRenderer |
|---|
addFontList, getFontFromArea, getFontInfo, getFontList, getFontResolver, getInternalFontNameForArea, instantiateRendererContext, renderDocument, setFontList |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.awt.print.Pageable |
|---|
getNumberOfPages |
| Field Detail |
|---|
public static final java.lang.String MIME_TYPE
public boolean debug
protected StatusListener statusListener
| Constructor Detail |
|---|
public AWTRenderer(FOUserAgent userAgent)
userAgent - the user agent that contains configuration data
public AWTRenderer(FOUserAgent userAgent,
Renderable renderable,
boolean previewAsMainWindow,
boolean show)
userAgent - the user agent that contains configuration datarenderable - a Renderable instance can be set so the Preview Dialog can enable the
"Reload" button which causes the current document to be reprocessed and redisplayed.previewAsMainWindow - true if the preview dialog created by the renderer should be
the main window of the application.show - sets whether the preview dialog should be created and displayed when the
rendering has finished.| Method Detail |
|---|
public void renderPage(PageViewport pageViewport)
throws java.io.IOException,
FOPException
renderPage in interface RendererrenderPage in class Java2DRendererpageViewport - the PageViewport object supplied by
the Area Tree
FOPException - thrown by java2DRenderer
java.io.IOException - In case of an I/O errorRenderer
public void stopRenderer()
throws java.io.IOException
stopRenderer in interface RendererstopRenderer in class Java2DRendererjava.io.IOException - If an I/O error occurs
public java.awt.Dimension getPageImageSize(int pageNum)
throws FOPException
pageNum - the page number
FOPException - If the page is out of range or has not been rendered.
public java.awt.print.PageFormat getPageFormat(int pageIndex)
throws java.lang.IndexOutOfBoundsException
getPageFormat in interface java.awt.print.Pageablejava.lang.IndexOutOfBoundsException
public java.awt.print.Printable getPrintable(int pageIndex)
throws java.lang.IndexOutOfBoundsException
getPrintable in interface java.awt.print.Pageablejava.lang.IndexOutOfBoundsExceptionpublic boolean supportsOutOfOrder()
supportsOutOfOrder in interface RenderersupportsOutOfOrder in class AbstractRendererpublic java.lang.String getMimeType()
getMimeType in interface Renderer
protected void drawBackAndBorders(Area area,
float startx,
float starty,
float width,
float height)
drawBackAndBorders in class AbstractPathOrientedRendererarea - the area to get the traits fromstartx - the start x positionstarty - the start y positionwidth - the width of the areaheight - the height of the areapublic StatusListener getStatusListener()
public void setStatusListener(StatusListener statusListener)
statusListener - The StatusListener to set.
|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||