Class GroupStateChainingListener
- java.lang.Object
-
- org.xwiki.rendering.listener.chaining.AbstractChainingListener
-
- org.xwiki.rendering.listener.chaining.GroupStateChainingListener
-
- All Implemented Interfaces:
ChainingListener,ImageListener,LinkListener,Listener
public class GroupStateChainingListener extends AbstractChainingListener
Provides information on whether we're inside a group. Note that this listener is separated from theBlockStateChainingListenerclass because we don't want this listener to be stackable (since we need to create new instance of stackable listeners to reset states when we encounter a begin group event but we also need to know we're inside a group).- Since:
- 1.8.3
- Version:
- $Id: 4e8c71efb0b8b87ec448f1f91983d37d5dde3871 $
-
-
Field Summary
-
Fields inherited from interface org.xwiki.rendering.listener.Listener
EMPTY_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description GroupStateChainingListener(ListenerChain listenerChain)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginGroup(Map<String,String> parameters)Start a group of elements.voidendGroup(Map<String,String> parameters)End of the group.intgetDocumentDepth()booleanisInGroup()-
Methods inherited from class org.xwiki.rendering.listener.chaining.AbstractChainingListener
beginDefinitionDescription, beginDefinitionList, beginDefinitionTerm, beginDocument, beginFigure, beginFigureCaption, beginFormat, beginHeader, beginLink, beginList, beginListItem, beginListItem, beginMacroMarker, beginMetaData, beginParagraph, beginQuotation, beginQuotationLine, beginSection, beginTable, beginTableCell, beginTableHeadCell, beginTableRow, endDefinitionDescription, endDefinitionList, endDefinitionTerm, endDocument, endFigure, endFigureCaption, endFormat, endHeader, endLink, endList, endListItem, endListItem, endMacroMarker, endMetaData, endParagraph, endQuotation, endQuotationLine, endSection, endTable, endTableCell, endTableHeadCell, endTableRow, getListenerChain, onEmptyLines, onHorizontalLine, onId, onImage, onMacro, onNewLine, onRawText, onSpace, onSpecialSymbol, onVerbatim, onWord, setListenerChain
-
-
-
-
Constructor Detail
-
GroupStateChainingListener
public GroupStateChainingListener(ListenerChain listenerChain)
-
-
Method Detail
-
getDocumentDepth
public int getDocumentDepth()
-
isInGroup
public boolean isInGroup()
-
beginGroup
public void beginGroup(Map<String,String> parameters)
Description copied from interface:ListenerStart 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"
-
endGroup
public void endGroup(Map<String,String> parameters)
Description copied from interface:ListenerEnd of the group.- Specified by:
endGroupin interfaceListener- Overrides:
endGroupin classAbstractChainingListener- Parameters:
parameters- a generic list of parameters. Example: style="background-color: blue"
-
-