|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.rendering.listener.chaining.AbstractChainingListener
org.xwiki.rendering.listener.chaining.TextOnNewLineStateChainingListener
public class TextOnNewLineStateChainingListener
Indicate if the text being written starts a new line. By text we mean Space, Special Symbol and Words. This is useful for some Renderers which need to have this information. For example the XWiki Syntax renderer uses it to decide whether to escape "*" characters starting new lines since otherwise they would be confused for list items.
| Field Summary |
|---|
| Fields inherited from interface org.xwiki.rendering.listener.Listener |
|---|
EMPTY_PARAMETERS |
| Constructor Summary | |
|---|---|
TextOnNewLineStateChainingListener(ListenerChain listenerChain)
|
|
| 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 |
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 isFreeStandingURI,
Map<String,String> parameters)
Start of a link. |
void |
beginList(ListType listType,
Map<String,String> parameters)
Start of a list. |
void |
beginListItem()
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 |
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. |
StackableChainingListener |
createChainingListenerInstance()
|
void |
endHeader(HeaderLevel level,
String id,
Map<String,String> parameters)
End of a header. |
void |
endLink(ResourceReference reference,
boolean isFreeStandingURI,
Map<String,String> parameters)
End of a link. |
void |
endParagraph(Map<String,String> parameters)
End of a paragraph. |
void |
endTable(Map<String,String> parameters)
End of a table. |
boolean |
isTextOnNewLine()
|
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 isFreeStandingURI,
Map<String,String> parameters)
An image. |
void |
onMacro(String id,
Map<String,String> parameters,
String content,
boolean isInline)
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 |
onVerbatim(String protectedString,
boolean isInline,
Map<String,String> parameters)
A portion of text. |
| Methods inherited from class org.xwiki.rendering.listener.chaining.AbstractChainingListener |
|---|
beginMetaData, beginSection, endDefinitionDescription, endDefinitionList, endDefinitionTerm, endDocument, endFormat, endGroup, endList, endListItem, endMacroMarker, endMetaData, endQuotation, endQuotationLine, endSection, endTableCell, endTableHeadCell, endTableRow, getListenerChain, onEmptyLines, onSpace, onSpecialSymbol, onWord, 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 |
| Methods inherited from interface org.xwiki.rendering.listener.Listener |
|---|
beginMetaData, beginSection, endDefinitionDescription, endDefinitionList, endDefinitionTerm, endDocument, endFormat, endGroup, endList, endListItem, endMacroMarker, endMetaData, endQuotation, endQuotationLine, endSection, endTableCell, endTableHeadCell, endTableRow, onEmptyLines, onSpace, onSpecialSymbol, onWord |
| Constructor Detail |
|---|
public TextOnNewLineStateChainingListener(ListenerChain listenerChain)
| Method Detail |
|---|
public StackableChainingListener createChainingListenerInstance()
createChainingListenerInstance in interface StackableChainingListenerStackableChainingListener.createChainingListenerInstance()public boolean isTextOnNewLine()
public void beginDefinitionDescription()
beginDefinitionDescription in interface ListenerbeginDefinitionDescription in class AbstractChainingListenerAbstractChainingListener.beginDefinitionDescription()public void beginDefinitionList(Map<String,String> parameters)
beginDefinitionList in interface ListenerbeginDefinitionList in class AbstractChainingListenerparameters - a generic list of parameters for the list. Example: "style"/"background-color: blue"AbstractChainingListener.beginDefinitionList(java.util.Map)public void beginDefinitionTerm()
beginDefinitionTerm in interface ListenerbeginDefinitionTerm in class AbstractChainingListenerAbstractChainingListener.beginDefinitionTerm()public void beginDocument(MetaData metaData)
beginDocument in interface ListenerbeginDocument in class AbstractChainingListenermetaData - the meta data to associate to the following events, see MetaDataAbstractChainingListener.beginDocument(org.xwiki.rendering.listener.MetaData)public void beginGroup(Map<String,String> parameters)
beginGroup in interface ListenerbeginGroup in class AbstractChainingListenerparameters - a generic list of parameters. Example: style="background-color: blue"AbstractChainingListener.beginGroup(Map)
public void beginFormat(Format format,
Map<String,String> parameters)
beginFormat in interface ListenerbeginFormat in class AbstractChainingListenerformat - the formatting type (bold, italic, etc)parameters - a generic list of parameters. Example: style="background-color: blue"AbstractChainingListener.beginFormat(org.xwiki.rendering.listener.Format,
java.util.Map)
public void beginLink(ResourceReference reference,
boolean isFreeStandingURI,
Map<String,String> parameters)
beginLink in interface LinkListenerbeginLink in class AbstractChainingListenerreference - the link referenceisFreeStandingURI - if true then the link is a free standing URI directly in the textparameters - a generic list of parameters. Example: style="background-color: blue"AbstractChainingListener.beginLink(
org.xwiki.rendering.listener.reference.ResourceReference , boolean, java.util.Map)
public void beginList(ListType listType,
Map<String,String> parameters)
beginList in interface ListenerbeginList in class AbstractChainingListenerlistType - the type of list (bulleted, numbered, etc)parameters - a generic list of parameters for the list. Example: "style"/"background-color: blue"AbstractChainingListener.beginList(org.xwiki.rendering.listener.ListType,
java.util.Map)public void beginListItem()
beginListItem in interface ListenerbeginListItem in class AbstractChainingListenerAbstractChainingListener.beginListItem()
public void beginMacroMarker(String name,
Map<String,String> parameters,
String content,
boolean isInline)
beginMacroMarker in interface ListenerbeginMacroMarker in class AbstractChainingListenername - the macro nameparameters - the macro parameterscontent - the macro contentisInline - if true the macro is located in a inline content (like paragraph, etc.)AbstractChainingListener.beginMacroMarker(java.lang.String,
java.util.Map, java.lang.String, boolean)public void beginParagraph(Map<String,String> parameters)
beginParagraph in interface ListenerbeginParagraph in class AbstractChainingListenerparameters - a generic list of parameters. Example: style="background-color: blue"AbstractChainingListener.beginParagraph(java.util.Map)public void beginQuotation(Map<String,String> parameters)
beginQuotation in interface ListenerbeginQuotation in class AbstractChainingListenerparameters - a generic list of parameters for the quotation. Example: "style"/"background-color: blue"AbstractChainingListener.beginQuotation(java.util.Map)public void beginQuotationLine()
beginQuotationLine in interface ListenerbeginQuotationLine in class AbstractChainingListenerAbstractChainingListener.beginQuotationLine()
public void beginHeader(HeaderLevel level,
String id,
Map<String,String> parameters)
beginHeader in interface ListenerbeginHeader in class AbstractChainingListenerlevel - the header level (1, 2, 3, etc)id - the header unique identifierparameters - a generic list of parameters. Example: style="background-color: blue"AbstractChainingListener.beginHeader(org.xwiki.rendering.listener.HeaderLevel,
java.lang.String, java.util.Map)public void beginTable(Map<String,String> parameters)
beginTable in interface ListenerbeginTable in class AbstractChainingListenerparameters - a generic list of parameters for the table.AbstractChainingListener.beginTable(java.util.Map)public void beginTableCell(Map<String,String> parameters)
beginTableCell in interface ListenerbeginTableCell in class AbstractChainingListenerparameters - a generic list of parameters for the table cell.AbstractChainingListener.beginTableCell(java.util.Map)public void beginTableHeadCell(Map<String,String> parameters)
beginTableHeadCell in interface ListenerbeginTableHeadCell in class AbstractChainingListenerparameters - a generic list of parameters for the table head cell.AbstractChainingListener.beginTableHeadCell(java.util.Map)public void beginTableRow(Map<String,String> parameters)
beginTableRow in interface ListenerbeginTableRow in class AbstractChainingListenerparameters - a generic list of parameters for the table row.AbstractChainingListener.beginTableRow(java.util.Map)
public void onRawText(String text,
Syntax syntax)
onRawText in interface ListeneronRawText in class AbstractChainingListenertext - 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 syntaxAbstractChainingListener.onRawText(String, org.xwiki.rendering.syntax.Syntax)
public void endLink(ResourceReference reference,
boolean isFreeStandingURI,
Map<String,String> parameters)
endLink in interface LinkListenerendLink in class AbstractChainingListenerreference - the link referenceisFreeStandingURI - if true then the link is a free standing URI directly in the textparameters - a generic list of parameters. Example: style="background-color: blue"AbstractChainingListener.endLink(
org.xwiki.rendering.listener.reference.ResourceReference , boolean, java.util.Map)public void endParagraph(Map<String,String> parameters)
endParagraph in interface ListenerendParagraph in class AbstractChainingListenerparameters - a generic list of parameters. Example: style="background-color: blue"AbstractChainingListener.endParagraph(java.util.Map)
public void endHeader(HeaderLevel level,
String id,
Map<String,String> parameters)
endHeader in interface ListenerendHeader in class AbstractChainingListenerlevel - the header level (1, 2, 3, etc)id - the header unique identifierparameters - a generic list of parameters. Example: style="background-color: blue"AbstractChainingListener.endHeader(org.xwiki.rendering.listener.HeaderLevel,
java.lang.String, java.util.Map)public void endTable(Map<String,String> parameters)
endTable in interface ListenerendTable in class AbstractChainingListenerparameters - a generic list of parameters for the table.AbstractChainingListener.endTable(java.util.Map)public void onHorizontalLine(Map<String,String> parameters)
onHorizontalLine in interface ListeneronHorizontalLine in class AbstractChainingListenerparameters - a generic list of parameters. Example: style="background-color: blue"AbstractChainingListener.onHorizontalLine(java.util.Map)public void onId(String name)
onId in interface ListeneronId in class AbstractChainingListenername - the location name.AbstractChainingListener.onId(java.lang.String)
public void onImage(ResourceReference reference,
boolean isFreeStandingURI,
Map<String,String> parameters)
onImage in interface ImageListeneronImage in class AbstractChainingListenerreference - the image referenceisFreeStandingURI - if true then the image is defined directly as a URI in the textparameters - a generic list of parameters. Example: style="background-color: blue"AbstractChainingListener.onImage(
org.xwiki.rendering.listener.reference.ResourceReference , boolean, java.util.Map)public void onNewLine()
onNewLine in interface ListeneronNewLine in class AbstractChainingListenerAbstractChainingListener.onNewLine()
public void onMacro(String id,
Map<String,String> parameters,
String content,
boolean isInline)
onMacro in interface ListeneronMacro in class AbstractChainingListenerid - the macro id (eg "toc" for the TOC macro)parameters - the macro parameterscontent - the macro contentisInline - if true the macro is located in a inline content (like paragraph, etc.)AbstractChainingListener.onMacro(java.lang.String, java.util.Map,
java.lang.String, boolean)
public void onVerbatim(String protectedString,
boolean isInline,
Map<String,String> parameters)
onVerbatim in interface ListeneronVerbatim in class AbstractChainingListenerprotectedString - 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"AbstractChainingListener.onVerbatim(String, boolean, Map)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||