Package org.xwiki.rendering.block
Class ImageBlock
- java.lang.Object
-
- org.xwiki.rendering.block.AbstractBlock
-
- org.xwiki.rendering.block.ImageBlock
-
public class ImageBlock extends AbstractBlock
Represents an image.- Since:
- 1.7M2
- Version:
- $Id: 8343690a62eac95d4121cbf4db49baf19bc1b1f5 $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.xwiki.rendering.block.Block
Block.Axes
-
-
Field Summary
-
Fields inherited from interface org.xwiki.rendering.block.Block
LIST_BLOCK_TYPE
-
-
Constructor Summary
Constructors Constructor Description ImageBlock(ResourceReference reference, boolean freestanding)ImageBlock(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageBlockclone(BlockFilter blockFilter)Return a copy of the block with filtered children.booleanequals(Object obj)ResourceReferencegetReference()inthashCode()booleanisFreeStandingURI()voidtraverse(Listener listener)Let the block sendListenerevents corresponding to its content.-
Methods inherited from class org.xwiki.rendering.block.AbstractBlock
addChild, addChildren, after, before, clone, getBlocks, getChildren, getFirstBlock, getNextSibling, getParameter, getParameters, getParent, getPreviousSibling, getRoot, indexOf, insertChildAfter, insertChildBefore, removeBlock, replaceChild, replaceChild, setChildren, setNextSiblingBlock, setParameter, setParameters, setParent, setPreviousSiblingBlock
-
-
-
-
Constructor Detail
-
ImageBlock
public ImageBlock(ResourceReference reference, boolean freestanding)
- Parameters:
reference- the image referencefreestanding- indicate if the image syntax is simple a full descriptive syntax (detail depending of the syntax)- Since:
- 2.5RC1
-
ImageBlock
public ImageBlock(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
- Parameters:
reference- the image referencefreestanding- indicate if the image syntax is simple a full descriptive syntax (detail depending of the syntax)parameters- the custom parameters- Since:
- 2.5RC1
-
-
Method Detail
-
getReference
public ResourceReference getReference()
- Returns:
- the reference to the image
- Since:
- 2.5RC1
- See Also:
ResourceReference
-
isFreeStandingURI
public boolean isFreeStandingURI()
- Returns:
- true if the image is defined as a free standing URI directly in the text, false otherwise
-
traverse
public void traverse(Listener listener)
Description copied from interface:BlockLet the block sendListenerevents corresponding to its content. For example a Paragraph block will send theListener.beginParagraph(java.util.Map<java.lang.String, java.lang.String>)andListener.endParagraph(java.util.Map<java.lang.String, java.lang.String>)events when this method is called.- Specified by:
traversein interfaceBlock- Overrides:
traversein classAbstractBlock- Parameters:
listener- the listener to which to send the events to.
-
clone
public ImageBlock clone(BlockFilter blockFilter)
Return a copy of the block with filtered children.- Specified by:
clonein interfaceBlock- Overrides:
clonein classAbstractBlock- Parameters:
blockFilter- the Block filter.- Returns:
- the filtered Block.
- Since:
- 1.8RC2
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classAbstractBlock
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractBlock
-
-