|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.jsp.tagext.SimpleTagSupport
nl.gx.webmanager.taglib.SizedImageTag
public class SizedImageTag
Implements the wm:sizedImage tag. Resizes image objects. If the aspect ratio (height:width) of the
resized image is different than the source image, the image will be cropped from
the top and bottom or left and right to avoid getting black bars. Returns the resized image object.
Example of usage:
< wm:image var="bullet" url=" http://www.gx.nl/images/bullet.jpg " />
< wm:sizedImage var="bulletSmall" image="${bullet}" width="20" height="20" />
${bulletSmall.htmlTag}
In the example above the image stored in the variable "bullet" is resized to 20x20 pixels and returned in
the variable "bulletSmall".
| Constructor Summary | |
|---|---|
SizedImageTag()
|
|
| Method Summary | |
|---|---|
void |
doTag()
|
void |
setHeight(java.lang.Integer height)
Sets the height of the resized image in pixels. |
void |
setImage(Image image)
Specifies the image object to resize. |
void |
setVar(java.lang.String var)
Specifies the JSP variable to store the result in. |
void |
setWidth(java.lang.Integer width)
Sets the width of the resized image in pixels. |
| Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport |
|---|
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SizedImageTag()
| Method Detail |
|---|
public void setVar(java.lang.String var)
var - a jsp variable namepublic void setImage(Image image)
image - an image objectpublic void setWidth(java.lang.Integer width)
width - in pixelspublic void setHeight(java.lang.Integer height)
height - in pixels
public void doTag()
throws javax.servlet.jsp.JspException
doTag in interface javax.servlet.jsp.tagext.SimpleTagdoTag in class javax.servlet.jsp.tagext.SimpleTagSupportjavax.servlet.jsp.JspException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||