|
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.xml.AbstractXMLRenderer
org.apache.fop.render.xml.XMLRenderer
Renderer that renders areas to XML for debugging purposes. This creates an xml that contains the information of the area tree. It does not output any state or derived information. The output can be used to build a new area tree which can be rendered to any renderer.
| Field Summary | |
protected Renderer |
mimic
If not null, the XMLRenderer will mimic another renderer by using its font setup. |
static java.lang.String |
XML_MIME_TYPE
XML MIME type |
| Fields inherited from class org.apache.fop.render.xml.AbstractXMLRenderer |
atts, CDATA, context, EMPTY_ATTS, extensionAttachments, handler, NS, out |
| 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 org.apache.fop.render.Renderer |
ROLE |
| Constructor Summary | |
XMLRenderer()
Creates a new XML renderer. |
|
| Method Summary | |
protected void |
addAreaAttributes(Area area)
Adds the general Area attributes. |
protected void |
addTraitAttributes(Area area)
Adds attributes from traits of an Area. |
void |
endPageSequence()
Tells the renderer to finish the current PageSequence |
protected void |
endVParea()
Signals exit from a viewport area. Subclasses can restore transformation matrices valid before the viewport area was started. |
java.lang.String |
getMimeType()
Get the MIME type of the renderer. |
protected void |
handleExtensionAttachments(java.util.List attachments)
Handles a list of extension attachments |
void |
mimicRenderer(Renderer renderer)
Call this method to make the XMLRenderer mimic a different renderer by using its font setup. |
void |
processOffDocumentItem(OffDocumentItem oDI)
Tells the renderer to process an item not explicitly placed on the document (e.g., PDF bookmarks). Note - not all renderers will process all off-document items. |
protected void |
renderBeforeFloat(BeforeFloat bf)
Renders a before float area. |
protected void |
renderBlock(Block block)
Renders a block area. |
protected void |
renderBookmarkTree(BookmarkData bookmarkRoot)
Renders a BookmarkTree object |
void |
renderContainer(Container cont)
Tells the renderer to render an inline container. |
protected void |
renderDestination(DestinationData destination)
Renders a DestinationData object (named destination) |
protected void |
renderFlow(NormalFlow flow)
Renders a flow reference area. |
protected void |
renderFootnote(Footnote footnote)
Renders a footnote |
void |
renderForeignObject(ForeignObject fo,
java.awt.geom.Rectangle2D pos)
Renders an fo:foreing-object. |
void |
renderImage(Image image,
java.awt.geom.Rectangle2D pos)
Renders an image area. |
protected void |
renderInlineArea(InlineArea inlineArea)
Render the given InlineArea. |
protected void |
renderInlineAreaBackAndBorders(InlineArea area)
Common method to render the background and borders for any inline area. The all borders and padding are drawn outside the specified area. org.apache.fop.area.inline.InlineArea) |
protected void |
renderInlineBlockParent(InlineBlockParent ibp)
Render the given InlineBlockParent. |
protected void |
renderInlineParent(InlineParent ip)
Render the given InlineParent. |
protected void |
renderInlineSpace(Space space)
Render the given Space. |
protected void |
renderLeader(Leader area)
Render the given Leader. |
protected void |
renderLineArea(LineArea line)
Renders a line area. A line area may have grouped styling for its children such as underline, background. |
protected void |
renderMainReference(MainReference mr)
Renders the main reference area. The main reference area contains a list of spans that are stacked on the page. The spans contain a list of normal flow reference areas that are positioned into columns. |
void |
renderPage(PageViewport page)
Tells the renderer to render a particular page. A renderer typically reponds by packing up the current page and writing it immediately to the output device. |
protected void |
renderReferenceArea(Block block)
Renders a block area that represents a reference area. The reference area establishes a new coordinate system. |
protected void |
renderRegionViewport(RegionViewport port)
Renders a region viewport. The region may clip the area and it establishes a position from where the region is placed. |
protected void |
renderSpace(SpaceArea space)
Render the given SpaceArea. |
protected void |
renderText(TextArea text)
Render the given TextArea. |
protected void |
renderViewport(Viewport viewport)
Render the given Viewport. |
protected void |
renderWord(WordArea word)
Render the given WordArea. |
void |
setCompactFormat(boolean compact)
Controls whether to create a more compact format which omit certain attributes. |
void |
setupFontInfo(FontInfo inFontInfo)
Set up the given FontInfo. |
void |
setUserAgent(FOUserAgent agent)
Set the User Agent. |
void |
startPageSequence(PageSequence pageSequence)
Tells the renderer that a new page sequence starts. |
void |
startRenderer(java.io.OutputStream outputStream)
Initiates the rendering phase. This must only be called once for a rendering. If stopRenderer is called then this may be called again for a new document rendering. |
protected void |
startVParea(CTM ctm,
java.awt.geom.Rectangle2D clippingRect)
Establishes a new viewport area. |
void |
stopRenderer()
Signals the end of the rendering phase. The renderer should reset to an initial state and dispose of any resources for the completed rendering. |
| Methods inherited from class org.apache.fop.render.xml.AbstractXMLRenderer |
addAttribute, addAttribute, addAttribute, addAttribute, characters, comment, endElement, handleDocumentExtensionAttachments, handlePageExtensionAttachments, handleSAXException, setContentHandler, startElement, startElement |
| Methods inherited from class org.apache.fop.render.PrintRenderer |
addFontList, createRendererContext, getFontFromArea, getFontInfo, getFontList, getFontResolver, getInternalFontNameForArea, instantiateRendererContext, renderDocument, setFontList |
| Methods inherited from class org.apache.fop.render.AbstractRenderer |
convertTitleToString, getCurrentPageViewport, getGraphics2DAdapter, getImageAdapter, getUserAgent, handleBlockTraits, handleRegionTraits, mptToPt, preparePage, ptToMpt, renderBlocks, renderBlockViewport, renderBodyRegion, renderPageAreas, renderRegion, renderXML, startPageSequence, supportsOutOfOrder |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String XML_MIME_TYPE
protected Renderer mimic
| Constructor Detail |
public XMLRenderer()
| Method Detail |
public void setUserAgent(FOUserAgent agent)
setUserAgent in interface RenderersetUserAgent in class AbstractRendererpublic void mimicRenderer(Renderer renderer)
renderer - the renderer to mimic
public void setupFontInfo(FontInfo inFontInfo)
throws FOPException
setupFontInfo in interface RenderersetupFontInfo in class PrintRendererFOPExceptionpublic void setCompactFormat(boolean compact)
compact - true to activate the compact formatprotected void addAreaAttributes(Area area)
area - Area to extract attributes fromprotected void addTraitAttributes(Area area)
area - Area to extract traits frompublic void processOffDocumentItem(OffDocumentItem oDI)
processOffDocumentItem in interface RendererprocessOffDocumentItem in class AbstractXMLRendererprotected void renderBookmarkTree(BookmarkData bookmarkRoot)
renderBookmarkTree in class AbstractXMLRendererbookmarkRoot - the BookmarkData object representing the top of the treeprotected void renderDestination(DestinationData destination)
destination - the destination object
public void startRenderer(java.io.OutputStream outputStream)
throws java.io.IOException
startRenderer in interface RendererstartRenderer in class AbstractXMLRendererjava.io.IOException
public void stopRenderer()
throws java.io.IOException
stopRenderer in interface RendererstopRenderer in class AbstractXMLRendererjava.io.IOException
public void renderPage(PageViewport page)
throws java.io.IOException,
FOPException
renderPage in interface RendererrenderPage in class AbstractRendererjava.io.IOException
FOPExceptionprotected void handleExtensionAttachments(java.util.List attachments)
handleExtensionAttachments in class AbstractXMLRendererattachments - a list of extension attachmentspublic void startPageSequence(PageSequence pageSequence)
startPageSequence in interface RendererstartPageSequence in class AbstractRendererpublic void endPageSequence()
protected void renderRegionViewport(RegionViewport port)
The region may clip the area and it establishes a position from where the region is placed.
renderRegionViewport in class AbstractRendererport - The region viewport to be rendered
protected void startVParea(CTM ctm,
java.awt.geom.Rectangle2D clippingRect)
startVParea in class AbstractRendererctm - the coordinate transformation matrix to useclippingRect - the clipping rectangle if the viewport should be clipping,
null if no clipping is performed.protected void endVParea()
endVParea in class AbstractRendererprotected void renderInlineAreaBackAndBorders(InlineArea area)
renderInlineAreaBackAndBorders in class AbstractRendererarea - the inline area for which the background, border and padding is to be
renderedprotected void renderBeforeFloat(BeforeFloat bf)
renderBeforeFloat in class AbstractRendererbf - The before float areaprotected void renderFootnote(Footnote footnote)
renderFootnote in class AbstractRendererfootnote - The footnoteprotected void renderMainReference(MainReference mr)
The main reference area contains a list of spans that are stacked on the page. The spans contain a list of normal flow reference areas that are positioned into columns.
renderMainReference in class AbstractRenderermr - The main reference areaprotected void renderFlow(NormalFlow flow)
renderFlow in class AbstractRendererflow - The flow reference areaprotected void renderReferenceArea(Block block)
renderReferenceArea in class AbstractRendererblock - the block areaprotected void renderBlock(Block block)
renderBlock in class AbstractRendererblock - The block areaprotected void renderLineArea(LineArea line)
A line area may have grouped styling for its children such as underline, background.
renderLineArea in class AbstractRendererline - The line areaprotected void renderInlineArea(InlineArea inlineArea)
renderInlineArea in class AbstractRendererinlineArea - inline area text to renderprotected void renderViewport(Viewport viewport)
renderViewport in class AbstractRendererviewport - the viewport to render
public void renderImage(Image image,
java.awt.geom.Rectangle2D pos)
renderImage in class AbstractRendererimage - The imagepos - The target position of the image
(todo) Make renderImage() protectedpublic void renderContainer(Container cont)
renderContainer in class AbstractRenderercont - The inline container area
public void renderForeignObject(ForeignObject fo,
java.awt.geom.Rectangle2D pos)
renderForeignObject in class AbstractRendererfo - the foreign objectpos - the position of the foreign objectAbstractRenderer.renderForeignObject(ForeignObject, Rectangle2D)protected void renderInlineSpace(Space space)
renderInlineSpace in class AbstractRendererspace - the space to renderprotected void renderText(TextArea text)
renderText in class AbstractRenderertext - the text to renderprotected void renderWord(WordArea word)
renderWord in class AbstractRendererword - the word to renderprotected void renderSpace(SpaceArea space)
renderSpace in class AbstractRendererspace - the space to renderprotected void renderInlineParent(InlineParent ip)
renderInlineParent in class AbstractRendererip - the inline parent to renderprotected void renderInlineBlockParent(InlineBlockParent ibp)
renderInlineBlockParent in class AbstractRendereribp - the inline block parent to renderprotected void renderLeader(Leader area)
renderLeader in class AbstractRendererarea - the leader to renderpublic java.lang.String getMimeType()
|
fop 1.0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||