com.xpn.xwiki.render.macro
Class ImageMacro
java.lang.Object
org.radeox.macro.BaseMacro
org.radeox.macro.BaseLocaleMacro
com.xpn.xwiki.render.macro.ImageMacro
- All Implemented Interfaces:
- Comparable, org.radeox.macro.LocaleMacro, org.radeox.macro.Macro
public class ImageMacro
- extends org.radeox.macro.BaseLocaleMacro
Macro that displays images. Syntax:
{image:text|height|width|align|halign|float|document|alt|title|link|fromIncludingDoc}
- text: The target filename.
- height: The height attribute of the img.
- width: The width attribute of the img.
- align: The align attribute of the img.
- halign: Horizontal alignment for the image. If missing, the image is displayed inline. Accepted values:
floatleft, left, center, right, floatright
- document: The document to which the file is attached. If missing, the current document is used.
- alt: The alt attribute of the image. If missing, title is used. If both are missing, use the filename.
- title: The title attribute of the image. If missing, alt is used. If both are missing, use the filename.
- link: Also link to the image.
- fromIncludingDoc: If present, when the current document is included using #include*, use the top level document
instead of the included one. This is useful for templates, for example.
- Version:
- $Id: ee693f323c7ba9bd0aff979c38a9ca578081e264 $
Fields inherited from class org.radeox.macro.BaseMacro |
description, initialContext, paramDescription |
Methods inherited from class org.radeox.macro.BaseLocaleMacro |
getName, setInitialContext |
Methods inherited from class org.radeox.macro.BaseMacro |
compareTo, getDescription, getParamDescription, toString |
ImageMacro
public ImageMacro()
getLocaleKey
public String getLocaleKey()
execute
public void execute(Writer writer,
org.radeox.macro.parameter.MacroParameter params)
throws IllegalArgumentException,
IOException
- Specified by:
execute
in interface org.radeox.macro.Macro
- Specified by:
execute
in class org.radeox.macro.BaseMacro
- Throws:
IllegalArgumentException
IOException
Copyright © 2004-2013 XWiki. All Rights Reserved.