org.xwiki.rendering.listener.chaining
Class GroupStateChainingListener

java.lang.Object
  extended by org.xwiki.rendering.listener.chaining.AbstractChainingListener
      extended by 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 the BlockStateChainingListener class 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$

Field Summary
 
Fields inherited from interface org.xwiki.rendering.listener.Listener
EMPTY_PARAMETERS
 
Constructor Summary
GroupStateChainingListener(ListenerChain listenerChain)
           
 
Method Summary
 void beginGroup(java.util.Map<java.lang.String,java.lang.String> parameters)
          Start a group of elements.
 void endGroup(java.util.Map<java.lang.String,java.lang.String> parameters)
          End of the group.
 int getDocumentDepth()
           
 boolean isInGroup()
           
 
Methods inherited from class org.xwiki.rendering.listener.chaining.AbstractChainingListener
beginDefinitionDescription, beginDefinitionList, beginDefinitionTerm, beginDocument, beginFormat, beginHeader, beginLink, beginList, beginListItem, beginMacroMarker, beginMetaData, beginParagraph, beginQuotation, beginQuotationLine, beginSection, beginTable, beginTableCell, beginTableHeadCell, beginTableRow, endDefinitionDescription, endDefinitionList, endDefinitionTerm, endDocument, endFormat, endHeader, endLink, endList, endListItem, endMacroMarker, endMetaData, endParagraph, endQuotation, endQuotationLine, endSection, endTable, endTableCell, endTableHeadCell, endTableRow, getListenerChain, onEmptyLines, onHorizontalLine, onId, onImage, onMacro, onNewLine, onRawText, onSpace, onSpecialSymbol, onVerbatim, onWord, setListenerChain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupStateChainingListener

public GroupStateChainingListener(ListenerChain listenerChain)
Method Detail

getDocumentDepth

public int getDocumentDepth()

isInGroup

public boolean isInGroup()

beginGroup

public void beginGroup(java.util.Map<java.lang.String,java.lang.String> parameters)
Start 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:
beginGroup in interface Listener
Overrides:
beginGroup in class AbstractChainingListener
Parameters:
parameters - a generic list of parameters. Example: style="background-color: blue"
See Also:
AbstractChainingListener.beginGroup(Map)

endGroup

public void endGroup(java.util.Map<java.lang.String,java.lang.String> parameters)
End of the group.

Specified by:
endGroup in interface Listener
Overrides:
endGroup in class AbstractChainingListener
Parameters:
parameters - a generic list of parameters. Example: style="background-color: blue"
See Also:
AbstractChainingListener.endGroup(Map)


Copyright © 2004-2011 XWiki. All Rights Reserved.