public class CompositeListener extends Object implements Listener
Listeners.EMPTY_PARAMETERS| Constructor and Description |
|---|
CompositeListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Listener listener)
Add a nex listener to the list.
|
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 |
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> macroParameters,
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 |
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> macroParameters,
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.
|
Listener |
getListener(int i)
Get listener at the provided position in the list.
|
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,
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbeginFigure, beginFigureCaption, endFigure, endFigureCaptionpublic void addListener(Listener listener)
listener - a listenerpublic Listener getListener(int i)
i - the index of the listener in the listpublic void beginDefinitionDescription()
ListenerbeginDefinitionDescription in interface Listenerpublic void beginDefinitionList(Map<String,String> parameters)
ListenerbeginDefinitionList in interface Listenerparameters - a generic list of parameters for the list. Example: "style"/"background-color: blue"public void beginDefinitionTerm()
ListenerbeginDefinitionTerm in interface Listenerpublic void beginDocument(MetaData metadata)
beginDocument in interface Listenermetadata - the meta data to associate to the following events, see MetaDatapublic void beginFormat(Format format, Map<String,String> parameters)
ListenerbeginFormat in interface Listenerformat - the formatting type (bold, italic, etc)parameters - a generic list of parameters. Example: style="background-color: blue"Formatpublic void beginGroup(Map<String,String> parameters)
ListenerbeginGroup in interface Listenerparameters - a generic list of parameters. Example: style="background-color: blue"public void beginHeader(HeaderLevel level, String id, Map<String,String> parameters)
ListenerbeginHeader in interface Listenerlevel - the header level (1, 2, 3, etc)id - the header unique identifierparameters - a generic list of parameters. Example: style="background-color: blue"HeaderLevelpublic void beginList(ListType type, Map<String,String> parameters)
Listenerpublic void beginListItem()
ListenerbeginListItem in interface Listenerpublic void beginListItem(Map<String,String> parameters)
ListenerbeginListItem in interface Listenerparameters - a generic list of parameters for the list item. Example: "style"/"background-color: blue"public void beginMacroMarker(String name, Map<String,String> macroParameters, String content, boolean isInline)
ListenerbeginMacroMarker in interface Listenername - the macro namemacroParameters - the macro parameterscontent - the macro contentisInline - if true the macro is located in a inline content (like paragraph, etc.)Listener.onMacro(String, java.util.Map, String, boolean)public void beginParagraph(Map<String,String> parameters)
ListenerbeginParagraph in interface Listenerparameters - a generic list of parameters. Example: style="background-color: blue"public void beginQuotation(Map<String,String> parameters)
ListenerbeginQuotation in interface Listenerparameters - a generic list of parameters for the quotation. Example: "style"/"background-color: blue"public void beginQuotationLine()
ListenerbeginQuotationLine in interface Listenerpublic void beginSection(Map<String,String> parameters)
ListenerbeginSection in interface Listenerparameters - a generic list of parameters. Example: style="background-color: blue"HeaderLevelpublic void beginTable(Map<String,String> parameters)
ListenerbeginTable in interface Listenerparameters - a generic list of parameters for the table.public void beginTableCell(Map<String,String> parameters)
ListenerbeginTableCell in interface Listenerparameters - a generic list of parameters for the table cell.public void beginTableHeadCell(Map<String,String> parameters)
ListenerbeginTableHeadCell in interface Listenerparameters - a generic list of parameters for the table head cell.public void beginTableRow(Map<String,String> parameters)
ListenerbeginTableRow in interface Listenerparameters - a generic list of parameters for the table row.public void endDefinitionDescription()
ListenerendDefinitionDescription in interface Listenerpublic void endDefinitionList(Map<String,String> parameters)
ListenerendDefinitionList in interface Listenerparameters - a generic list of parameters for the list. Example: "style"/"background-color: blue"public void endDefinitionTerm()
ListenerendDefinitionTerm in interface Listenerpublic void endDocument(MetaData metadata)
endDocument in interface Listenermetadata - the meta data associated with the previous events, see MetaDatapublic void endFormat(Format format, Map<String,String> parameters)
Listenerpublic void endGroup(Map<String,String> parameters)
Listenerpublic void endHeader(HeaderLevel level, String id, Map<String,String> parameters)
ListenerendHeader in interface Listenerlevel - the header level (1, 2, 3, etc)id - the header unique identifierparameters - a generic list of parameters. Example: style="background-color: blue"HeaderLevelpublic void endList(ListType type, Map<String,String> parameters)
Listenerpublic void endListItem()
ListenerendListItem in interface Listenerpublic void endListItem(Map<String,String> parameters)
ListenerendListItem in interface Listenerparameters - a generic list of parameters for the list item. Example: "style"/"background-color: blue"public void endMacroMarker(String name, Map<String,String> macroParameters, String content, boolean isInline)
ListenerendMacroMarker in interface Listenername - the macro namemacroParameters - the macro parameterscontent - the macro contentisInline - if true the macro is located in a inline content (like paragraph, etc.)Listener.beginMacroMarker(String, java.util.Map, String, boolean)public void endParagraph(Map<String,String> parameters)
ListenerendParagraph in interface Listenerparameters - a generic list of parameters. Example: style="background-color: blue"public void endQuotation(Map<String,String> parameters)
ListenerendQuotation in interface Listenerparameters - a generic list of parameters for the quotation. Example: "style"/"background-color: blue"public void endQuotationLine()
ListenerendQuotationLine in interface Listenerpublic void endSection(Map<String,String> parameters)
ListenerendSection in interface Listenerparameters - a generic list of parameters. Example: style="background-color: blue"HeaderLevelpublic void endTable(Map<String,String> parameters)
Listenerpublic void endTableCell(Map<String,String> parameters)
ListenerendTableCell in interface Listenerparameters - a generic list of parameters for the table cell.public void endTableHeadCell(Map<String,String> parameters)
ListenerendTableHeadCell in interface Listenerparameters - a generic list of parameters for the table head cell.public void endTableRow(Map<String,String> parameters)
ListenerendTableRow in interface Listenerparameters - a generic list of parameters for the table row.public void onEmptyLines(int count)
ListeneronEmptyLines in interface Listenercount - the number of empty lines between 2 standalone Blockspublic void onHorizontalLine(Map<String,String> parameters)
ListeneronHorizontalLine in interface Listenerparameters - a generic list of parameters. Example: style="background-color: blue"public void onId(String name)
Listenerpublic void onMacro(String id, Map<String,String> parameters, String content, boolean inline)
Listenerpublic void onNewLine()
Listenerpublic void onRawText(String text, Syntax syntax)
Listenerpublic void onSpace()
Listenerpublic void onSpecialSymbol(char symbol)
Listener*, <, >, =, quote, etc). Any non alpha numeric character is a
special symbol.onSpecialSymbol in interface Listenersymbol - the symbol encounteredpublic void onVerbatim(String content, boolean inline, Map<String,String> parameters)
ListeneronVerbatim in interface Listenercontent - 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"public void onWord(String word)
Listenerpublic void beginLink(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
beginLink in interface LinkListenerreference - 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"ResourceReferencepublic void endLink(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
endLink in interface LinkListenerreference - 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"ResourceReferencepublic void onImage(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
onImage in interface ImageListenerreference - 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"public void beginMetaData(MetaData metadata)
beginMetaData in interface Listenermetadata - the metadatapublic void endMetaData(MetaData metadata)
endMetaData in interface Listenermetadata - the metadataCopyright © 2004–2018 XWiki. All rights reserved.