org.chorem.pollen.ui.components
Class Image

java.lang.Object
  extended by org.chorem.pollen.ui.components.ImageContextLink
      extended by org.chorem.pollen.ui.components.Image
All Implemented Interfaces:
ContextLink

public class Image
extends ImageContextLink

Composant qui affiche une image. Ce composant permet d'afficher une image dynamique (exemple : image uploadée sur le serveur par un formulaire).

 Utilisation :
 <t:image src="/img/image.png" />
 Pour afficher une image statique il est préférable d'utiliser :
 <img src="${asset:context:img}/image.png" />
 

Version:
$Id: Image.java 2856 2010-02-01 17:46:41Z echatellier $
Author:
rannou

Field Summary
 
Fields inherited from class org.chorem.pollen.ui.components.ImageContextLink
THUMB_PREFIX
 
Constructor Summary
Image()
           
 
Method Summary
 String getAlt()
           
 int getHeight()
           
 org.apache.tapestry5.Link getImageLink()
          Create a link to call "imageLink" event.
 String getSrc()
           
 org.apache.tapestry5.Link getThumbLink()
          Create a link to call "thumbLink" event.
 int getWidth()
           
 org.apache.tapestry5.StreamResponse onImageLink(String src, int width, int height, boolean thumb)
          Affichage de l'image
 
Methods inherited from class org.chorem.pollen.ui.components.ImageContextLink
getContextPath, getFile, getFile, getImageDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Image

public Image()
Method Detail

getSrc

public String getSrc()
Returns:
the src

getAlt

public String getAlt()
Returns:
the alt

getWidth

public int getWidth()
Returns:
the width

getHeight

public int getHeight()
Returns:
the height

getThumbLink

public org.apache.tapestry5.Link getThumbLink()
Create a link to call "thumbLink" event.

Returns:
event link

getImageLink

public org.apache.tapestry5.Link getImageLink()
Create a link to call "imageLink" event.

Returns:
event link

onImageLink

public org.apache.tapestry5.StreamResponse onImageLink(String src,
                                                       int width,
                                                       int height,
                                                       boolean thumb)
Affichage de l'image



Copyright © 2009-2010 CodeLutin. All Rights Reserved.