Package org.xwiki.rendering.block
Class HeaderBlock
- java.lang.Object
-
- org.xwiki.rendering.block.AbstractBlock
-
- org.xwiki.rendering.block.HeaderBlock
-
public class HeaderBlock extends AbstractBlock
- Since:
- 1.5M2
- Version:
- $Id: 57eed3d4285d1c84b58bf6f1a3ff9899b1aa060b $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.xwiki.rendering.block.Block
Block.Axes
-
-
Field Summary
-
Fields inherited from interface org.xwiki.rendering.block.Block
LIST_BLOCK_TYPE
-
-
Constructor Summary
Constructors Constructor Description HeaderBlock(List<Block> childBlocks, HeaderLevel level)HeaderBlock(List<Block> childBlocks, HeaderLevel level, String id)HeaderBlock(List<Block> childBlocks, HeaderLevel level, Map<String,String> parameters)HeaderBlock(List<Block> childBlocks, HeaderLevel level, Map<String,String> parameters, String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafter(Listener listener)SendListenerevents corresponding to the end of the block.voidbefore(Listener listener)SendListenerevents corresponding to the start of the block.booleanequals(Object obj)StringgetId()HeaderLevelgetLevel()SectionBlockgetSection()inthashCode()voidsetId(String id)-
Methods inherited from class org.xwiki.rendering.block.AbstractBlock
addChild, addChildren, clone, clone, getBlocks, getChildren, getFirstBlock, getNextSibling, getParameter, getParameters, getParent, getPreviousSibling, getRoot, indexOf, insertChildAfter, insertChildBefore, removeBlock, replaceChild, replaceChild, setChildren, setNextSiblingBlock, setParameter, setParameters, setParent, setPreviousSiblingBlock, traverse
-
-
-
-
Constructor Detail
-
HeaderBlock
public HeaderBlock(List<Block> childBlocks, HeaderLevel level)
- Parameters:
childBlocks- the children of the header.level- the level of the header
-
HeaderBlock
public HeaderBlock(List<Block> childBlocks, HeaderLevel level, Map<String,String> parameters)
- Parameters:
childBlocks- the children of the header.level- the level of the headerparameters- the parameters of the header
-
HeaderBlock
public HeaderBlock(List<Block> childBlocks, HeaderLevel level, String id)
- Parameters:
childBlocks- the children of the header.level- the level of the headerid- the id of the header.
-
-
Method Detail
-
getLevel
public HeaderLevel getLevel()
- Returns:
- the level of the header
-
getId
public String getId()
- Returns:
- the id of the header.
-
setId
@Unstable public void setId(String id)
- Parameters:
id- the id of the header to set- Since:
- 14.2RC1
-
getSection
public SectionBlock getSection()
- Returns:
- the
SectionBlockcorresponding to this header
-
before
public void before(Listener listener)
Description copied from class:AbstractBlockSendListenerevents corresponding to the start of the block. For example for a Bold block, this allows an XHTML Listener (aka a Renderer) to output<b>.- Overrides:
beforein classAbstractBlock- Parameters:
listener- the listener that will receive the events sent by this block before its children blocks have emitted their own events.
-
after
public void after(Listener listener)
Description copied from class:AbstractBlockSendListenerevents corresponding to the end of the block. For example for a Bold block, this allows an XHTML Listener (aka a Renderer) to output</b>.- Overrides:
afterin classAbstractBlock- Parameters:
listener- the listener that will receive the events sent by this block before its children blocks have emitted their own events.
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classAbstractBlock
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractBlock
-
-