org.xwiki.rendering.block.Block.traverse()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中org.xwiki.rendering.block.Block.traverse()方法的一些代码示例,展示了Block.traverse()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.traverse()方法的具体详情如下:
包路径:org.xwiki.rendering.block.Block
类名称:Block
方法名:traverse

Block.traverse介绍

[英]Let the block send Listener events corresponding to its content. For example a Paragraph block will send the org.xwiki.rendering.listener.Listener#beginParagraph and org.xwiki.rendering.listener.Listener#endParagraph events when this method is called.
[中]

代码示例

代码示例来源:origin: org.xwiki.platform/xwiki-core-rendering-api

/**
   * {@inheritDoc}
   * 
   * @see BlockRenderer#render(java.util.Collection, org.xwiki.rendering.renderer.printer.WikiPrinter)
   */
  public void render(Collection<Block> blocks, WikiPrinter printer)
  {
    PrintRenderer renderer = getPrintRendererFactory().createRenderer(printer);
    for (Block block : blocks) {
      block.traverse(renderer);
    }
  }
}

代码示例来源:origin: org.xwiki.platform/xwiki-core-rendering-api

/**
   * {@inheritDoc}
   * 
   * @see org.xwiki.rendering.block.AbstractBlock#traverse(org.xwiki.rendering.listener.Listener)
   */
  public void traverse(Listener listener)
  {
    before(listener);

    for (Block block : getChildren()) {
      block.traverse(listener);
    }

    after(listener);
  }
}

代码示例来源:origin: org.wikbook/wikbook.xwiki

public void build(Reader reader, String syntaxId, DocbookBuilder builder)
  {
   if (syntaxId == null)
   {
     if (syntaxStack.isEmpty())
     {
      syntaxId = Syntax.XWIKI_2_0.toIdString();
     }
     else
     {
      syntaxId = syntaxStack.getLast();
     }
   }

   //
   WikiLoader loader = new WikiLoader(this);
   Block block = loader.load(reader, syntaxId);
   XDOMTransformer transformer = new XDOMTransformer(this, builder);
   block.traverse(transformer);
  }
}

代码示例来源:origin: org.wikbook/wikbook.xwiki

block.traverse(this);
builder.endAdmonition(admonition);
Block block = loader.load(new StringReader(content), context.syntaxStack.getLast());
builder.beginExample(macroParameters.get("title"));
block.traverse(this);
builder.endExample(macroParameters.get("title"));

代码示例来源:origin: org.onebusaway/onebusaway-wiki-integration-xwiki-struts-macros

PrintRenderer renderer = this.xhtmlRendererFactory.createRenderer(printer);
for (Block block : xdom.getChildren()) {
 block.traverse(renderer);

代码示例来源:origin: org.xwiki.platform/xwiki-core-rendering-parser-wikimodel

block.traverse(renderer);

代码示例来源:origin: org.xwiki.platform/xwiki-core-rendering-macro-html

PrintRenderer renderer = this.xhtmlRendererFactory.createRenderer(printer);
for (Block block : htmlMacroMarker.getChildren()) {
  block.traverse(renderer);

代码示例来源:origin: org.xwiki.rendering/xwiki-rendering-macro-html

PrintRenderer renderer = this.xhtmlRendererFactory.createRenderer(printer);
for (Block block : htmlMacroMarker.getChildren()) {
  block.traverse(renderer);

相关文章