public class CmsJspTagImage extends CmsJspImageScalerTagSupport implements I_CmsJspTagParamParent
m_scaler, m_src, SCALE_ATTR_HEIGHT, SCALE_ATTR_MAXHEIGHT, SCALE_ATTR_MAXWIDTH, SCALE_ATTR_POSITION, SCALE_ATTR_QUALITY, SCALE_ATTR_RENDERMODE, SCALE_ATTR_TYPE, SCALE_ATTR_WIDTH| Constructor and Description |
|---|
CmsJspTagImage()
Creates a new image scaling tag instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addParameter(java.lang.String name,
java.lang.String value)
Add a parameter to this tag.
|
int |
doEndTag() |
int |
doStartTag()
Returns
. |
java.lang.String |
getAlign()
Returns the value of the HTML "align" attribute.
|
java.lang.String |
getAlt()
Returns the value of the HTML "alt" attribute.
|
java.lang.String |
getBorder()
Returns the value of the HTML "border" attribute.
|
java.lang.String |
getCssclass()
Returns the value of the HTML "class" attribute.
|
java.lang.String |
getHspace()
Returns the value of the HTML "hspace" attribute.
|
java.lang.String |
getId()
Returns the value of the HTML "id" attribute.
|
java.lang.String |
getLongdesc()
Returns the value of the HTML "longdesc" attribute.
|
java.lang.String |
getName()
Returns the value of the HTML "name" attribute.
|
java.lang.String |
getNoDim()
Returns
"true" if the created HTML image tag does not contain height and width attributes. |
static CmsImageScaler |
getScaler(CmsImageScaler scaler,
CmsImageScaler original,
java.lang.String scaleParam)
Creates the images scaler used by this image tag.
|
java.lang.String |
getStyle()
Returns the value of the HTML "style" attribute.
|
java.lang.String |
getTitle()
Returns the value of the HTML "title" attribute.
|
java.lang.String |
getUsemap()
Returns the value of the HTML "usemap" attribute.
|
java.lang.String |
getVspace()
Returns the value of the HTML "vspace" attribute.
|
static java.lang.String |
imageTagAction(java.lang.String src,
CmsImageScaler scaler,
java.util.Map<java.lang.String,java.lang.String> attributes,
boolean partialTag,
boolean noDim,
javax.servlet.ServletRequest req)
Internal action method to create the tag content.
|
static java.lang.String |
imageTagAction(java.lang.String src,
CmsImageScaler scaler,
java.util.Map<java.lang.String,java.lang.String> attributes,
boolean partialTag,
javax.servlet.ServletRequest req)
Internal action method to create the tag content.
|
java.lang.String |
isPartialTag()
Returns
"true" if the HTML tag should only be created as partial tag. |
void |
release()
Does some cleanup and creates a new ImageScaler before the tag is released to the tag pool.
|
void |
setAlign(java.lang.String value)
Sets the value of the HTML "align" attribute.
|
void |
setAlt(java.lang.String value)
Sets the value of the HTML "alt" attribute.
|
void |
setBorder(java.lang.String value)
Sets the value of the HTML "border" attribute.
|
void |
setCssclass(java.lang.String value)
Sets the value of the HTML "class" attribute.
|
void |
setHspace(java.lang.String value)
Sets the value of the HTML "hspace" attribute.
|
void |
setId(java.lang.String value)
Sets the value of the HTML "id" attribute.
|
void |
setLongdesc(java.lang.String value)
Sets the value of the HTML "longdesc" attribute.
|
void |
setName(java.lang.String value)
Sets the value of the HTML "name" attribute.
|
void |
setNoDim(java.lang.String noDim)
Controls if the created HTML image tag contains height and width attributes.
|
void |
setPartialTag(java.lang.String partialTag)
Controls if the created HTML image tag is a full or partial tag.
|
void |
setStyle(java.lang.String value)
Sets the value of the HTML "style" attribute.
|
void |
setTitle(java.lang.String value)
Sets the value of the HTML "title" attribute.
|
void |
setUsemap(java.lang.String value)
Sets the value of the HTML "usemap" attribute.
|
void |
setVspace(java.lang.String value)
Sets the value of the HTML "vspace" attribute.
|
getHeight, getMaxHeight, getMaxWidth, getScaleColor, getScaleFilter, getScalePosition, getScaleQuality, getScaleRendermode, getScaleType, getSrc, getWidth, setHeight, setMaxHeight, setMaxWidth, setScaleColor, setScaleFilter, setScalePosition, setScaleQuality, setScaleRendermode, setScaleType, setSrc, setWidthdoAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContentfindAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValuepublic CmsJspTagImage()
public static CmsImageScaler getScaler(CmsImageScaler scaler, CmsImageScaler original, java.lang.String scaleParam)
scaler - the scaler created from this tags parametersoriginal - a scaler that contains the original image dimensionsscaleParam - optional scaler parameters for croppingpublic static java.lang.String imageTagAction(java.lang.String src, CmsImageScaler scaler, java.util.Map<java.lang.String,java.lang.String> attributes, boolean partialTag, boolean noDim, javax.servlet.ServletRequest req) throws CmsException
src - the image sourcescaler - the image scaleing parametersattributes - the additional image HTML attributespartialTag - if true, the opening <img and closing /> is omittednoDim - if true, the height and width attributes are omittedreq - the current requestCmsException - in case something goes wrongpublic static java.lang.String imageTagAction(java.lang.String src, CmsImageScaler scaler, java.util.Map<java.lang.String,java.lang.String> attributes, boolean partialTag, javax.servlet.ServletRequest req) throws CmsException
src - the image sourcescaler - the image scaleing parametersattributes - the additional image HTML attributespartialTag - if true, the opening <img and closing /> is omittedreq - the current requestCmsException - in case something goes wrongpublic void addParameter(java.lang.String name, java.lang.String value)
I_CmsJspTagParamParentaddParameter in interface I_CmsJspTagParamParentname - the name of the parametervalue - the value of the parameterI_CmsJspTagParamParent.addParameter(java.lang.String, java.lang.String)public int doEndTag() throws javax.servlet.jsp.JspException
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspExceptionTag.doEndTag()public int doStartTag()
BodyTag.EVAL_BODY_BUFFERED.doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class javax.servlet.jsp.tagext.BodyTagSupportBodyTag.EVAL_BODY_BUFFEREDTag.doStartTag()public java.lang.String getAlign()
public java.lang.String getAlt()
public java.lang.String getBorder()
public java.lang.String getCssclass()
public java.lang.String getHspace()
public java.lang.String getId()
getId in class javax.servlet.jsp.tagext.TagSupportpublic java.lang.String getLongdesc()
public java.lang.String getName()
public java.lang.String getNoDim()
"true" if the created HTML image tag does not contain height and width attributes."true" if the created HTML image tag does not contain height and width attributespublic java.lang.String getStyle()
public java.lang.String getTitle()
public java.lang.String getUsemap()
public java.lang.String getVspace()
public java.lang.String isPartialTag()
"true" if the HTML tag should only be created as partial tag."true" if the HTML tag should only be created as partial tagpublic void release()
CmsJspImageScalerTagSupportrelease in interface javax.servlet.jsp.tagext.Tagrelease in class CmsJspImageScalerTagSupportTag.release()public void setAlign(java.lang.String value)
value - the value of the HTML "align" attribute to setpublic void setAlt(java.lang.String value)
value - the value of the HTML "alt" attribute to setpublic void setBorder(java.lang.String value)
value - the value of the HTML "border" attribute to setpublic void setCssclass(java.lang.String value)
value - the value of the HTML "class" attribute to setpublic void setHspace(java.lang.String value)
value - the value of the HTML "hspace" attribute to setpublic void setId(java.lang.String value)
setId in class javax.servlet.jsp.tagext.TagSupportvalue - the value of the HTML "id" attribute to setpublic void setLongdesc(java.lang.String value)
value - the value of the HTML "longdesc" attribute to setpublic void setName(java.lang.String value)
value - the value of the HTML "name" attribute to setpublic void setNoDim(java.lang.String noDim)
noDim - the value to setpublic void setPartialTag(java.lang.String partialTag)
partialTag - the value to setpublic void setStyle(java.lang.String value)
value - the value of the HTML "style" attribute to setpublic void setTitle(java.lang.String value)
value - the value of the HTML "title" attribute to setpublic void setUsemap(java.lang.String value)
value - the value of the HTML "usemap" attribute to setpublic void setVspace(java.lang.String value)
value - the value of the HTML "vspace" attribute to set