|
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.xml.AbstractXMLRenderer
org.apache.fop.render.xml.XMLRenderer
public class 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 |
VERSION
Area Tree (AT) version, used to express an @version attribute in the root element of the AT document, the initial value of which is set to '2.0' to signify that something preceded it (but didn't happen to be marked as such), and that this version is not necessarily backwards compatible with the unmarked (<2.0) version. |
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(FOUserAgent userAgent)
|
|
| 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. |
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). |
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. |
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 |
renderInlineViewport(InlineViewport viewport)
Render the given Viewport. |
protected void |
renderLeader(Leader area)
Render the given Leader. |
protected void |
renderLineArea(LineArea line)
Renders a line area. |
protected void |
renderMainReference(MainReference mr)
Renders the main reference area. |
void |
renderPage(PageViewport page)
Tells the renderer to render a particular page. |
protected void |
renderReferenceArea(Block block)
Renders a block area that represents a reference area. |
protected void |
renderRegionViewport(RegionViewport port)
Renders a region viewport. |
protected void |
renderSpace(SpaceArea space)
Render the given SpaceArea. |
protected void |
renderText(TextArea text)
Render the given TextArea. |
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 |
startPageSequence(PageSequence pageSequence)
Tells the renderer that a new page sequence starts. |
void |
startRenderer(java.io.OutputStream outputStream)
Initiates the rendering phase. |
protected void |
startVParea(CTM ctm,
java.awt.Rectangle clippingRect)
Establishes a new viewport area. |
void |
stopRenderer()
Signals the end of the rendering phase. |
| 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, setDocumentLocale, 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 VERSION
public static final java.lang.String XML_MIME_TYPE
protected Renderer mimic
| Constructor Detail |
|---|
public XMLRenderer(FOUserAgent userAgent)
userAgent - the user agent that contains configuration details. This cannot be null.| Method Detail |
|---|
public void mimicRenderer(Renderer renderer)
renderer - the renderer to mimic
public void setupFontInfo(FontInfo inFontInfo)
throws FOPException
setupFontInfo in interface RenderersetupFontInfo in class PrintRendererinFontInfo - The font information
FOPException - if an error occurs while setting up the font info objectpublic 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 AbstractXMLRendereroDI - The off-document item to be renderedprotected 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 AbstractXMLRendereroutputStream - The OutputStream to use for output
java.io.IOException - If an I/O error occurs
public void stopRenderer()
throws java.io.IOException
stopRenderer in interface RendererstopRenderer in class AbstractXMLRendererjava.io.IOException - If an I/O error occurs
public void renderPage(PageViewport page)
throws java.io.IOException,
FOPException
renderPage in interface RendererrenderPage in class AbstractRendererpage - The page to be rendered
java.io.IOException - if an I/O error occurs
FOPException - if a FOP interal error occurs.protected 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 AbstractRendererpageSequence - the page sequencepublic 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.Rectangle clippingRect)
AbstractRenderer
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 renderInlineViewport(InlineViewport viewport)
renderInlineViewport 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.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||