Class BlockStateChainingListener
- java.lang.Object
-
- org.xwiki.rendering.listener.chaining.AbstractChainingListener
-
- org.xwiki.rendering.listener.chaining.BlockStateChainingListener
-
- All Implemented Interfaces:
ChainingListener,StackableChainingListener,ImageListener,LinkListener,Listener
public class BlockStateChainingListener extends AbstractChainingListener implements StackableChainingListener
Indicates block element for which we are inside and previous blocks.- Since:
- 1.8RC1
- Version:
- $Id: eedc46a5d421634a11818a962a268908209d2cdc $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBlockStateChainingListener.Event
-
Field Summary
-
Fields inherited from interface org.xwiki.rendering.listener.Listener
EMPTY_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description BlockStateChainingListener(ListenerChain listenerChain)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginDefinitionDescription()Start of a definition list description.voidbeginDefinitionList(Map<String,String> parameters)Start of a definition list.voidbeginDefinitionTerm()Start of a definition list term.voidbeginDocument(MetaData metadata)Start of the document.voidbeginFigure(Map<String,String> parameters)Start of a figure.voidbeginFigureCaption(Map<String,String> parameters)Start of a figure caption.voidbeginFormat(Format format, Map<String,String> parameters)End of a text formatting block.voidbeginGroup(Map<String,String> parameters)Start a group of elements.voidbeginHeader(HeaderLevel level, String id, Map<String,String> parameters)Start of a header.voidbeginLink(ResourceReference reference, boolean freestanding, Map<String,String> parameters)Start of a link.voidbeginList(ListType type, Map<String,String> parameters)Start of a list.voidbeginListItem()Start of a list item.voidbeginListItem(Map<String,String> parameters)Start of a list item.voidbeginMacroMarker(String name, Map<String,String> parameters, String content, boolean isInline)Start of marker containing a macro definition.voidbeginMetaData(MetaData metadata)Start of MetaData (eg saving source from where the content is coming from).voidbeginParagraph(Map<String,String> parameters)Start of a paragraph.voidbeginQuotation(Map<String,String> parameters)Start of a quotation.voidbeginQuotationLine()Start of a quotation line.voidbeginSection(Map<String,String> parameters)Start of a section.voidbeginTable(Map<String,String> parameters)Start of a table.voidbeginTableCell(Map<String,String> parameters)Start of a table cell.voidbeginTableHeadCell(Map<String,String> parameters)Start of a table head cell.voidbeginTableRow(Map<String,String> parameters)Start of a table row.StackableChainingListenercreateChainingListenerInstance()voidendDefinitionDescription()End of a definition list description.voidendDefinitionList(Map<String,String> parameters)End of a definition list.voidendDefinitionTerm()End of a definition list term.voidendDocument(MetaData metadata)End of the document.voidendFigure(Map<String,String> parameters)End of a figure.voidendFigureCaption(Map<String,String> parameters)End of a figure caption.voidendFormat(Format format, Map<String,String> parameters)End of a text formatting block.voidendGroup(Map<String,String> parameters)End of the group.voidendHeader(HeaderLevel level, String id, Map<String,String> parameters)End of a header.voidendLink(ResourceReference reference, boolean freestanding, Map<String,String> parameters)End of a link.voidendList(ListType type, Map<String,String> parameters)End of a list.voidendListItem()End of a list item.voidendListItem(Map<String,String> parameters)End of a list item.voidendMacroMarker(String name, Map<String,String> parameters, String content, boolean isInline)End of marker containing a macro definition.voidendMetaData(MetaData metadata)End of MetaData.voidendParagraph(Map<String,String> parameters)End of a paragraph.voidendQuotation(Map<String,String> parameters)End of a quotation.voidendQuotationLine()End of a quotation line.voidendSection(Map<String,String> parameters)End of a section.voidendTable(Map<String,String> parameters)End of a table.voidendTableCell(Map<String,String> parameters)End of a table cell.voidendTableHeadCell(Map<String,String> parameters)End of a table head cell.voidendTableRow(Map<String,String> parameters)End of a table row.intgetCellCol()intgetCellRow()intgetDefinitionListDepth()intgetDefinitionListItemIndex()intgetInlineDepth()intgetLinkDepth()intgetListDepth()intgetListItemIndex()intgetMacroDepth()BlockStateChainingListener.EventgetParentEvent()BlockStateChainingListener.EventgetPreviousEvent()intgetQuotationDepth()intgetQuotationLineDepth()intgetQuotationLineIndex()booleanisInDefinitionList()booleanisInHeader()booleanisInLine()booleanisInLink()booleanisInList()booleanisInMacro()booleanisInParagraph()booleanisInQuotation()booleanisInQuotationLine()booleanisInTable()booleanisInTableCell()voidonEmptyLines(int count)Represents an empty line between 2 standalone Blocks.voidonHorizontalLine(Map<String,String> parameters)Represents an horizontal line.voidonId(String name)A reference/location in a page.voidonImage(ResourceReference reference, boolean freestanding, String id, Map<String,String> parameters)An image.voidonImage(ResourceReference reference, boolean freestanding, Map<String,String> parameters)An image.voidonMacro(String id, Map<String,String> parameters, String content, boolean inline)A Macro.voidonNewLine()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).voidonRawText(String text, Syntax syntax)Some text to inject directly into the listener output without parsing it.voidonSpace()A space.voidonSpecialSymbol(char symbol)A special symbol (*,<,>,=, quote, etc).voidonVerbatim(String content, boolean inline, Map<String,String> parameters)A portion of text.voidonWord(String word)A word.voidpopLinkDepth()voidpushLinkDepth()-
Methods inherited from class org.xwiki.rendering.listener.chaining.AbstractChainingListener
getListenerChain, setListenerChain
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.xwiki.rendering.listener.chaining.ChainingListener
getListenerChain
-
-
-
-
Constructor Detail
-
BlockStateChainingListener
public BlockStateChainingListener(ListenerChain listenerChain)
-
-
Method Detail
-
createChainingListenerInstance
public StackableChainingListener createChainingListenerInstance()
- Specified by:
createChainingListenerInstancein interfaceStackableChainingListener- Returns:
- the new instance of the listener
-
getPreviousEvent
public BlockStateChainingListener.Event getPreviousEvent()
-
getInlineDepth
public int getInlineDepth()
-
isInLine
public boolean isInLine()
-
isInParagraph
public boolean isInParagraph()
-
isInHeader
public boolean isInHeader()
-
isInTable
public boolean isInTable()
-
isInTableCell
public boolean isInTableCell()
-
getCellCol
public int getCellCol()
-
getCellRow
public int getCellRow()
-
getDefinitionListDepth
public int getDefinitionListDepth()
-
isInDefinitionList
public boolean isInDefinitionList()
-
getDefinitionListItemIndex
public int getDefinitionListItemIndex()
-
getListDepth
public int getListDepth()
-
isInList
public boolean isInList()
-
getListItemIndex
public int getListItemIndex()
-
pushLinkDepth
public void pushLinkDepth()
-
popLinkDepth
public void popLinkDepth()
-
getLinkDepth
public int getLinkDepth()
-
isInLink
public boolean isInLink()
-
getQuotationDepth
public int getQuotationDepth()
-
isInQuotation
public boolean isInQuotation()
-
getQuotationLineDepth
public int getQuotationLineDepth()
-
isInQuotationLine
public boolean isInQuotationLine()
-
getQuotationLineIndex
public int getQuotationLineIndex()
-
getMacroDepth
public int getMacroDepth()
-
isInMacro
public boolean isInMacro()
-
getParentEvent
@Unstable public BlockStateChainingListener.Event getParentEvent()
- Returns:
- The event that encloses the current event.
- Since:
- 14.0RC1
-
beginDocument
public void beginDocument(MetaData metadata)
Start of the document.- Specified by:
beginDocumentin interfaceListener- Overrides:
beginDocumentin classAbstractChainingListener- Parameters:
metadata- the meta data to associate to the following events, seeMetaData- Since:
- 14.0RC1
-
beginDefinitionDescription
public void beginDefinitionDescription()
Description copied from interface:ListenerStart of a definition list description. For example in HTML this is the equivalent of <dd>.- Specified by:
beginDefinitionDescriptionin interfaceListener- Overrides:
beginDefinitionDescriptionin 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:
beginDefinitionListin interfaceListener- Overrides:
beginDefinitionListin 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:ListenerStart of a definition list term. For example in HTML this is the equivalent of <dt>.- Specified by:
beginDefinitionTermin interfaceListener- Overrides:
beginDefinitionTermin classAbstractChainingListener
-
beginLink
public void beginLink(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
Start of a link.- Specified by:
beginLinkin interfaceLinkListener- Overrides:
beginLinkin 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:ListenerStart of a list.- Specified by:
beginListin interfaceListener- Overrides:
beginListin 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:ListenerStart of a list item.- Specified by:
beginListItemin interfaceListener- Overrides:
beginListItemin classAbstractChainingListener
-
beginListItem
public void beginListItem(Map<String,String> parameters)
Description copied from interface:ListenerStart of a list item.- Specified by:
beginListItemin interfaceListener- Overrides:
beginListItemin 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:ListenerStart 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:
beginMacroMarkerin interfaceListener- Overrides:
beginMacroMarkerin 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:
beginMetaDatain interfaceListener- Overrides:
beginMetaDatain classAbstractChainingListener- Parameters:
metadata- the metadata- Since:
- 14.0RC1
-
beginGroup
public void beginGroup(Map<String,String> parameters)
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:
beginGroupin interfaceListener- Overrides:
beginGroupin classAbstractChainingListener- Parameters:
parameters- a generic list of parameters. Example: style="background-color: blue"- Since:
- 14.0RC1
-
beginParagraph
public void beginParagraph(Map<String,String> parameters)
Description copied from interface:ListenerStart of a paragraph.- Specified by:
beginParagraphin interfaceListener- Overrides:
beginParagraphin 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:ListenerStart of a quotation. There are one or several quotation lines inside a quotation block.- Specified by:
beginQuotationin interfaceListener- Overrides:
beginQuotationin classAbstractChainingListener- Parameters:
parameters- a generic list of parameters for the quotation. Example: "style"/"background-color: blue"
-
beginQuotationLine
public void beginQuotationLine()
Description copied from interface:ListenerStart of a quotation line. There can be several quotation lines in a quotation block.- Specified by:
beginQuotationLinein interfaceListener- Overrides:
beginQuotationLinein classAbstractChainingListener
-
beginHeader
public void beginHeader(HeaderLevel level, String id, Map<String,String> parameters)
Description copied from interface:ListenerStart of a header.- Specified by:
beginHeaderin interfaceListener- Overrides:
beginHeaderin 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
-
beginTable
public void beginTable(Map<String,String> parameters)
Description copied from interface:ListenerStart of a table.- Specified by:
beginTablein interfaceListener- Overrides:
beginTablein classAbstractChainingListener- Parameters:
parameters- a generic list of parameters for the table.
-
beginTableRow
public void beginTableRow(Map<String,String> parameters)
Description copied from interface:ListenerStart of a table row.- Specified by:
beginTableRowin interfaceListener- Overrides:
beginTableRowin classAbstractChainingListener- Parameters:
parameters- a generic list of parameters for the table row.
-
beginTableCell
public void beginTableCell(Map<String,String> parameters)
Description copied from interface:ListenerStart of a table cell.- Specified by:
beginTableCellin interfaceListener- Overrides:
beginTableCellin classAbstractChainingListener- Parameters:
parameters- a generic list of parameters for the table cell.
-
beginTableHeadCell
public void beginTableHeadCell(Map<String,String> parameters)
Description copied from interface:ListenerStart of a table head cell.- Specified by:
beginTableHeadCellin interfaceListener- Overrides:
beginTableHeadCellin classAbstractChainingListener- Parameters:
parameters- a generic list of parameters for the table head cell.
-
endDefinitionDescription
public void endDefinitionDescription()
Description copied from interface:ListenerEnd of a definition list description. For example in HTML this is the equivalent of </dd>.- Specified by:
endDefinitionDescriptionin interfaceListener- Overrides:
endDefinitionDescriptionin 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:
endDefinitionListin interfaceListener- Overrides:
endDefinitionListin 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:ListenerEnd of a definition list term. For example in HTML this is the equivalent of </dt>.- Specified by:
endDefinitionTermin interfaceListener- Overrides:
endDefinitionTermin classAbstractChainingListener
-
endDocument
public void endDocument(MetaData metadata)
End of the document.- Specified by:
endDocumentin interfaceListener- Overrides:
endDocumentin classAbstractChainingListener- Parameters:
metadata- the meta data associated with the previous events, seeMetaData- Since:
- 3.0M2
-
beginFormat
public void beginFormat(Format format, Map<String,String> parameters)
End of a text formatting block.- Specified by:
beginFormatin interfaceListener- Overrides:
beginFormatin classAbstractChainingListener- Parameters:
format- the formatting type (bold, italic, etc)parameters- a generic list of parameters. Example: style="background-color: blue"- Since:
- 14.0RC1
- See Also:
Format
-
endFormat
public void endFormat(Format format, Map<String,String> parameters)
Description copied from interface:ListenerEnd of a text formatting block.- Specified by:
endFormatin interfaceListener- Overrides:
endFormatin classAbstractChainingListener- Parameters:
format- the formatting type (bold, italic, etc)parameters- a generic list of parameters. Example: style="background-color: blue"- See Also:
Format
-
endLink
public void endLink(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
End of a link.- Specified by:
endLinkin interfaceLinkListener- Overrides:
endLinkin 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:ListenerEnd of a list.- Specified by:
endListin interfaceListener- Overrides:
endListin 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:ListenerEnd of a list item.- Specified by:
endListItemin interfaceListener- Overrides:
endListItemin classAbstractChainingListener
-
endListItem
public void endListItem(Map<String,String> parameters)
Description copied from interface:ListenerEnd of a list item.- Specified by:
endListItemin interfaceListener- Overrides:
endListItemin 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:ListenerEnd of marker containing a macro definition.- Specified by:
endMacroMarkerin interfaceListener- Overrides:
endMacroMarkerin 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:
endMetaDatain interfaceListener- Overrides:
endMetaDatain classAbstractChainingListener- Parameters:
metadata- the metadata- Since:
- 14.0RC1
-
endGroup
public void endGroup(Map<String,String> parameters)
End of the group.- Specified by:
endGroupin interfaceListener- Overrides:
endGroupin classAbstractChainingListener- Parameters:
parameters- a generic list of parameters. Example: style="background-color: blue"- Since:
- 14.0RC1
-
endParagraph
public void endParagraph(Map<String,String> parameters)
Description copied from interface:ListenerEnd of a paragraph.- Specified by:
endParagraphin interfaceListener- Overrides:
endParagraphin 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:ListenerEnd of a quotation.- Specified by:
endQuotationin interfaceListener- Overrides:
endQuotationin classAbstractChainingListener- Parameters:
parameters- a generic list of parameters for the quotation. Example: "style"/"background-color: blue"
-
endQuotationLine
public void endQuotationLine()
Description copied from interface:ListenerEnd of a quotation line.- Specified by:
endQuotationLinein interfaceListener- Overrides:
endQuotationLinein classAbstractChainingListener
-
beginSection
public void beginSection(Map<String,String> parameters)
Start of a section.- Specified by:
beginSectionin interfaceListener- Overrides:
beginSectionin classAbstractChainingListener- Parameters:
parameters- a generic list of parameters. Example: style="background-color: blue"- Since:
- 14.0RC1
- See Also:
HeaderLevel
-
endSection
public void endSection(Map<String,String> parameters)
Description copied from interface:ListenerEnd of a section.- Specified by:
endSectionin interfaceListener- Overrides:
endSectionin classAbstractChainingListener- Parameters:
parameters- a generic list of parameters. Example: style="background-color: blue"- See Also:
HeaderLevel
-
endHeader
public void endHeader(HeaderLevel level, String id, Map<String,String> parameters)
Description copied from interface:ListenerEnd of a header.- Specified by:
endHeaderin interfaceListener- Overrides:
endHeaderin 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
-
endTable
public void endTable(Map<String,String> parameters)
Description copied from interface:ListenerEnd of a table.- Specified by:
endTablein interfaceListener- Overrides:
endTablein classAbstractChainingListener- Parameters:
parameters- a generic list of parameters for the table.
-
endTableCell
public void endTableCell(Map<String,String> parameters)
Description copied from interface:ListenerEnd of a table cell.- Specified by:
endTableCellin interfaceListener- Overrides:
endTableCellin classAbstractChainingListener- Parameters:
parameters- a generic list of parameters for the table cell.
-
endTableHeadCell
public void endTableHeadCell(Map<String,String> parameters)
Description copied from interface:ListenerEnd of a table head cell.- Specified by:
endTableHeadCellin interfaceListener- Overrides:
endTableHeadCellin 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:ListenerEnd of a table row.- Specified by:
endTableRowin interfaceListener- Overrides:
endTableRowin classAbstractChainingListener- Parameters:
parameters- a generic list of parameters for the table row.
-
beginFigure
public void beginFigure(Map<String,String> parameters)
Start of a figure.- Specified by:
beginFigurein interfaceListener- Overrides:
beginFigurein classAbstractChainingListener- Parameters:
parameters- a generic list of parameters for the figure- Since:
- 14.0RC1
-
endFigure
public void endFigure(Map<String,String> parameters)
Description copied from interface:ListenerEnd of a figure.- Specified by:
endFigurein interfaceListener- Overrides:
endFigurein classAbstractChainingListener- Parameters:
parameters- a generic list of parameters for the figure
-
beginFigureCaption
public void beginFigureCaption(Map<String,String> parameters)
Description copied from interface:ListenerStart of a figure caption.- Specified by:
beginFigureCaptionin interfaceListener- Overrides:
beginFigureCaptionin classAbstractChainingListener- Parameters:
parameters- a generic list of parameters for the figure
-
endFigureCaption
public void endFigureCaption(Map<String,String> parameters)
Description copied from interface:ListenerEnd of a figure caption.- Specified by:
endFigureCaptionin interfaceListener- Overrides:
endFigureCaptionin classAbstractChainingListener- Parameters:
parameters- a generic list of parameters for the figure
-
onRawText
public void onRawText(String text, Syntax syntax)
Description copied from interface:ListenerSome 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:
onRawTextin interfaceListener- Overrides:
onRawTextin 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:ListenerRepresents 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:
onEmptyLinesin interfaceListener- Overrides:
onEmptyLinesin classAbstractChainingListener- Parameters:
count- the number of empty lines between 2 standalone Blocks
-
onHorizontalLine
public void onHorizontalLine(Map<String,String> parameters)
Description copied from interface:ListenerRepresents an horizontal line.- Specified by:
onHorizontalLinein interfaceListener- Overrides:
onHorizontalLinein classAbstractChainingListener- Parameters:
parameters- a generic list of parameters. Example: style="background-color: blue"
-
onId
public void onId(String name)
Description copied from interface:ListenerA 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:
onIdin interfaceListener- Overrides:
onIdin classAbstractChainingListener- Parameters:
name- the location name.
-
onImage
public void onImage(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
An image.- Specified by:
onImagein interfaceImageListener- Overrides:
onImagein 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:ImageListenerAn image.- Specified by:
onImagein interfaceImageListener- Overrides:
onImagein 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"
-
onNewLine
public void onNewLine()
Description copied from interface:ListenerA 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:
onNewLinein interfaceListener- Overrides:
onNewLinein classAbstractChainingListener
-
onSpace
public void onSpace()
Description copied from interface:ListenerA space.- Specified by:
onSpacein interfaceListener- Overrides:
onSpacein classAbstractChainingListener
-
onSpecialSymbol
public void onSpecialSymbol(char symbol)
Description copied from interface:ListenerA special symbol (*,<,>,=, quote, etc). Any non alpha numeric character is a special symbol.- Specified by:
onSpecialSymbolin interfaceListener- Overrides:
onSpecialSymbolin classAbstractChainingListener- Parameters:
symbol- the symbol encountered
-
onVerbatim
public void onVerbatim(String content, boolean inline, Map<String,String> parameters)
Description copied from interface:ListenerA portion of text.- Specified by:
onVerbatimin interfaceListener- Overrides:
onVerbatimin 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:ListenerA 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:
onWordin interfaceListener- Overrides:
onWordin classAbstractChainingListener- Parameters:
word- the word encountered
-
onMacro
public void onMacro(String id, Map<String,String> parameters, String content, boolean inline)
Description copied from interface:ListenerA Macro.- Specified by:
onMacroin interfaceListener- Overrides:
onMacroin 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.)
-
-