public class PrintInlineListener extends PrintTextListener
fRefHandler
Constructor and Description |
---|
PrintInlineListener(IWikiPrinter printer) |
PrintInlineListener(IWikiPrinter printer,
boolean supportImage,
boolean supportDownload) |
Modifier and Type | Method and Description |
---|---|
void |
beginFormat(WikiFormat format)
This method is called at the beginning of a sequence of in-line elements having the specified formatting
parameters.
|
void |
beginPropertyInline(String str)
This method is called to notify about the beginning of a new inline
property found in the text of the parsed document.
|
void |
endFormat(WikiFormat format)
This method is called to notify about the end of a sequence of in-line elements having common formatting
parameters.
|
void |
endPropertyInline(String inlineProperty)
This method is called to notify about the end of an inline property found
in the text of the parsed document.
|
protected String |
getSymbolEntity(String str)
Returns an HTML/XML entity corresponding to the specified special symbol.
|
protected boolean |
isHtmlEntities()
Returns
true if special Wiki entities should be represented
as the corresponding HTML entities or they should be visualized using the
corresponding XHTML codes (like & and so on). |
protected ReferenceHandler |
newReferenceHandler() |
void |
onEscape(String str)
Escaped symbols.
|
void |
onExtensionInline(String extensionName,
WikiParameters params)
This method is used to notify about a new extension which CAN generate
in-line elements as a result of its interpretation.
|
void |
onLineBreak()
This method is called to notify about a forced line break found in the text.
|
void |
onSpecialSymbol(String str)
This method is called to notify about a sequence of special characters.
|
void |
onVerbatimInline(String str,
WikiParameters params)
This method is called to notify about not-interpreted in-line sequence of characters which should be represented
in the final text "as is".
|
beginDefinitionDescription, beginDefinitionList, beginDefinitionTerm, beginDocument, beginHeader, beginInfoBlock, beginList, beginListItem, beginListItem, beginParagraph, beginPropertyBlock, beginQuotation, beginQuotationLine, beginSection, beginSectionContent, beginTable, beginTableCell, beginTableRow, endBlock, endDefinitionDescription, endDefinitionList, endDefinitionTerm, endDocument, endHeader, endInfoBlock, endList, endListItem, endListItem, endParagraph, endPropertyBlock, endQuotation, endQuotationLine, endSection, endSectionContent, endTable, endTableCell, endTableRow, isSupportDownload, isSupportImage, onEmptyLines, onExtensionBlock, onHorizontalLine, onImage, onImage, onMacroBlock, onMacroInline, onNewLine, onReference, onReference, onSpace, onTableCaption, onVerbatimBlock, onWord, print, println, println
public PrintInlineListener(IWikiPrinter printer)
public PrintInlineListener(IWikiPrinter printer, boolean supportImage, boolean supportDownload)
public void beginFormat(WikiFormat format)
IWemListenerInline
beginFormat
in interface IWemListenerInline
beginFormat
in class PrintTextListener
format
- the object defining formatting parameters of in-line elements.IWemListenerInline.beginFormat(org.xwiki.rendering.wikimodel.WikiFormat)
public void beginPropertyInline(String str)
IWemListenerSemantic
beginPropertyInline
in interface IWemListenerSemantic
beginPropertyInline
in class PrintTextListener
str
- the URI of the semantic inline property found in the
documentIWemListenerSemantic.beginPropertyInline(java.lang.String)
public void endFormat(WikiFormat format)
IWemListenerInline
endFormat
in interface IWemListenerInline
endFormat
in class PrintTextListener
format
- the formatting object defining how contained in-line elements should be formattedIWemListenerInline.endFormat(org.xwiki.rendering.wikimodel.WikiFormat)
public void endPropertyInline(String inlineProperty)
IWemListenerSemantic
endPropertyInline
in interface IWemListenerSemantic
endPropertyInline
in class PrintTextListener
inlineProperty
- the URI of the semantic inline property found in the
documentIWemListenerSemantic.endPropertyInline(java.lang.String)
protected String getSymbolEntity(String str)
str
- the special string to convert to an HTML/XML entityprotected boolean isHtmlEntities()
true
if special Wiki entities should be represented
as the corresponding HTML entities or they should be visualized using the
corresponding XHTML codes (like & and so on). This method can be
overloaded in subclasses to re-define the visualization style.true
if special Wiki entities should be represented
as the corresponding HTML entities or they should be visualized
using the corresponding XHTML codes (like & and so on).protected ReferenceHandler newReferenceHandler()
newReferenceHandler
in class PrintTextListener
public void onEscape(String str)
IWemListenerInline
onEscape
in interface IWemListenerInline
onEscape
in class PrintTextListener
str
- the escaped sequence of charactersIWemListenerInline.onEscape(java.lang.String)
public void onExtensionInline(String extensionName, WikiParameters params)
IWemListenerProgramming
onExtensionInline
in interface IWemListenerProgramming
onExtensionInline
in class PrintTextListener
extensionName
- the name of the extensionparams
- parameters for the extensionpublic void onLineBreak()
IWemListenerInline
IWemListenerInline.onNewLine()
notification.onLineBreak
in interface IWemListenerInline
onLineBreak
in class PrintTextListener
IWemListenerInline.onLineBreak()
public void onSpecialSymbol(String str)
IWemListenerInline
The full list of possible special symbols:
"!", "\"", "#", "$", "%", "&", "'", "(",
")", "*", "+", ",", "-", ".", "/", ":",
";", "<", "=", ">", "?", "@", "[", "\\",
"]", "^", "_", "`", "{", "|", "}", "~"
onSpecialSymbol
in interface IWemListenerInline
onSpecialSymbol
in class PrintTextListener
str
- the sequence of special symbolsIWemListenerInline.onSpecialSymbol(java.lang.String)
public void onVerbatimInline(String str, WikiParameters params)
IWemListenerInline
onVerbatimInline
in interface IWemListenerInline
onVerbatimInline
in class PrintTextListener
str
- the sequence of non-interpreted charactersparams
- the list of parameters for this eventIWemListenerInline.onVerbatimInline(java.lang.String,
WikiParameters)
Copyright © 2004–2021 XWiki. All rights reserved.