/** * {@inheritDoc} * @see org.xwiki.rendering.block.AbstractFatherBlock#after(org.xwiki.rendering.listener.Listener) */ public void after(Listener listener) { listener.endList(ListType.NUMBERED, getParameters()); } }
NumberedListBlock container = new NumberedListBlock(Collections.<Block>emptyList()); container.setParameter(CLASS_ATTRIBUTE_NAME, "footnotes"); Block footnoteResult; footnoteResult = processFootnote(footnote, counter, context); if (footnoteResult != null) { container.addChild(footnoteResult); counter++;
/** * Create a new ListBlock and add it in the provided parent block. * * @param numbered indicate if the list has to be numbered or with bullets * @param parentBlock the block where to add the new list block. * @return the new list block. */ private ListBLock createChildListBlock(boolean numbered, Block parentBlock) { ListBLock childListBlock = numbered ? new NumberedListBlock(Collections.emptyList()) : new BulletedListBlock(Collections.emptyList()); if (parentBlock != null) { parentBlock.addChild(childListBlock); } return childListBlock; } }
/** * {@inheritDoc} * * @see org.xwiki.rendering.listener.Listener#endList(org.xwiki.rendering.listener.ListType, java.util.Map) */ public void endList(ListType listType, Map<String, String> parameters) { if (listType == ListType.BULLETED) { this.stack.push(new BulletedListBlock(generateListFromStack(), parameters)); } else { this.stack.push(new NumberedListBlock(generateListFromStack(), parameters)); } }
public void endList(WikiParameters params, boolean ordered) { ListBLock listBlock; if (ordered) { listBlock = new NumberedListBlock(generateListFromStack(), convertParameters(params)); } else { listBlock = new BulletedListBlock(generateListFromStack(), convertParameters(params)); } this.stack.push(listBlock); }
/** * {@inheritDoc} * @see org.xwiki.rendering.block.AbstractFatherBlock#before(org.xwiki.rendering.listener.Listener) */ public void before(Listener listener) { listener.beginList(ListType.NUMBERED, getParameters()); }