Class LookaheadChainingListener
- java.lang.Object
-
- org.xwiki.rendering.listener.chaining.AbstractChainingListener
-
- org.xwiki.rendering.listener.chaining.LookaheadChainingListener
-
- All Implemented Interfaces:
ChainingListener
,ImageListener
,LinkListener
,Listener
public class LookaheadChainingListener extends AbstractChainingListener
Stores events without emitting them back in order to accumulate them and to provide a lookahead feature. The lookahead depth is configurable.- Since:
- 1.8RC1
- Version:
- $Id: 3ac129d014a1faf8f2dd4c5a5324d5753825ba73 $
-
-
Field Summary
-
Fields inherited from interface org.xwiki.rendering.listener.Listener
EMPTY_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description LookaheadChainingListener(ListenerChain listenerChain, int lookaheadDepth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginDefinitionDescription()
Start of a definition list description.void
beginDefinitionList(Map<String,String> parameters)
Start of a definition list.void
beginDefinitionTerm()
Start of a definition list term.void
beginDocument(MetaData metadata)
Start of the document.void
beginFigure(Map<String,String> parameters)
Start of a figure.void
beginFigureCaption(Map<String,String> parameters)
Start of a figure caption.void
beginFormat(Format format, Map<String,String> parameters)
End of a text formatting block.void
beginGroup(Map<String,String> parameters)
Start a group of elements.void
beginHeader(HeaderLevel level, String id, Map<String,String> parameters)
Start of a header.void
beginLink(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
Start of a link.void
beginList(ListType type, Map<String,String> parameters)
Start of a list.void
beginListItem()
Start of a list item.void
beginListItem(Map<String,String> parameters)
Start of a list item.void
beginMacroMarker(String name, Map<String,String> parameters, String content, boolean isInline)
Start of marker containing a macro definition.void
beginMetaData(MetaData metadata)
Start of MetaData (eg saving source from where the content is coming from).void
beginParagraph(Map<String,String> parameters)
Start of a paragraph.void
beginQuotation(Map<String,String> parameters)
Start of a quotation.void
beginQuotationLine()
Start of a quotation line.void
beginSection(Map<String,String> parameters)
Start of a section.void
beginTable(Map<String,String> parameters)
Start of a table.void
beginTableCell(Map<String,String> parameters)
Start of a table cell.void
beginTableHeadCell(Map<String,String> parameters)
Start of a table head cell.void
beginTableRow(Map<String,String> parameters)
Start of a table row.void
endDefinitionDescription()
End of a definition list description.void
endDefinitionList(Map<String,String> parameters)
End of a definition list.void
endDefinitionTerm()
End of a definition list term.void
endDocument(MetaData metadata)
End of the document.void
endFigure(Map<String,String> parameters)
End of a figure.void
endFigureCaption(Map<String,String> parameters)
End of a figure caption.void
endFormat(Format format, Map<String,String> parameters)
End of a text formatting block.void
endGroup(Map<String,String> parameters)
End of the group.void
endHeader(HeaderLevel level, String id, Map<String,String> parameters)
End of a header.void
endLink(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
End of a link.void
endList(ListType type, Map<String,String> parameters)
End of a list.void
endListItem()
End of a list item.void
endListItem(Map<String,String> parameters)
End of a list item.void
endMacroMarker(String name, Map<String,String> parameters, String content, boolean isInline)
End of marker containing a macro definition.void
endMetaData(MetaData metadata)
End of MetaData.void
endParagraph(Map<String,String> parameters)
End of a paragraph.void
endQuotation(Map<String,String> parameters)
End of a quotation.void
endQuotationLine()
End of a quotation line.void
endSection(Map<String,String> parameters)
End of a section.void
endTable(Map<String,String> parameters)
End of a table.void
endTableCell(Map<String,String> parameters)
End of a table cell.void
endTableHeadCell(Map<String,String> parameters)
End of a table head cell.void
endTableRow(Map<String,String> parameters)
End of a table row.QueueListener.Event
getNextEvent()
QueueListener.Event
getNextEvent(int depth)
protected QueueListener
getPreviousEvents()
void
onEmptyLines(int count)
Represents an empty line between 2 standalone Blocks.void
onHorizontalLine(Map<String,String> parameters)
Represents an horizontal line.void
onId(String name)
A reference/location in a page.void
onImage(ResourceReference reference, boolean freestanding, String id, Map<String,String> parameters)
An image.void
onImage(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
An image.void
onMacro(String id, Map<String,String> parameters, String content, boolean inline)
A Macro.void
onNewLine()
A new line or line break (it's up to the renderers to decide if it should be outputted as a new line or as a line break in the given syntax).void
onRawText(String text, Syntax syntax)
Some text to inject directly into the listener output without parsing it.void
onSpace()
A space.void
onSpecialSymbol(char symbol)
A special symbol (*
,<
,>
,=
, quote, etc).void
onVerbatim(String content, boolean inline, Map<String,String> parameters)
A portion of text.void
onWord(String word)
A word.protected void
setLookaheadDepth(int lookaheadDepth)
Redefine the stacking depth.void
transferStart(QueueListener eventsToTransfer)
Transfer all passed events by removing the from the passed parameter and moving them to the beginning of the event stack.-
Methods inherited from class org.xwiki.rendering.listener.chaining.AbstractChainingListener
getListenerChain, setListenerChain
-
-
-
-
Constructor Detail
-
LookaheadChainingListener
public LookaheadChainingListener(ListenerChain listenerChain, int lookaheadDepth)
-
-
Method Detail
-
setLookaheadDepth
protected void setLookaheadDepth(int lookaheadDepth)
Redefine the stacking depth.- Parameters:
lookaheadDepth
- the new depth to set- Since:
- 10.5RC1
-
getPreviousEvents
protected QueueListener getPreviousEvents()
- Returns:
- the list of stacked events
- Since:
- 10.5RC1
-
getNextEvent
public QueueListener.Event getNextEvent()
-
getNextEvent
public QueueListener.Event getNextEvent(int depth)
-
beginDefinitionDescription
public void beginDefinitionDescription()
Description copied from interface:Listener
Start of a definition list description. For example in HTML this is the equivalent of <dd>.- Specified by:
beginDefinitionDescription
in interfaceListener
- Overrides:
beginDefinitionDescription
in classAbstractChainingListener
-
beginDefinitionList
public void beginDefinitionList(Map<String,String> parameters)
Start of a definition list. For example in HTML this is the equivalent of <dl>.- Specified by:
beginDefinitionList
in interfaceListener
- Overrides:
beginDefinitionList
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the list. Example: "style"/"background-color: blue"- Since:
- 2.0RC1
-
beginDefinitionTerm
public void beginDefinitionTerm()
Description copied from interface:Listener
Start of a definition list term. For example in HTML this is the equivalent of <dt>.- Specified by:
beginDefinitionTerm
in interfaceListener
- Overrides:
beginDefinitionTerm
in classAbstractChainingListener
-
beginDocument
public void beginDocument(MetaData metadata)
Start of the document.- Specified by:
beginDocument
in interfaceListener
- Overrides:
beginDocument
in classAbstractChainingListener
- Parameters:
metadata
- the meta data to associate to the following events, seeMetaData
- Since:
- 3.0M2
-
beginGroup
public void beginGroup(Map<String,String> parameters)
Description copied from interface:Listener
Start a group of elements. Groups are used to allow using standalone elements in list items, table cells, etc. They can also be used to set parameters on a group of standalone elements.- Specified by:
beginGroup
in interfaceListener
- Overrides:
beginGroup
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters. Example: style="background-color: blue"
-
beginFormat
public void beginFormat(Format format, Map<String,String> parameters)
Description copied from interface:Listener
End of a text formatting block.- Specified by:
beginFormat
in interfaceListener
- Overrides:
beginFormat
in classAbstractChainingListener
- Parameters:
format
- the formatting type (bold, italic, etc)parameters
- a generic list of parameters. Example: style="background-color: blue"- See Also:
Format
-
beginHeader
public void beginHeader(HeaderLevel level, String id, Map<String,String> parameters)
Description copied from interface:Listener
Start of a header.- Specified by:
beginHeader
in interfaceListener
- Overrides:
beginHeader
in classAbstractChainingListener
- Parameters:
level
- the header level (1, 2, 3, etc)id
- the header unique identifierparameters
- a generic list of parameters. Example: style="background-color: blue"- See Also:
HeaderLevel
-
beginLink
public void beginLink(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
Start of a link.- Specified by:
beginLink
in interfaceLinkListener
- Overrides:
beginLink
in classAbstractChainingListener
- Parameters:
reference
- the link referencefreestanding
- if true then the link is a free standing URI directly in the textparameters
- a generic list of parameters. Example: style="background-color: blue"- Since:
- 2.5RC1
- See Also:
ResourceReference
-
beginList
public void beginList(ListType type, Map<String,String> parameters)
Description copied from interface:Listener
Start of a list.- Specified by:
beginList
in interfaceListener
- Overrides:
beginList
in classAbstractChainingListener
- Parameters:
type
- the type of list (bulleted, numbered, etc)parameters
- a generic list of parameters for the list. Example: "style"/"background-color: blue"- See Also:
ListType
-
beginListItem
public void beginListItem()
Description copied from interface:Listener
Start of a list item.- Specified by:
beginListItem
in interfaceListener
- Overrides:
beginListItem
in classAbstractChainingListener
-
beginListItem
public void beginListItem(Map<String,String> parameters)
Description copied from interface:Listener
Start of a list item.- Specified by:
beginListItem
in interfaceListener
- Overrides:
beginListItem
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the list item. Example: "style"/"background-color: blue"
-
beginMacroMarker
public void beginMacroMarker(String name, Map<String,String> parameters, String content, boolean isInline)
Description copied from interface:Listener
Start of marker containing a macro definition. This is a special that Macro Blocks emits when they are executed so that it's possible to reconstruct the initial macro syntax even after Macros have been executed. This is used for exemple by the WYSIWYG editor to let use see the result of executing a macro and still let them modify the macro definition.- Specified by:
beginMacroMarker
in interfaceListener
- Overrides:
beginMacroMarker
in classAbstractChainingListener
- Parameters:
name
- the macro nameparameters
- the macro parameterscontent
- the macro contentisInline
- if true the macro is located in a inline content (like paragraph, etc.)- See Also:
Listener.onMacro(String, java.util.Map, String, boolean)
-
beginMetaData
public void beginMetaData(MetaData metadata)
Start of MetaData (eg saving source from where the content is coming from).- Specified by:
beginMetaData
in interfaceListener
- Overrides:
beginMetaData
in classAbstractChainingListener
- Parameters:
metadata
- the metadata- Since:
- 3.0M2
-
beginParagraph
public void beginParagraph(Map<String,String> parameters)
Description copied from interface:Listener
Start of a paragraph.- Specified by:
beginParagraph
in interfaceListener
- Overrides:
beginParagraph
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters. Example: style="background-color: blue"
-
beginQuotation
public void beginQuotation(Map<String,String> parameters)
Description copied from interface:Listener
Start of a quotation. There are one or several quotation lines inside a quotation block.- Specified by:
beginQuotation
in interfaceListener
- Overrides:
beginQuotation
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the quotation. Example: "style"/"background-color: blue"
-
beginQuotationLine
public void beginQuotationLine()
Description copied from interface:Listener
Start of a quotation line. There can be several quotation lines in a quotation block.- Specified by:
beginQuotationLine
in interfaceListener
- Overrides:
beginQuotationLine
in classAbstractChainingListener
-
beginSection
public void beginSection(Map<String,String> parameters)
Description copied from interface:Listener
Start of a section.- Specified by:
beginSection
in interfaceListener
- Overrides:
beginSection
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters. Example: style="background-color: blue"- See Also:
HeaderLevel
-
beginTable
public void beginTable(Map<String,String> parameters)
Description copied from interface:Listener
Start of a table.- Specified by:
beginTable
in interfaceListener
- Overrides:
beginTable
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the table.
-
beginTableCell
public void beginTableCell(Map<String,String> parameters)
Description copied from interface:Listener
Start of a table cell.- Specified by:
beginTableCell
in interfaceListener
- Overrides:
beginTableCell
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the table cell.
-
beginTableHeadCell
public void beginTableHeadCell(Map<String,String> parameters)
Description copied from interface:Listener
Start of a table head cell.- Specified by:
beginTableHeadCell
in interfaceListener
- Overrides:
beginTableHeadCell
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the table head cell.
-
beginTableRow
public void beginTableRow(Map<String,String> parameters)
Description copied from interface:Listener
Start of a table row.- Specified by:
beginTableRow
in interfaceListener
- Overrides:
beginTableRow
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the table row.
-
beginFigure
public void beginFigure(Map<String,String> parameters)
Description copied from interface:Listener
Start of a figure.- Specified by:
beginFigure
in interfaceListener
- Overrides:
beginFigure
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the figure
-
beginFigureCaption
public void beginFigureCaption(Map<String,String> parameters)
Description copied from interface:Listener
Start of a figure caption.- Specified by:
beginFigureCaption
in interfaceListener
- Overrides:
beginFigureCaption
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the figure
-
endDefinitionDescription
public void endDefinitionDescription()
Description copied from interface:Listener
End of a definition list description. For example in HTML this is the equivalent of </dd>.- Specified by:
endDefinitionDescription
in interfaceListener
- Overrides:
endDefinitionDescription
in classAbstractChainingListener
-
endDefinitionList
public void endDefinitionList(Map<String,String> parameters)
End of a definition list. For example in HTML this is the equivalent of </dl>.- Specified by:
endDefinitionList
in interfaceListener
- Overrides:
endDefinitionList
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the list. Example: "style"/"background-color: blue"- Since:
- 2.0RC1
-
endDefinitionTerm
public void endDefinitionTerm()
Description copied from interface:Listener
End of a definition list term. For example in HTML this is the equivalent of </dt>.- Specified by:
endDefinitionTerm
in interfaceListener
- Overrides:
endDefinitionTerm
in classAbstractChainingListener
-
endDocument
public void endDocument(MetaData metadata)
End of the document.- Specified by:
endDocument
in interfaceListener
- Overrides:
endDocument
in classAbstractChainingListener
- Parameters:
metadata
- the meta data associated with the previous events, seeMetaData
- Since:
- 3.0M2
-
endGroup
public void endGroup(Map<String,String> parameters)
Description copied from interface:Listener
End of the group.- Specified by:
endGroup
in interfaceListener
- Overrides:
endGroup
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters. Example: style="background-color: blue"
-
endFormat
public void endFormat(Format format, Map<String,String> parameters)
Description copied from interface:Listener
End of a text formatting block.- Specified by:
endFormat
in interfaceListener
- Overrides:
endFormat
in classAbstractChainingListener
- Parameters:
format
- the formatting type (bold, italic, etc)parameters
- a generic list of parameters. Example: style="background-color: blue"- See Also:
Format
-
endHeader
public void endHeader(HeaderLevel level, String id, Map<String,String> parameters)
Description copied from interface:Listener
End of a header.- Specified by:
endHeader
in interfaceListener
- Overrides:
endHeader
in classAbstractChainingListener
- Parameters:
level
- the header level (1, 2, 3, etc)id
- the header unique identifierparameters
- a generic list of parameters. Example: style="background-color: blue"- See Also:
HeaderLevel
-
endLink
public void endLink(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
End of a link.- Specified by:
endLink
in interfaceLinkListener
- Overrides:
endLink
in classAbstractChainingListener
- Parameters:
reference
- the link referencefreestanding
- if true then the link is a free standing URI directly in the textparameters
- a generic list of parameters. Example: style="background-color: blue"- Since:
- 2.5RC1
- See Also:
ResourceReference
-
endList
public void endList(ListType type, Map<String,String> parameters)
Description copied from interface:Listener
End of a list.- Specified by:
endList
in interfaceListener
- Overrides:
endList
in classAbstractChainingListener
- Parameters:
type
- the type of list (bulleted, numbered, etc)parameters
- a generic list of parameters for the list. Example: "style"/"background-color: blue"- See Also:
ListType
-
endListItem
public void endListItem()
Description copied from interface:Listener
End of a list item.- Specified by:
endListItem
in interfaceListener
- Overrides:
endListItem
in classAbstractChainingListener
-
endListItem
public void endListItem(Map<String,String> parameters)
Description copied from interface:Listener
End of a list item.- Specified by:
endListItem
in interfaceListener
- Overrides:
endListItem
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the list item. Example: "style"/"background-color: blue"
-
endMacroMarker
public void endMacroMarker(String name, Map<String,String> parameters, String content, boolean isInline)
Description copied from interface:Listener
End of marker containing a macro definition.- Specified by:
endMacroMarker
in interfaceListener
- Overrides:
endMacroMarker
in classAbstractChainingListener
- Parameters:
name
- the macro nameparameters
- the macro parameterscontent
- the macro contentisInline
- if true the macro is located in a inline content (like paragraph, etc.)- See Also:
Listener.beginMacroMarker(String, java.util.Map, String, boolean)
-
endMetaData
public void endMetaData(MetaData metadata)
End of MetaData.- Specified by:
endMetaData
in interfaceListener
- Overrides:
endMetaData
in classAbstractChainingListener
- Parameters:
metadata
- the metadata- Since:
- 3.0M2
-
endParagraph
public void endParagraph(Map<String,String> parameters)
Description copied from interface:Listener
End of a paragraph.- Specified by:
endParagraph
in interfaceListener
- Overrides:
endParagraph
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters. Example: style="background-color: blue"
-
endQuotation
public void endQuotation(Map<String,String> parameters)
Description copied from interface:Listener
End of a quotation.- Specified by:
endQuotation
in interfaceListener
- Overrides:
endQuotation
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the quotation. Example: "style"/"background-color: blue"
-
endQuotationLine
public void endQuotationLine()
Description copied from interface:Listener
End of a quotation line.- Specified by:
endQuotationLine
in interfaceListener
- Overrides:
endQuotationLine
in classAbstractChainingListener
-
endSection
public void endSection(Map<String,String> parameters)
Description copied from interface:Listener
End of a section.- Specified by:
endSection
in interfaceListener
- Overrides:
endSection
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters. Example: style="background-color: blue"- See Also:
HeaderLevel
-
endTable
public void endTable(Map<String,String> parameters)
Description copied from interface:Listener
End of a table.- Specified by:
endTable
in interfaceListener
- Overrides:
endTable
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the table.
-
endTableCell
public void endTableCell(Map<String,String> parameters)
Description copied from interface:Listener
End of a table cell.- Specified by:
endTableCell
in interfaceListener
- Overrides:
endTableCell
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the table cell.
-
endTableHeadCell
public void endTableHeadCell(Map<String,String> parameters)
Description copied from interface:Listener
End of a table head cell.- Specified by:
endTableHeadCell
in interfaceListener
- Overrides:
endTableHeadCell
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the table head cell.
-
endTableRow
public void endTableRow(Map<String,String> parameters)
Description copied from interface:Listener
End of a table row.- Specified by:
endTableRow
in interfaceListener
- Overrides:
endTableRow
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the table row.
-
endFigure
public void endFigure(Map<String,String> parameters)
Description copied from interface:Listener
End of a figure.- Specified by:
endFigure
in interfaceListener
- Overrides:
endFigure
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the figure
-
endFigureCaption
public void endFigureCaption(Map<String,String> parameters)
Description copied from interface:Listener
End of a figure caption.- Specified by:
endFigureCaption
in interfaceListener
- Overrides:
endFigureCaption
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters for the figure
-
onRawText
public void onRawText(String text, Syntax syntax)
Description copied from interface:Listener
Some text to inject directly into the listener output without parsing it. For example a HTML macro could inject directly some HTML entered by the user into the rendered HTML output. Note that it's not recommended to use this event in most cases since it can lead to invalid content being generated and in addition most listener implementations will not understand the injected text and will just ignore it.- Specified by:
onRawText
in interfaceListener
- Overrides:
onRawText
in classAbstractChainingListener
- Parameters:
text
- the text to injectsyntax
- the syntax in which the text is written. This is useful so that listener implementations can decide whether they can handle direct inject for that syntax
-
onEmptyLines
public void onEmptyLines(int count)
Description copied from interface:Listener
Represents an empty line between 2 standalone Blocks. A standalone block is block that is not included in another block. Standalone blocks are Paragraph, Standalone Macro, Lists, Table, etc.- Specified by:
onEmptyLines
in interfaceListener
- Overrides:
onEmptyLines
in classAbstractChainingListener
- Parameters:
count
- the number of empty lines between 2 standalone Blocks
-
onHorizontalLine
public void onHorizontalLine(Map<String,String> parameters)
Description copied from interface:Listener
Represents an horizontal line.- Specified by:
onHorizontalLine
in interfaceListener
- Overrides:
onHorizontalLine
in classAbstractChainingListener
- Parameters:
parameters
- a generic list of parameters. Example: style="background-color: blue"
-
onId
public void onId(String name)
Description copied from interface:Listener
A reference/location in a page. In HTML for example this is called an Anchor. It allows pointing to that location, for example in links. Note that there is no wiki syntax for this in general and it's often generated by Macros (such as the TOC Macro).- Specified by:
onId
in interfaceListener
- Overrides:
onId
in classAbstractChainingListener
- Parameters:
name
- the location name.
-
onImage
public void onImage(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
An image.- Specified by:
onImage
in interfaceImageListener
- Overrides:
onImage
in classAbstractChainingListener
- Parameters:
reference
- the image referencefreestanding
- if true then the image is defined directly as a URI in the textparameters
- a generic list of parameters. Example: style="background-color: blue"- Since:
- 2.5RC1
-
onImage
public void onImage(ResourceReference reference, boolean freestanding, String id, Map<String,String> parameters)
Description copied from interface:ImageListener
An image.- Specified by:
onImage
in interfaceImageListener
- Overrides:
onImage
in classAbstractChainingListener
- Parameters:
reference
- the image referencefreestanding
- if true then the image is defined directly as a URI in the textid
- the (generated) id of the imageparameters
- a generic list of parameters. Example: style="background-color: blue"
-
onMacro
public void onMacro(String id, Map<String,String> parameters, String content, boolean inline)
Description copied from interface:Listener
A Macro.- Specified by:
onMacro
in interfaceListener
- Overrides:
onMacro
in classAbstractChainingListener
- Parameters:
id
- the macro id (eg "toc" for the TOC macro)parameters
- the macro parameterscontent
- the macro contentinline
- if true the macro is located in a inline content (like paragraph, etc.)
-
onNewLine
public void onNewLine()
Description copied from interface:Listener
A new line or line break (it's up to the renderers to decide if it should be outputted as a new line or as a line break in the given syntax).- Specified by:
onNewLine
in interfaceListener
- Overrides:
onNewLine
in classAbstractChainingListener
-
onSpace
public void onSpace()
Description copied from interface:Listener
A space.- Specified by:
onSpace
in interfaceListener
- Overrides:
onSpace
in classAbstractChainingListener
-
onSpecialSymbol
public void onSpecialSymbol(char symbol)
Description copied from interface:Listener
A special symbol (*
,<
,>
,=
, quote, etc). Any non alpha numeric character is a special symbol.- Specified by:
onSpecialSymbol
in interfaceListener
- Overrides:
onSpecialSymbol
in classAbstractChainingListener
- Parameters:
symbol
- the symbol encountered
-
onVerbatim
public void onVerbatim(String content, boolean inline, Map<String,String> parameters)
Description copied from interface:Listener
A portion of text.- Specified by:
onVerbatim
in interfaceListener
- Overrides:
onVerbatim
in classAbstractChainingListener
- Parameters:
content
- the string to protected from renderinginline
- if true the text content is located in a inline content (like paragraph, etc.)parameters
- a generic list of parameters. Example: style="background-color: blue"
-
onWord
public void onWord(String word)
Description copied from interface:Listener
A word. Note that sentences ar broken into different events: word events, special symbols events, space events, etc. This allows fine-grained actions for listeners.- Specified by:
onWord
in interfaceListener
- Overrides:
onWord
in classAbstractChainingListener
- Parameters:
word
- the word encountered
-
transferStart
public void transferStart(QueueListener eventsToTransfer)
Transfer all passed events by removing the from the passed parameter and moving them to the beginning of the event stack.- Parameters:
eventsToTransfer
- the collection of events to move- Since:
- 10.5RC1
-
-