Package org.apache.fop.accessibility.fo
Class StructureTreeEventTrigger
- java.lang.Object
-
- org.apache.fop.fo.FOEventHandler
-
- org.apache.fop.accessibility.fo.StructureTreeEventTrigger
-
class StructureTreeEventTrigger extends FOEventHandler
A bridge betweenFOEventHandler
andStructureTreeEventHandler
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
StructureTreeEventTrigger.State
-
Field Summary
Fields Modifier and Type Field Description private java.util.Stack<java.lang.Boolean>
inTableHeader
private LayoutMasterSet
layoutMasterSet
private java.util.Stack<java.util.Locale>
locales
private java.util.Map<AbstractRetrieveMarker,StructureTreeEventTrigger.State>
states
private StructureTreeEventHandler
structureTreeEventHandler
private java.util.Stack<Table>
tables
-
Fields inherited from class org.apache.fop.fo.FOEventHandler
fontInfo, foUserAgent
-
-
Constructor Summary
Constructors Constructor Description StructureTreeEventTrigger(StructureTreeEventHandler structureTreeEventHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addAttribute(org.xml.sax.helpers.AttributesImpl attributes, java.lang.String namespace, java.lang.String localName, java.lang.String prefix, java.lang.String value)
private void
addNoNamespaceAttribute(org.xml.sax.helpers.AttributesImpl attributes, java.lang.String name, java.lang.String value)
private void
addRole(CommonAccessibilityHolder node, org.xml.sax.helpers.AttributesImpl attributes)
private void
addSpanAttribute(org.xml.sax.helpers.AttributesImpl attributes, java.lang.String attributeName, int span)
void
character(Character c)
Process a Character.void
characters(FOText foText)
Process character data.private org.xml.sax.helpers.AttributesImpl
createFlowNameAttribute(java.lang.String flowName)
private org.xml.sax.helpers.AttributesImpl
createLangAttribute(CommonHyphenation hyphProperties)
void
endBlock(Block bl)
void
endBlockContainer(BlockContainer blc)
void
endBody(TableBody body)
void
endCell(TableCell tc)
private void
endElement(FONode node)
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
endPageNumber(PageNumber pagenum)
void
endPageNumberCitation(PageNumberCitation pageCite)
void
endPageNumberCitationLast(PageNumberCitationLast pageLast)
void
endPageSequence(PageSequence pageSeq)
void
endRetrieveMarker(RetrieveMarker retrieveMarker)
Process the ending of a retrieve-marker.void
endRetrieveTableMarker(RetrieveTableMarker retrieveTableMarker)
Process the ending of a retrieve-table-marker.void
endRoot(Root root)
Called upon end of root element.void
endRow(TableRow tr)
void
endStatic(StaticContent staticContent)
Process end of a Static.void
endTable(Table tbl)
void
endWrapper(Wrapper wrapper)
Process the ending of a wrapper.void
image(ExternalGraphic eg)
Process an ExternalGraphic.private void
restoreRetrieveMarkerState(AbstractRetrieveMarker retrieveMarker)
void
restoreState(RetrieveMarker retrieveMarker)
Restore the state of this event handler as it was when the given fo:retrieve-marker element was processed.void
restoreState(RetrieveTableMarker retrieveTableMarker)
(package private) void
saveState(AbstractRetrieveMarker retrieveMarker)
void
startBlock(Block bl)
void
startBlockContainer(BlockContainer blc)
void
startBody(TableBody body)
void
startCell(TableCell tc)
private StructureTreeElement
startElement(FONode node)
private StructureTreeElement
startElement(FONode node, org.xml.sax.helpers.AttributesImpl attributes)
private void
startElementWithID(FONode node)
private void
startElementWithID(FONode node, org.xml.sax.helpers.AttributesImpl attributes)
private void
startElementWithIDAndAltText(FObj node, java.lang.String altText)
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
startInstreamForeignObject(InstreamForeignObject ifo)
Process the start of an InstreamForeignObject.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
startPageNumber(PageNumber pagenum)
void
startPageNumberCitation(PageNumberCitation pageCite)
void
startPageNumberCitationLast(PageNumberCitationLast pageLast)
void
startPageSequence(PageSequence pageSeq)
void
startRetrieveMarker(RetrieveMarker retrieveMarker)
Process the start of a retrieve-marker.void
startRetrieveTableMarker(RetrieveTableMarker retrieveTableMarker)
Process the start of a retrieve-table-marker.void
startRoot(Root root)
Called upon start of root element.void
startRow(TableRow tr)
void
startStatic(StaticContent staticContent)
Process start of a Static.void
startTable(Table tbl)
void
startWrapper(Wrapper wrapper)
Process the start of a wrapper.-
Methods inherited from class org.apache.fop.fo.FOEventHandler
endColumn, endDocument, endExternalDocument, endLeader, endMarkup, getFontInfo, getResults, getUserAgent, pageRef, startColumn, startDocument, startExternalDocument, startLeader, startMarkup
-
-
-
-
Field Detail
-
structureTreeEventHandler
private StructureTreeEventHandler structureTreeEventHandler
-
layoutMasterSet
private LayoutMasterSet layoutMasterSet
-
tables
private java.util.Stack<Table> tables
-
inTableHeader
private java.util.Stack<java.lang.Boolean> inTableHeader
-
locales
private java.util.Stack<java.util.Locale> locales
-
states
private final java.util.Map<AbstractRetrieveMarker,StructureTreeEventTrigger.State> states
-
-
Constructor Detail
-
StructureTreeEventTrigger
public StructureTreeEventTrigger(StructureTreeEventHandler structureTreeEventHandler)
-
-
Method Detail
-
startRoot
public void startRoot(Root root)
Description copied from class:FOEventHandler
Called upon start of root element.- Overrides:
startRoot
in classFOEventHandler
- Parameters:
root
- element
-
endRoot
public void endRoot(Root root)
Description copied from class:FOEventHandler
Called upon end of root element.- Overrides:
endRoot
in classFOEventHandler
- Parameters:
root
- element
-
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.
-
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 pageCite)
- Overrides:
startPageNumberCitation
in classFOEventHandler
- Parameters:
pageCite
- PageNumberCitation that is starting.
-
endPageNumberCitation
public void endPageNumberCitation(PageNumberCitation pageCite)
- Overrides:
endPageNumberCitation
in classFOEventHandler
- Parameters:
pageCite
- PageNumberCitation that is ending.
-
startPageNumberCitationLast
public void startPageNumberCitationLast(PageNumberCitationLast pageLast)
- Overrides:
startPageNumberCitationLast
in classFOEventHandler
- Parameters:
pageLast
- PageNumberCitationLast that is starting.
-
endPageNumberCitationLast
public void endPageNumberCitationLast(PageNumberCitationLast pageLast)
- Overrides:
endPageNumberCitationLast
in classFOEventHandler
- Parameters:
pageLast
- PageNumberCitationLast that is ending.
-
startStatic
public void startStatic(StaticContent staticContent)
Description copied from class:FOEventHandler
Process start of a Static.- Overrides:
startStatic
in classFOEventHandler
- Parameters:
staticContent
- StaticContent that is starting
-
createFlowNameAttribute
private org.xml.sax.helpers.AttributesImpl createFlowNameAttribute(java.lang.String flowName)
-
endStatic
public void endStatic(StaticContent staticContent)
Description copied from class:FOEventHandler
Process end of a Static.- Overrides:
endStatic
in classFOEventHandler
- Parameters:
staticContent
- StaticContent that is ending
-
startFlow
public void startFlow(Flow fl)
Description copied from class:FOEventHandler
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.
-
createLangAttribute
private org.xml.sax.helpers.AttributesImpl createLangAttribute(CommonHyphenation hyphProperties)
-
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 blc)
- Overrides:
endBlockContainer
in classFOEventHandler
- Parameters:
blc
- BlockContainer 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.
-
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.
-
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.
-
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.
-
addSpanAttribute
private void addSpanAttribute(org.xml.sax.helpers.AttributesImpl attributes, java.lang.String attributeName, int span)
-
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)
Description copied from class:FOEventHandler
Process start of a ListLabel.- Overrides:
startListLabel
in classFOEventHandler
- Parameters:
listItemLabel
- ListItemLabel that is starting
-
endListLabel
public void endListLabel(ListItemLabel listItemLabel)
Description copied from class:FOEventHandler
Process end of a ListLabel.- Overrides:
endListLabel
in classFOEventHandler
- Parameters:
listItemLabel
- ListItemLabel that is ending
-
startListBody
public void startListBody(ListItemBody listItemBody)
Description copied from class:FOEventHandler
Process start of a ListBody.- Overrides:
startListBody
in classFOEventHandler
- Parameters:
listItemBody
- ListItemBody that is starting
-
endListBody
public void endListBody(ListItemBody listItemBody)
Description copied from class:FOEventHandler
Process end of a ListBody.- Overrides:
endListBody
in classFOEventHandler
- Parameters:
listItemBody
- ListItemBody that is ending
-
startLink
public void startLink(BasicLink basicLink)
Description copied from class:FOEventHandler
Process start of a Link.- Overrides:
startLink
in classFOEventHandler
- Parameters:
basicLink
- BasicLink that is starting
-
endLink
public void endLink(BasicLink basicLink)
Description copied from class:FOEventHandler
Process end of a Link.- Overrides:
endLink
in classFOEventHandler
- Parameters:
basicLink
- BasicLink that is ending
-
image
public void image(ExternalGraphic eg)
Description copied from class:FOEventHandler
Process an ExternalGraphic.- Overrides:
image
in classFOEventHandler
- Parameters:
eg
- ExternalGraphic to process.
-
startInstreamForeignObject
public void startInstreamForeignObject(InstreamForeignObject ifo)
Description copied from class:FOEventHandler
Process the start of an InstreamForeignObject.- Overrides:
startInstreamForeignObject
in classFOEventHandler
- Parameters:
ifo
- InstreamForeignObject that is starting
-
endInstreamForeignObject
public void endInstreamForeignObject(InstreamForeignObject ifo)
Description copied from class:FOEventHandler
Process the end of an InstreamForeignObject.- Overrides:
endInstreamForeignObject
in classFOEventHandler
- Parameters:
ifo
- InstreamForeignObject that is ending
-
startFootnote
public void startFootnote(Footnote footnote)
Description copied from class:FOEventHandler
Process the start of a footnote.- Overrides:
startFootnote
in classFOEventHandler
- Parameters:
footnote
- Footnote that is starting
-
endFootnote
public void endFootnote(Footnote footnote)
Description copied from class:FOEventHandler
Process the ending of a footnote.- Overrides:
endFootnote
in classFOEventHandler
- Parameters:
footnote
- Footnote that is ending
-
startFootnoteBody
public void startFootnoteBody(FootnoteBody body)
Description copied from class:FOEventHandler
Process the start of a footnote body.- Overrides:
startFootnoteBody
in classFOEventHandler
- Parameters:
body
- FootnoteBody that is starting
-
endFootnoteBody
public void endFootnoteBody(FootnoteBody body)
Description copied from class:FOEventHandler
Process the ending of a footnote body.- Overrides:
endFootnoteBody
in classFOEventHandler
- Parameters:
body
- FootnoteBody that is ending
-
startWrapper
public void startWrapper(Wrapper wrapper)
Description copied from class:FOEventHandler
Process the start of a wrapper.- Overrides:
startWrapper
in classFOEventHandler
- Parameters:
wrapper
- wrapper that is starting
-
endWrapper
public void endWrapper(Wrapper wrapper)
Description copied from class:FOEventHandler
Process the ending of a wrapper.- Overrides:
endWrapper
in classFOEventHandler
- Parameters:
wrapper
- wrapper that is ending
-
startRetrieveMarker
public void startRetrieveMarker(RetrieveMarker retrieveMarker)
Description copied from class:FOEventHandler
Process the start of a retrieve-marker.- Overrides:
startRetrieveMarker
in classFOEventHandler
- Parameters:
retrieveMarker
- the retrieve-marker that is starting
-
saveState
void saveState(AbstractRetrieveMarker retrieveMarker)
-
endRetrieveMarker
public void endRetrieveMarker(RetrieveMarker retrieveMarker)
Description copied from class:FOEventHandler
Process the ending of a retrieve-marker.- Overrides:
endRetrieveMarker
in classFOEventHandler
- Parameters:
retrieveMarker
- the retrieve-marker that is ending
-
restoreState
public void restoreState(RetrieveMarker retrieveMarker)
Description copied from class:FOEventHandler
Restore the state of this event handler as it was when the given fo:retrieve-marker element was processed. This method is called at marker retrieval time, so that events for the marker descendants are fired within the proper context.The default implementation of this method does nothing.
- Overrides:
restoreState
in classFOEventHandler
- Parameters:
retrieveMarker
- the fo:retrieve-marker element that is retrieving markers
-
restoreRetrieveMarkerState
private void restoreRetrieveMarkerState(AbstractRetrieveMarker retrieveMarker)
-
startRetrieveTableMarker
public void startRetrieveTableMarker(RetrieveTableMarker retrieveTableMarker)
Description copied from class:FOEventHandler
Process the start of a retrieve-table-marker.- Overrides:
startRetrieveTableMarker
in classFOEventHandler
- Parameters:
retrieveTableMarker
- the retrieve-table-marker that is starting
-
endRetrieveTableMarker
public void endRetrieveTableMarker(RetrieveTableMarker retrieveTableMarker)
Description copied from class:FOEventHandler
Process the ending of a retrieve-table-marker.- Overrides:
endRetrieveTableMarker
in classFOEventHandler
- Parameters:
retrieveTableMarker
- the retrieve-table-marker that is ending
-
restoreState
public void restoreState(RetrieveTableMarker retrieveTableMarker)
Description copied from class:FOEventHandler
- Overrides:
restoreState
in classFOEventHandler
-
character
public void character(Character c)
Description copied from class:FOEventHandler
Process a Character.- Overrides:
character
in classFOEventHandler
- Parameters:
c
- Character to process.
-
characters
public void characters(FOText foText)
Description copied from class:FOEventHandler
Process character data.- Overrides:
characters
in classFOEventHandler
- Parameters:
foText
- text to process
-
startElement
private StructureTreeElement startElement(FONode node)
-
startElementWithID
private void startElementWithID(FONode node)
-
startElementWithID
private void startElementWithID(FONode node, org.xml.sax.helpers.AttributesImpl attributes)
-
startElementWithIDAndAltText
private void startElementWithIDAndAltText(FObj node, java.lang.String altText)
-
startElement
private StructureTreeElement startElement(FONode node, org.xml.sax.helpers.AttributesImpl attributes)
-
addNoNamespaceAttribute
private void addNoNamespaceAttribute(org.xml.sax.helpers.AttributesImpl attributes, java.lang.String name, java.lang.String value)
-
addAttribute
private void addAttribute(org.xml.sax.helpers.AttributesImpl attributes, java.lang.String namespace, java.lang.String localName, java.lang.String prefix, java.lang.String value)
-
addRole
private void addRole(CommonAccessibilityHolder node, org.xml.sax.helpers.AttributesImpl attributes)
-
endElement
private void endElement(FONode node)
-
-