|
fop 1.0 | |||||||||
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 |
boolean |
dialogDisplay
If true, preview dialog is shown. |
static java.lang.String |
MIME_TYPE
The MIME type for AWT-Rendering |
protected Renderable |
renderable
Renderable instance that can be used to reload and re-render a document after modifications. |
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()
Creates a new AWTRenderer instance. |
|
AWTRenderer(boolean previewAsMainWindow)
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 |
setPreviewDialogDisplayed(boolean show)
Sets whether the preview dialog should be created and displayed when the rendering is finished. |
void |
setRenderable(Renderable renderable)
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. |
void |
setStatusListener(StatusListener statusListener)
Sets a StatusListener this renderer uses to notify about events. |
void |
setUserAgent(FOUserAgent foUserAgent)
Set the User Agent. |
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, drawBorders, drawBorders, drawImage, establishTransformationMatrix, handleBlockTraits, handleRegionTraits, renderBlockViewport, renderFlow, renderForeignObject, renderInlineAreaBackAndBorders, renderReferenceArea, renderTextDecoration, renderViewport |
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
public boolean dialogDisplay
protected Renderable renderable
protected StatusListener statusListener
Constructor Detail |
---|
public AWTRenderer()
public AWTRenderer(boolean previewAsMainWindow)
previewAsMainWindow
- true if the preview dialog created by the renderer should be
the main window of the application.Method Detail |
---|
public void setUserAgent(FOUserAgent foUserAgent)
setUserAgent
in interface Renderer
setUserAgent
in class Java2DRenderer
foUserAgent
- The User Agentpublic void setRenderable(Renderable renderable)
renderable
- the Renderable instance.public void setPreviewDialogDisplayed(boolean show)
show
- If false, preview dialog is not shown. True by defaultpublic void renderPage(PageViewport pageViewport) throws java.io.IOException
renderPage
in interface Renderer
renderPage
in class Java2DRenderer
pageViewport
- the PageViewport
object supplied by
the Area Tree
java.io.IOException
- In case of an I/O errorRenderer
public void stopRenderer() throws java.io.IOException
stopRenderer
in interface Renderer
stopRenderer
in class Java2DRenderer
java.io.IOException
- If an I/O error occurspublic 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.Pageable
java.lang.IndexOutOfBoundsException
public java.awt.print.Printable getPrintable(int pageIndex) throws java.lang.IndexOutOfBoundsException
getPrintable
in interface java.awt.print.Pageable
java.lang.IndexOutOfBoundsException
public boolean supportsOutOfOrder()
supportsOutOfOrder
in interface Renderer
supportsOutOfOrder
in class AbstractRenderer
public java.lang.String getMimeType()
getMimeType
in interface Renderer
protected void drawBackAndBorders(Area area, float startx, float starty, float width, float height)
drawBackAndBorders
in class AbstractPathOrientedRenderer
area
- 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.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |