Package org.xwiki.rendering.block
Class FormatBlock
- java.lang.Object
-
- org.xwiki.rendering.block.AbstractBlock
-
- org.xwiki.rendering.block.FormatBlock
-
public class FormatBlock extends AbstractBlock
Represents a text formatting block (bold, italic, etc).- Since:
- 1.6M1
- Version:
- $Id: 55047ee4c63f71a4377affa51898a8eb26daa711 $
-
-
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 FormatBlock()Create an empty format block with no children.FormatBlock(List<Block> childrenBlocks, Format format)FormatBlock(List<Block> childrenBlocks, Format format, Map<String,String> parameters)
-
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)FormatgetFormat()inthashCode()-
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
-
FormatBlock
public FormatBlock()
Create an empty format block with no children. This is useful when the user wants to callAbstractBlock.addChild(Block)manually for adding children one by one after the block is constructed.
-
FormatBlock
public FormatBlock(List<Block> childrenBlocks, Format format)
- Parameters:
childrenBlocks- the nested children blocksformat- the formatting to apply to the children blocks
-
-
Method Detail
-
getFormat
public Format getFormat()
- Returns:
- the formatting to apply to the children blocks
-
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
-
-