Class ImageTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.BrowserInfoTag
org.deltava.taglib.html.ElementTag
org.deltava.taglib.html.ImageTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
- Direct Known Subclasses:
FlagTag
,ImageBeanTag
,RemoteAddressTag
An JSP Tag to generate an IMG element.
- Since:
- 1.0
- Version:
- 10.2
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class org.deltava.taglib.html.ElementTag
_classes, _data, _out
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
doEndTag()
Generates this image's HTML.int
Executed post tag setup.void
release()
protected void
Renders the image tag tot he JSP output stream.void
setCaption
(String caption) Sets the alternate caption for this image.void
Sets the source of this image.void
setX
(int width) Sets the width of ths image.void
setY
(int height) Sets the height of ths image.Methods inherited from class org.deltava.taglib.html.ElementTag
getFormIndexCount, getName, getParentFormTag, setClassName, setID, setNumericAttr, setPageContext, setStyle
Methods inherited from class org.deltava.taglib.BrowserInfoTag
getBrowserContext
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
-
Constructor Details
-
ImageTag
public ImageTag()Creates a new Image element tag.
-
-
Method Details
-
renderHTML
-
doEndTag
Generates this image's HTML.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
- Throws:
JspException
- if an error occurs
-
setX
public void setX(int width) Sets the width of ths image. This does nothing if a negative, zero or non-numeric value is passed.- Parameters:
width
- the width of the image in pixels
-
setY
public void setY(int height) Sets the height of ths image. This does nothing if a negative, zero or non-numeric value is passed.- Parameters:
height
- the height of the image in pixels
-
setSrc
Sets the source of this image.- Parameters:
url
- the location of the image
-
setCaption
Sets the alternate caption for this image.- Parameters:
caption
- the caption for this mage
-
release
public void release()- Specified by:
release
in interfaceTag
- Overrides:
release
in classElementTag
-
doStartTag
Executed post tag setup. Creates a STYLE element if dimensions specified.- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classElementTag
- Returns:
- SKIP_BODY always
- Throws:
JspException
- if an error occurs
-