|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xwiki.rendering.listener.chaining.AbstractChainingListener org.xwiki.rendering.renderer.AbstractChainingPrintRenderer org.xwiki.annotation.internal.renderer.PlainTextNormalizingChainingRenderer
public class PlainTextNormalizingChainingRenderer
Plain text renderer that normalizes spaces in the printed text.
Field Summary |
---|
Fields inherited from interface org.xwiki.rendering.listener.Listener |
---|
EMPTY_PARAMETERS |
Constructor Summary | |
---|---|
PlainTextNormalizingChainingRenderer(ContentAlterer textCleaner,
ListenerChain listenerChain)
Builds an abstract plain text normalizing renderer with the passed text cleaner. |
Method Summary | |
---|---|
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 |
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 |
beginList(ListType listType,
Map<String,String> parameters)
Start of a list. |
void |
beginListItem()
Start of a list item. |
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 |
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 |
endGroup(Map<String,String> parameters)
End of the group. |
void |
endHeader(HeaderLevel level,
String id,
Map<String,String> parameters)
End of a header. |
void |
endList(ListType listType,
Map<String,String> parameters)
End of a list. |
void |
endListItem()
End of a list item. |
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 |
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. |
void |
onEmptyLines(int count)
Represents an empty line between 2 standalone Blocks. |
void |
onHorizontalLine(Map<String,String> parameters)
Represents an horizontal line. |
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 protectedString,
boolean isInline,
Map<String,String> parameters)
A portion of text. |
void |
onWord(String word)
A word. |
protected void |
printSpace()
Print a space to the renderer's printer. |
protected void |
printText(String text)
Prints a text to the renderer's printer. |
Methods inherited from class org.xwiki.rendering.renderer.AbstractChainingPrintRenderer |
---|
getMainPrinter, getPrinter, popPrinter, pushPrinter, setPrinter |
Methods inherited from class org.xwiki.rendering.listener.chaining.AbstractChainingListener |
---|
beginDocument, beginFormat, beginLink, beginMacroMarker, beginMetaData, beginSection, endDocument, endFormat, endLink, endMacroMarker, endMetaData, endSection, getListenerChain, onId, onImage, onMacro, 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.Listener |
---|
beginDocument, beginFormat, beginMacroMarker, beginMetaData, beginSection, endDocument, endFormat, endMacroMarker, endMetaData, endSection, onId, onMacro |
Methods inherited from interface org.xwiki.rendering.listener.LinkListener |
---|
beginLink, endLink |
Methods inherited from interface org.xwiki.rendering.listener.ImageListener |
---|
onImage |
Constructor Detail |
---|
public PlainTextNormalizingChainingRenderer(ContentAlterer textCleaner, ListenerChain listenerChain)
textCleaner
- the text cleaner used to normalize the texts produced by the eventslistenerChain
- the listeners chain this listener is part ofMethod Detail |
---|
public void onWord(String word)
Listener
onWord
in interface Listener
onWord
in class AbstractChainingListener
word
- the word encounteredpublic void onSpecialSymbol(char symbol)
Listener
onSpecialSymbol
in interface Listener
onSpecialSymbol
in class AbstractChainingListener
symbol
- the symbol encounteredpublic void onVerbatim(String protectedString, boolean isInline, Map<String,String> parameters)
Listener
onVerbatim
in interface Listener
onVerbatim
in class AbstractChainingListener
protectedString
- the string to protected from renderingisInline
- 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 onRawText(String text, Syntax syntax)
Listener
onRawText
in interface Listener
onRawText
in class AbstractChainingListener
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 syntaxpublic void onSpace()
Listener
onSpace
in interface Listener
onSpace
in class AbstractChainingListener
protected void printSpace()
protected void printText(String text)
text
- the text to printpublic void onEmptyLines(int count)
Listener
onEmptyLines
in interface Listener
onEmptyLines
in class AbstractChainingListener
count
- the number of empty lines between 2 standalone Blockspublic void onNewLine()
Listener
onNewLine
in interface Listener
onNewLine
in class AbstractChainingListener
public void onHorizontalLine(Map<String,String> parameters)
Listener
onHorizontalLine
in interface Listener
onHorizontalLine
in class AbstractChainingListener
parameters
- a generic list of parameters. Example: style="background-color: blue"public void beginDefinitionDescription()
Listener
beginDefinitionDescription
in interface Listener
beginDefinitionDescription
in class AbstractChainingListener
public void endDefinitionDescription()
Listener
endDefinitionDescription
in interface Listener
endDefinitionDescription
in class AbstractChainingListener
public void beginDefinitionList(Map<String,String> parameters)
Listener
beginDefinitionList
in interface Listener
beginDefinitionList
in class AbstractChainingListener
parameters
- a generic list of parameters for the list. Example: "style"/"background-color: blue"public void endDefinitionList(Map<String,String> parameters)
Listener
endDefinitionList
in interface Listener
endDefinitionList
in class AbstractChainingListener
parameters
- a generic list of parameters for the list. Example: "style"/"background-color: blue"public void beginDefinitionTerm()
Listener
beginDefinitionTerm
in interface Listener
beginDefinitionTerm
in class AbstractChainingListener
public void endDefinitionTerm()
Listener
endDefinitionTerm
in interface Listener
endDefinitionTerm
in class AbstractChainingListener
public void beginGroup(Map<String,String> parameters)
Listener
beginGroup
in interface Listener
beginGroup
in class AbstractChainingListener
parameters
- a generic list of parameters. Example: style="background-color: blue"public void endGroup(Map<String,String> parameters)
Listener
endGroup
in interface Listener
endGroup
in class AbstractChainingListener
parameters
- a generic list of parameters. Example: style="background-color: blue"public void beginHeader(HeaderLevel level, String id, Map<String,String> parameters)
Listener
beginHeader
in interface Listener
beginHeader
in class AbstractChainingListener
level
- the header level (1, 2, 3, etc)id
- the header unique identifierparameters
- a generic list of parameters. Example: style="background-color: blue"HeaderLevel
public void endHeader(HeaderLevel level, String id, Map<String,String> parameters)
Listener
endHeader
in interface Listener
endHeader
in class AbstractChainingListener
level
- the header level (1, 2, 3, etc)id
- the header unique identifierparameters
- a generic list of parameters. Example: style="background-color: blue"HeaderLevel
public void beginList(ListType listType, Map<String,String> parameters)
Listener
beginList
in interface Listener
beginList
in class AbstractChainingListener
listType
- the type of list (bulleted, numbered, etc)parameters
- a generic list of parameters for the list. Example: "style"/"background-color: blue"ListType
public void endList(ListType listType, Map<String,String> parameters)
Listener
endList
in interface Listener
endList
in class AbstractChainingListener
listType
- the type of list (bulleted, numbered, etc)parameters
- a generic list of parameters for the list. Example: "style"/"background-color: blue"ListType
public void beginListItem()
Listener
beginListItem
in interface Listener
beginListItem
in class AbstractChainingListener
public void endListItem()
Listener
endListItem
in interface Listener
endListItem
in class AbstractChainingListener
public void beginParagraph(Map<String,String> parameters)
Listener
beginParagraph
in interface Listener
beginParagraph
in class AbstractChainingListener
parameters
- a generic list of parameters. Example: style="background-color: blue"public void endParagraph(Map<String,String> parameters)
Listener
endParagraph
in interface Listener
endParagraph
in class AbstractChainingListener
parameters
- a generic list of parameters. Example: style="background-color: blue"public void beginQuotation(Map<String,String> parameters)
Listener
beginQuotation
in interface Listener
beginQuotation
in class AbstractChainingListener
parameters
- a generic list of parameters for the quotation. Example: "style"/"background-color: blue"public void endQuotation(Map<String,String> parameters)
Listener
endQuotation
in interface Listener
endQuotation
in class AbstractChainingListener
parameters
- a generic list of parameters for the quotation. Example: "style"/"background-color: blue"public void beginQuotationLine()
Listener
beginQuotationLine
in interface Listener
beginQuotationLine
in class AbstractChainingListener
public void endQuotationLine()
Listener
endQuotationLine
in interface Listener
endQuotationLine
in class AbstractChainingListener
public void beginTable(Map<String,String> parameters)
Listener
beginTable
in interface Listener
beginTable
in class AbstractChainingListener
parameters
- a generic list of parameters for the table.public void endTable(Map<String,String> parameters)
Listener
endTable
in interface Listener
endTable
in class AbstractChainingListener
parameters
- a generic list of parameters for the table.public void beginTableRow(Map<String,String> parameters)
Listener
beginTableRow
in interface Listener
beginTableRow
in class AbstractChainingListener
parameters
- a generic list of parameters for the table row.public void endTableRow(Map<String,String> parameters)
Listener
endTableRow
in interface Listener
endTableRow
in class AbstractChainingListener
parameters
- a generic list of parameters for the table row.public void beginTableHeadCell(Map<String,String> parameters)
Listener
beginTableHeadCell
in interface Listener
beginTableHeadCell
in class AbstractChainingListener
parameters
- a generic list of parameters for the table head cell.public void endTableHeadCell(Map<String,String> parameters)
Listener
endTableHeadCell
in interface Listener
endTableHeadCell
in class AbstractChainingListener
parameters
- a generic list of parameters for the table head cell.public void beginTableCell(Map<String,String> parameters)
Listener
beginTableCell
in interface Listener
beginTableCell
in class AbstractChainingListener
parameters
- a generic list of parameters for the table cell.public void endTableCell(Map<String,String> parameters)
Listener
endTableCell
in interface Listener
endTableCell
in class AbstractChainingListener
parameters
- a generic list of parameters for the table cell.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |