|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.opencms.jsp.CmsJspTagImage
Creates HTML code for <img src> tags that use the OpenCms image scaling capabilities.
Field Summary |
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
CmsJspTagImage()
Creates a new image scaling tag instance. |
Method Summary | |
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 |
getHeight()
Returns the scaling height for the image. |
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 |
getScaleColor()
Returns the background color used by the image scaler. |
java.lang.String |
getScaleFilter()
Returns the filter list used by the image scaler. |
java.lang.String |
getScalePosition()
Returns the position used by the image scaler. |
java.lang.String |
getScaleQuality()
Returns the quality used by the image scaler. |
java.lang.String |
getScaleRendermode()
Returns the render mode used by the image scaler. |
java.lang.String |
getScaleType()
Returns the scaling type for the image. |
java.lang.String |
getSrc()
Returns the source of the image to scale, which will have the OpenCms webapp / servlet prefix added. |
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. |
java.lang.String |
getWidth()
Returns the scaling width for the image. |
static java.lang.String |
imageTagAction(java.lang.String src,
CmsImageScaler scaler,
java.util.Map 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()
|
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 |
setHeight(java.lang.String value)
Sets the scaling height for the image. |
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 |
setPartialTag(java.lang.String partialTag)
Controls if the created HTML image tag is a full or partial tag. |
void |
setScaleColor(java.lang.String value)
Sets the background color used by the image scaler. |
void |
setScaleFilter(java.lang.String value)
Sets the filter(s) used by the image scaler. |
void |
setScalePosition(java.lang.String value)
Sets the position used by the image scaler. |
void |
setScaleQuality(java.lang.String value)
Sets the quality used by the image scaler. |
void |
setScaleRendermode(java.lang.String value)
Sets the render mode used by the image scaler. |
void |
setScaleType(java.lang.String value)
Sets the scaling type for the image. |
void |
setSrc(java.lang.String value)
Sets the source of the image. |
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. |
void |
setWidth(java.lang.String value)
Sets the scaling width for the image. |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
Constructor Detail |
public CmsJspTagImage()
Method Detail |
public static java.lang.String imageTagAction(java.lang.String src, CmsImageScaler scaler, java.util.Map 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 request
CmsException
- in case something goes wrongpublic void addParameter(java.lang.String name, java.lang.String value)
I_CmsJspTagParamParent
addParameter
in interface I_CmsJspTagParamParent
name
- 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.Tag
javax.servlet.jsp.JspException
Tag.doEndTag()
public int doStartTag()
BodyTag.EVAL_BODY_BUFFERED
.
doStartTag
in interface javax.servlet.jsp.tagext.Tag
BodyTag.EVAL_BODY_BUFFERED
Tag.doStartTag()
public java.lang.String getAlign()
public java.lang.String getAlt()
public java.lang.String getBorder()
public java.lang.String getHeight()
public java.lang.String getHspace()
public java.lang.String getId()
public java.lang.String getLongdesc()
public java.lang.String getName()
public java.lang.String getScaleColor()
public java.lang.String getScaleFilter()
public java.lang.String getScalePosition()
public java.lang.String getScaleQuality()
public java.lang.String getScaleRendermode()
public java.lang.String getScaleType()
public java.lang.String getSrc()
public java.lang.String getStyle()
public java.lang.String getTitle()
public java.lang.String getUsemap()
public java.lang.String getVspace()
public java.lang.String getWidth()
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()
release
in interface javax.servlet.jsp.tagext.Tag
Tag.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 setHeight(java.lang.String value)
If no valid integer is given, then "0" is used as value.
value
- the scaling height for the image to setpublic void setHspace(java.lang.String value)
value
- the value of the HTML "hspace" attribute to setpublic void setId(java.lang.String value)
value
- 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 setPartialTag(java.lang.String partialTag)
partialTag
- the value to setpublic void setScaleColor(java.lang.String value)
value
- the background color to setpublic void setScaleFilter(java.lang.String value)
value
- the filter(s) to setpublic void setScalePosition(java.lang.String value)
value
- the position to setpublic void setScaleQuality(java.lang.String value)
value
- the quality to setpublic void setScaleRendermode(java.lang.String value)
value
- the render mode to setpublic void setScaleType(java.lang.String value)
If no valid integer is given, then "0" is used as value.
value
- the scaling type for the image to setpublic void setSrc(java.lang.String value)
The source must be an absolute path in the current users OpenCms site, without any webapp or servlet prefix.
value
- the image source 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 setpublic void setWidth(java.lang.String value)
If no valid integer is given, then "0" is used as value.
value
- the scaling width for the image to set
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |