|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.renderer.v2.components.block.BlockRendererComponent
public class BlockRendererComponent
RendererComponent to handle block structures such as lists, tables and paragraphs. This component is typically the
second component to run, the first being the MacroRendererComponent. The component essentially has two tasks:
invoking the various BlockRenderers on the lines of wiki markup, and ensuring anything not dealt with by
a BlockRenderer is grouped into paragraphs appropriately.
The component has a configurable list of BlockRenderers. The wiki markup is split up and fed to the
BlockRenderers line by line. They are passed the current LineWalker so that they can temporarily wrest
control from the BlockRendererComponent and process however many consecutive lines they want. Once a BlockRenderer
renders a line, that line will not be passed into any other BlockRenderers. Rather, the previous paragraph will be
finished, and the rendered block will be added after it.
Content that does not get rendered by a BlockRenderer has further processing applied. Consecutive chunks of
content that contain no block tokens and are not handled by a BlockRenderer are grouped together into a paragraph.
They then have p tags wrapped around them. If a line containing block tokens is not handled by any BlockRenderer,
then it will be split up around the block tokens. The block tokens will not form part of a paragraph but paragraphs
will be made of text between block tokens. Text before the first token will be appended to the previous paragraph.
Text after the last token will be used as the start of the next paragraph.
| Constructor Summary | |
|---|---|
BlockRendererComponent(SubRenderer subRenderer,
List<BlockRenderer> blockRenderers)
|
|
| Method Summary | |
|---|---|
String |
render(String wiki,
RenderContext context)
Render this piece of wiki text. |
void |
setBlockRenderers(List<BlockRenderer> blockRenderers)
|
boolean |
shouldRender(RenderMode renderMode)
Whether or not this render component is required given the current render mode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BlockRendererComponent(SubRenderer subRenderer,
List<BlockRenderer> blockRenderers)
| Method Detail |
|---|
public void setBlockRenderers(List<BlockRenderer> blockRenderers)
public boolean shouldRender(RenderMode renderMode)
RendererComponent
shouldRender in interface RendererComponent
public String render(String wiki,
RenderContext context)
RendererComponent
render in interface RendererComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||