Package org.apache.fop.render.rtf
Class RTFHandler
- java.lang.Object
-
- org.apache.fop.fo.FOEventHandler
-
- org.apache.fop.render.rtf.RTFHandler
-
public class RTFHandler extends FOEventHandler
RTF Handler: generates RTF output using the structure events from the FO Tree sent to this structure handler.
-
-
Field Summary
-
Fields inherited from class org.apache.fop.fo.FOEventHandler
fontInfo, foUserAgent
-
-
Constructor Summary
Constructors Constructor Description RTFHandler(FOUserAgent userAgent, java.io.OutputStream os)
Creates a new RTF structure handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endBlock(Block bl)
void
endBlockContainer(BlockContainer bl)
void
endBody(TableBody body)
void
endCell(TableCell tc)
void
endColumn(TableColumn tc)
boolean
endContainer(java.lang.Class containerClass)
Closes any mismatched tags that are detected in the RTF structure.void
endDocument()
This method is called to indicate the end of a document run.void
endFlow(Flow fl)
void
endFooter(TableFooter footer)
void
endFootnote(Footnote footnote)
Process the ending of a footnote.void
endFootnoteBody(FootnoteBody body)
Process the ending of a footnote body.void
endHeader(TableHeader header)
void
endInline(Inline inl)
void
endInstreamForeignObject(InstreamForeignObject ifo)
Process the end of an InstreamForeignObject.void
endLink(BasicLink basicLink)
Process end of a Link.void
endList(ListBlock lb)
void
endListBody(ListItemBody listItemBody)
Process end of a ListBody.void
endListItem(ListItem li)
void
endListLabel(ListItemLabel listItemLabel)
Process end of a ListLabel.void
endMarkup()
Process end of a Markup.void
endPageNumber(PageNumber pagenum)
void
endPageSequence(PageSequence pageSeq)
void
endRow(TableRow tr)
void
endStatic(StaticContent statisContent)
Process end of a Static.void
endTable(Table tbl)
protected void
handleIOTrouble(java.io.IOException ioe)
Central exception handler for I/O exceptions.void
image(ExternalGraphic eg)
Process an ExternalGraphic.void
pageRef()
Process a pageRef.void
startBlock(Block bl)
void
startBlockContainer(BlockContainer blc)
void
startBody(TableBody body)
void
startCell(TableCell tc)
void
startColumn(TableColumn tc)
void
startDocument()
This method is called to indicate the start of a new document run.void
startFlow(Flow fl)
This method is called to indicate the start of a new fo:flow or fo:static-content.void
startFooter(TableFooter footer)
void
startFootnote(Footnote footnote)
Process the start of a footnote.void
startFootnoteBody(FootnoteBody body)
Process the start of a footnote body.void
startHeader(TableHeader header)
void
startInline(Inline inl)
void
startLeader(Leader l)
Process the start of a Leader.void
startLink(BasicLink basicLink)
Process start of a Link.void
startList(ListBlock lb)
void
startListBody(ListItemBody listItemBody)
Process start of a ListBody.void
startListItem(ListItem li)
void
startListLabel(ListItemLabel listItemLabel)
Process start of a ListLabel.void
startMarkup()
Process start of a Markup.void
startPageNumber(PageNumber pagenum)
void
startPageNumberCitation(PageNumberCitation l)
void
startPageNumberCitationLast(PageNumberCitationLast l)
void
startPageSequence(PageSequence pageSeq)
void
startRow(TableRow tr)
void
startStatic(StaticContent staticContent)
Process start of a Static.void
startTable(Table tbl)
void
text(FOText text, java.lang.CharSequence characters)
-
Methods inherited from class org.apache.fop.fo.FOEventHandler
character, characters, endExternalDocument, endLeader, endPageNumberCitation, endPageNumberCitationLast, endRetrieveMarker, endRetrieveTableMarker, endRoot, endWrapper, getFontInfo, getResults, getUserAgent, restoreState, restoreState, startExternalDocument, startInstreamForeignObject, startRetrieveMarker, startRetrieveTableMarker, startRoot, startWrapper
-
-
-
-
Constructor Detail
-
RTFHandler
public RTFHandler(FOUserAgent userAgent, java.io.OutputStream os)
Creates a new RTF structure handler.- Parameters:
userAgent
- the FOUserAgent for this processos
- OutputStream to write to
-
-
Method Detail
-
handleIOTrouble
protected void handleIOTrouble(java.io.IOException ioe)
Central exception handler for I/O exceptions.- Parameters:
ioe
- IOException to handle
-
startDocument
public void startDocument() throws org.xml.sax.SAXException
This method is called to indicate the start of a new document run.- Overrides:
startDocument
in classFOEventHandler
- Throws:
org.xml.sax.SAXException
- In case of a problem
-
endDocument
public void endDocument() throws org.xml.sax.SAXException
This method is called to indicate the end of a document run.- Overrides:
endDocument
in classFOEventHandler
- Throws:
org.xml.sax.SAXException
- In case of a problem
-
startPageSequence
public void startPageSequence(PageSequence pageSeq)
- Overrides:
startPageSequence
in classFOEventHandler
- Parameters:
pageSeq
- PageSequence that is starting.
-
endPageSequence
public void endPageSequence(PageSequence pageSeq)
- Overrides:
endPageSequence
in classFOEventHandler
- Parameters:
pageSeq
- PageSequence that is ending.
-
startFlow
public void startFlow(Flow fl)
This method is called to indicate the start of a new fo:flow or fo:static-content. This method also handles fo:static-content tags, because the StaticContent class is derived from the Flow class.- Overrides:
startFlow
in classFOEventHandler
- Parameters:
fl
- Flow that is starting.
-
endFlow
public void endFlow(Flow fl)
- Overrides:
endFlow
in classFOEventHandler
- Parameters:
fl
- Flow that is ending.
-
startBlock
public void startBlock(Block bl)
- Overrides:
startBlock
in classFOEventHandler
- Parameters:
bl
- Block that is starting.
-
endBlock
public void endBlock(Block bl)
- Overrides:
endBlock
in classFOEventHandler
- Parameters:
bl
- Block that is ending.
-
startBlockContainer
public void startBlockContainer(BlockContainer blc)
- Overrides:
startBlockContainer
in classFOEventHandler
- Parameters:
blc
- BlockContainer that is starting.
-
endBlockContainer
public void endBlockContainer(BlockContainer bl)
- Overrides:
endBlockContainer
in classFOEventHandler
- Parameters:
bl
- BlockContainer that is ending.
-
startTable
public void startTable(Table tbl)
- Overrides:
startTable
in classFOEventHandler
- Parameters:
tbl
- Table that is starting.
-
endTable
public void endTable(Table tbl)
- Overrides:
endTable
in classFOEventHandler
- Parameters:
tbl
- Table that is ending.
-
startColumn
public void startColumn(TableColumn tc)
- Overrides:
startColumn
in classFOEventHandler
- Parameters:
tc
- TableColumn that is starting;
-
endColumn
public void endColumn(TableColumn tc)
- Overrides:
endColumn
in classFOEventHandler
- Parameters:
tc
- TableColumn that is ending;
-
startHeader
public void startHeader(TableHeader header)
- Overrides:
startHeader
in classFOEventHandler
- Parameters:
header
- TableHeader that is starting;
-
endHeader
public void endHeader(TableHeader header)
- Overrides:
endHeader
in classFOEventHandler
- Parameters:
header
- TableHeader that is ending.
-
startFooter
public void startFooter(TableFooter footer)
- Overrides:
startFooter
in classFOEventHandler
- Parameters:
footer
- TableFooter that is starting.
-
endFooter
public void endFooter(TableFooter footer)
- Overrides:
endFooter
in classFOEventHandler
- Parameters:
footer
- TableFooter that is ending.
-
startInline
public void startInline(Inline inl)
- Overrides:
startInline
in classFOEventHandler
- Parameters:
inl
- Inline that is starting.
-
endInline
public void endInline(Inline inl)
- Overrides:
endInline
in classFOEventHandler
- Parameters:
inl
- Inline that is ending.
-
startBody
public void startBody(TableBody body)
- Overrides:
startBody
in classFOEventHandler
- Parameters:
body
- TableBody that is starting.
-
endBody
public void endBody(TableBody body)
- Overrides:
endBody
in classFOEventHandler
- Parameters:
body
- TableBody that is ending.
-
startRow
public void startRow(TableRow tr)
- Overrides:
startRow
in classFOEventHandler
- Parameters:
tr
- TableRow that is starting.
-
endRow
public void endRow(TableRow tr)
- Overrides:
endRow
in classFOEventHandler
- Parameters:
tr
- TableRow that is ending.
-
startCell
public void startCell(TableCell tc)
- Overrides:
startCell
in classFOEventHandler
- Parameters:
tc
- TableCell that is starting.
-
endCell
public void endCell(TableCell tc)
- Overrides:
endCell
in classFOEventHandler
- Parameters:
tc
- TableCell that is ending.
-
startList
public void startList(ListBlock lb)
- Overrides:
startList
in classFOEventHandler
- Parameters:
lb
- ListBlock that is starting.
-
endList
public void endList(ListBlock lb)
- Overrides:
endList
in classFOEventHandler
- Parameters:
lb
- ListBlock that is ending.
-
startListItem
public void startListItem(ListItem li)
- Overrides:
startListItem
in classFOEventHandler
- Parameters:
li
- ListItem that is starting.
-
endListItem
public void endListItem(ListItem li)
- Overrides:
endListItem
in classFOEventHandler
- Parameters:
li
- ListItem that is ending.
-
startListLabel
public void startListLabel(ListItemLabel listItemLabel)
Process start of a ListLabel.- Overrides:
startListLabel
in classFOEventHandler
- Parameters:
listItemLabel
- ListItemLabel that is starting
-
endListLabel
public void endListLabel(ListItemLabel listItemLabel)
Process end of a ListLabel.- Overrides:
endListLabel
in classFOEventHandler
- Parameters:
listItemLabel
- ListItemLabel that is ending
-
startListBody
public void startListBody(ListItemBody listItemBody)
Process start of a ListBody.- Overrides:
startListBody
in classFOEventHandler
- Parameters:
listItemBody
- ListItemBody that is starting
-
endListBody
public void endListBody(ListItemBody listItemBody)
Process end of a ListBody.- Overrides:
endListBody
in classFOEventHandler
- Parameters:
listItemBody
- ListItemBody that is ending
-
startStatic
public void startStatic(StaticContent staticContent)
Process start of a Static.- Overrides:
startStatic
in classFOEventHandler
- Parameters:
staticContent
- StaticContent that is starting
-
endStatic
public void endStatic(StaticContent statisContent)
Process end of a Static.- Overrides:
endStatic
in classFOEventHandler
- Parameters:
statisContent
- StaticContent that is ending
-
startMarkup
public void startMarkup()
Process start of a Markup.- Overrides:
startMarkup
in classFOEventHandler
-
endMarkup
public void endMarkup()
Process end of a Markup.- Overrides:
endMarkup
in classFOEventHandler
-
startLink
public void startLink(BasicLink basicLink)
Process start of a Link.- Overrides:
startLink
in classFOEventHandler
- Parameters:
basicLink
- BasicLink that is starting
-
endLink
public void endLink(BasicLink basicLink)
Process end of a Link.- Overrides:
endLink
in classFOEventHandler
- Parameters:
basicLink
- BasicLink that is ending
-
image
public void image(ExternalGraphic eg)
Process an ExternalGraphic.- Overrides:
image
in classFOEventHandler
- Parameters:
eg
- ExternalGraphic to process.
-
endInstreamForeignObject
public void endInstreamForeignObject(InstreamForeignObject ifo)
Process the end of an InstreamForeignObject.- Overrides:
endInstreamForeignObject
in classFOEventHandler
- Parameters:
ifo
- InstreamForeignObject that is ending
-
pageRef
public void pageRef()
Process a pageRef.- Overrides:
pageRef
in classFOEventHandler
-
startFootnote
public void startFootnote(Footnote footnote)
Process the start of a footnote.- Overrides:
startFootnote
in classFOEventHandler
- Parameters:
footnote
- Footnote that is starting
-
endFootnote
public void endFootnote(Footnote footnote)
Process the ending of a footnote.- Overrides:
endFootnote
in classFOEventHandler
- Parameters:
footnote
- Footnote that is ending
-
startFootnoteBody
public void startFootnoteBody(FootnoteBody body)
Process the start of a footnote body.- Overrides:
startFootnoteBody
in classFOEventHandler
- Parameters:
body
- FootnoteBody that is starting
-
endFootnoteBody
public void endFootnoteBody(FootnoteBody body)
Process the ending of a footnote body.- Overrides:
endFootnoteBody
in classFOEventHandler
- Parameters:
body
- FootnoteBody that is ending
-
startLeader
public void startLeader(Leader l)
Process the start of a Leader.- Overrides:
startLeader
in classFOEventHandler
- Parameters:
l
- Leader that is starting
-
text
public void text(FOText text, java.lang.CharSequence characters)
- Parameters:
text
- FOText objectcharacters
- CharSequence of the characters to process.
-
startPageNumber
public void startPageNumber(PageNumber pagenum)
- Overrides:
startPageNumber
in classFOEventHandler
- Parameters:
pagenum
- PageNumber that is starting.
-
endPageNumber
public void endPageNumber(PageNumber pagenum)
- Overrides:
endPageNumber
in classFOEventHandler
- Parameters:
pagenum
- PageNumber that is ending.
-
startPageNumberCitation
public void startPageNumberCitation(PageNumberCitation l)
- Overrides:
startPageNumberCitation
in classFOEventHandler
- Parameters:
l
- PageNumberCitation that is starting.
-
startPageNumberCitationLast
public void startPageNumberCitationLast(PageNumberCitationLast l)
- Overrides:
startPageNumberCitationLast
in classFOEventHandler
- Parameters:
l
- PageNumberCitationLast that is starting.
-
endContainer
public boolean endContainer(java.lang.Class containerClass)
Closes any mismatched tags that are detected in the RTF structure.- Parameters:
containerClass
- The class representing the tag to close.- Returns:
- Determines whether the tag mismatch has been handled.
-
-