de.tuberlin.cs.flp.jspwiki.plugin
Class Picture

java.lang.Object
  extended byde.tuberlin.cs.flp.jspwiki.plugin.Picture

public class Picture
extends java.lang.Object

[{Picture [src=page-or-attachment] [size=thumbnail|small|_medium_|large] [style=css-name] [textflow] }]

Insert an image in the page using pre-set named size alternatives. The image can be taken from an image-archive's page. If a page is given as src, the first image inlined in the page will be used as picture, or the first image attachment to that page in case the page has no image inlined. If src is missing, the first image-attachment of the current page will be used. The names available for the size attribute ("thumbnail", "small", etc.) are configured in the jspwiki.properties using parameter jspwiki.picture.size.XXX=n.


Field Summary
protected static java.lang.String PROPERTIES_PREFIX
          Prefix for all property entries used by this plugin.
 
Constructor Summary
Picture()
           
 
Method Summary
 java.lang.String execute(WikiContext context, java.util.Map params)
          Executes the plugin.
static java.lang.String imageHTML(WikiContext context, java.lang.String src, java.lang.String sizename, java.lang.String style, java.lang.String align, boolean clickToEnlarge, boolean description)
          Returns HTML code displaying an image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTIES_PREFIX

protected static final java.lang.String PROPERTIES_PREFIX
Prefix for all property entries used by this plugin.

See Also:
Constant Field Values
Constructor Detail

Picture

public Picture()
Method Detail

execute

public java.lang.String execute(WikiContext context,
                                java.util.Map params)
Executes the plugin.

Parameters:
context - The WikiContext.
params - Parameters specified at plugin inclusion.
Returns:
HTML to be inserted into page
Throws:
PluginException - if an error occurs

imageHTML

public static java.lang.String imageHTML(WikiContext context,
                                         java.lang.String src,
                                         java.lang.String sizename,
                                         java.lang.String style,
                                         java.lang.String align,
                                         boolean clickToEnlarge,
                                         boolean description)
Returns HTML code displaying an image.

Parameters:
context -
src -
sizename -
style -
align -
clickToEnlarge -
description -
Returns: