org.xwiki.rendering.block
Class IdBlock

java.lang.Object
  extended by org.xwiki.rendering.block.AbstractBlock
      extended by org.xwiki.rendering.block.IdBlock
All Implemented Interfaces:
java.lang.Cloneable, Block

public class IdBlock
extends AbstractBlock

A reference/location in a page. In HTML for example this is called an Anchor. It allows pointing to that location, for example in links.

Since:
1.6M1
Version:
$Id: IdBlock.java 12009 2008-08-24 14:45:15Z vmassol $
See Also:
Listener.onId(String)

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.xwiki.rendering.block.Block
Block.Axes
 
Constructor Summary
IdBlock(java.lang.String name)
           
 
Method Summary
 java.lang.String getName()
           
 void traverse(Listener listener)
          Let the block send Listener events corresponding to its content. For example a Paragraph block will send the Listener.beginParagraph(java.util.Map) and Listener.endParagraph(java.util.Map) events when this method is called.
 
Methods inherited from class org.xwiki.rendering.block.AbstractBlock
addChild, addChildren, after, before, clone, clone, equals, getBlocks, getChildren, getChildrenByType, getFirstBlock, getNextSibling, getParameter, getParameters, getParent, getParentBlockByType, getPreviousBlockByType, getPreviousSibling, getRoot, hashCode, insertChildAfter, insertChildBefore, removeBlock, replaceChild, replaceChild, setChildren, setNextSiblingBlock, setParameter, setParameters, setParent, setPreviousSiblingBlock
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdBlock

public IdBlock(java.lang.String name)
Parameters:
name - the unique name for the reference/location.
Method Detail

getName

public java.lang.String getName()
Returns:
the reference/location name

traverse

public void traverse(Listener listener)
Let the block send Listener events corresponding to its content. For example a Paragraph block will send the Listener.beginParagraph(java.util.Map) and Listener.endParagraph(java.util.Map) events when this method is called.

Specified by:
traverse in interface Block
Overrides:
traverse in class AbstractBlock
Parameters:
listener - the listener to which to send the events to.
See Also:
AbstractBlock.traverse(org.xwiki.rendering.listener.Listener)


Copyright © 2004-2011 XWiki. All Rights Reserved.