org.xwiki.rendering.internal.renderer.xhtml.image
Class DefaultXHTMLImageRenderer
java.lang.Object
org.xwiki.rendering.internal.renderer.xhtml.image.DefaultXHTMLImageRenderer
- All Implemented Interfaces:
- Initializable, XHTMLImageRenderer, ImageListener
@Component
@InstantiationStrategy(value=PER_LOOKUP)
public class DefaultXHTMLImageRenderer
- extends Object
- implements XHTMLImageRenderer, Initializable
Default implementation for rendering images as XHTML. We handle both cases:
- when inside a wiki (ie when an implementation of
WikiModel
is provided.
- when outside of a wiki. In this case we only handle external images and document images don't display anything.
- Since:
- 2.0M3
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultXHTMLImageRenderer
public DefaultXHTMLImageRenderer()
initialize
public void initialize()
throws InitializationException
- Description copied from interface:
Initializable
- Method called by the Component Manager when the component is created for the first time (i.e. when it's looked up
for the first time or if the component is specified as being loaded on startup). If the component instantiation
strategy is singleton then this method is called only once during the lifecycle of the Component Manager.
Otherwise the component is created at each lookup and thus this method is called at each lookup too.
- Specified by:
initialize
in interface Initializable
- Throws:
InitializationException
- if an error happens during a component's initialization
setXHTMLWikiPrinter
public void setXHTMLWikiPrinter(XHTMLWikiPrinter printer)
- Specified by:
setXHTMLWikiPrinter
in interface XHTMLImageRenderer
- Parameters:
printer
- the XHTML printer to use to output images as XHTML
getXHTMLWikiPrinter
public XHTMLWikiPrinter getXHTMLWikiPrinter()
- Specified by:
getXHTMLWikiPrinter
in interface XHTMLImageRenderer
- Returns:
- the XHTML printer to use to output images as XHTML
onImage
public void onImage(ResourceReference reference,
boolean isFreeStandingURI,
Map<String,String> parameters)
- An image.
- Specified by:
onImage
in interface ImageListener
- Parameters:
reference
- the image referenceisFreeStandingURI
- if true then the image is defined directly as a URI in the textparameters
- a generic list of parameters. Example: style="background-color: blue"- Since:
- 2.5RC1
- See Also:
ImageListener.onImage(org.xwiki.rendering.listener.reference.ResourceReference , boolean, java.util.Map)