Class TocBuilder
- java.lang.Object
-
- org.xwiki.rendering.wikimodel.util.TocBuilder
-
public class TocBuilder extends Object
This is an utility class which is used to build tables of content (TOCs).- Since:
- 4.0M1
- Version:
- $Id: 425d0497458df380b6ebb0e009c16c18e22d0942 $
-
-
Field Summary
Fields Modifier and Type Field Description protected int
fBaseLevel
protected Deque<Integer>
fBaseLevelStack
protected int
fLevel
-
Constructor Summary
Constructors Constructor Description TocBuilder(ITocListener listener)
TocBuilder(ITocListener listener, int totalDepth)
TocBuilder(ITocListener listener, int documentDepth, int headerDepth)
TocBuilder(ITocListener listener, int documentDepth, int headerDepth, int totalDepth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginDocument()
void
beginHeader(int level)
boolean
checkDepth()
void
endDocument()
void
endHeader()
protected int
getHeaderLevel()
protected void
setHeaderLevel(int level)
-
-
-
Constructor Detail
-
TocBuilder
public TocBuilder(ITocListener listener)
-
TocBuilder
public TocBuilder(ITocListener listener, int totalDepth)
-
TocBuilder
public TocBuilder(ITocListener listener, int documentDepth, int headerDepth)
-
TocBuilder
public TocBuilder(ITocListener listener, int documentDepth, int headerDepth, int totalDepth)
-
-
Method Detail
-
beginDocument
public void beginDocument()
-
beginHeader
public void beginHeader(int level)
-
checkDepth
public boolean checkDepth()
- Returns:
true
if the current element should be shown
-
endDocument
public void endDocument()
-
endHeader
public void endHeader()
-
getHeaderLevel
protected int getHeaderLevel()
- Returns:
- the current level of headers
-
setHeaderLevel
protected void setHeaderLevel(int level)
-
-