org.xwiki.rendering.block
Class WordBlock

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

public class WordBlock
extends AbstractBlock

Represents a word.

Since:
1.5M2
Version:
$Id$

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.xwiki.rendering.block.Block
Block.Axes
 
Constructor Summary
WordBlock(java.lang.String word)
           
 
Method Summary
 java.lang.String getWord()
           
 java.lang.String toString()
          
 void traverse(Listener listener)
          Let the block send Listener events corresponding to its content.
 
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, wait, wait, wait
 

Constructor Detail

WordBlock

public WordBlock(java.lang.String word)
Parameters:
word - the word wrapped by this block. Note that this is supposed to be a single word and space or special symbols should be represented by other blocks
Method Detail

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(Listener)

getWord

public java.lang.String getWord()
Returns:
the word wrapped by this block

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
Since:
1.8RC2
See Also:
Object.toString()


Copyright © 2004-2011 XWiki. All Rights Reserved.