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: 34bb18245b129f6ea8878c27590779691d94430a $
-
-
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, String id, Map<String,String> parameters)
ImageBlock(ResourceReference reference, boolean freestanding, Map<String,String> parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageBlock
clone(BlockFilter blockFilter)
Return a copy of the block with filtered children.boolean
equals(Object obj)
String
getId()
ResourceReference
getReference()
int
hashCode()
boolean
isFreeStandingURI()
void
setId(String id)
void
traverse(Listener listener)
Let the block sendListener
events 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
-
ImageBlock
@Unstable public ImageBlock(ResourceReference reference, boolean freestanding, String id, 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)id
- the (automatically generated) id of the imageparameters
- the custom parameters- Since:
- 14.2RC1
-
-
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
-
setId
@Unstable public void setId(String id)
- Parameters:
id
- the id of the image to set- Since:
- 14.2RC1
-
getId
@Unstable public String getId()
- Returns:
- the id of the image
- Since:
- 14.2RC1
-
traverse
public void traverse(Listener listener)
Description copied from interface:Block
Let the block sendListener
events 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:
traverse
in interfaceBlock
- Overrides:
traverse
in 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:
clone
in interfaceBlock
- Overrides:
clone
in classAbstractBlock
- Parameters:
blockFilter
- the Block filter.- Returns:
- the filtered Block.
- Since:
- 1.8RC2
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractBlock
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractBlock
-
-