Class ImageTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.deltava.taglib.BrowserInfoTag
org.deltava.taglib.html.ElementTag
org.deltava.taglib.html.ImageTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, Serializable
- 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 ElementTag
_classes, _data, _outModifier and TypeFieldDescriptionprotected final Collection<String> protected final XMLRendererprotected jakarta.servlet.jsp.JspWriterFields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoEndTag()Generates this image's HTML.intExecuted post tag setup.voidrelease()protected voidRenders the image tag tot he JSP output stream.voidsetCaption(String caption) Sets the alternate caption for this image.voidSets the source of this image.voidsetX(int width) Sets the width of ths image.voidsetY(int height) Sets the height of ths image.Methods inherited from class ElementTag
getFormIndexCount, getName, getParentFormTag, setClassName, setID, setNumericAttr, setPageContext, setStyleModifier and TypeMethodDescriptionprotected intGets and increments the current tab index count for the parent form tag.protected StringgetName()Returns the type of HTML element this tag generated.protected FormTagReturns the parent form tag.voidsetClassName(String cName) Sets the CSS class name of this HTML element.voidSets the ID of this HTML element.protected voidsetNumericAttr(String attrName, int value, int minValue) Sets a numeric attribute.voidsetPageContext(jakarta.servlet.jsp.PageContext ctxt) voidAssociates a CSS style with this HTML element.Methods inherited from class BrowserInfoTag
getBrowserContext, passedCAPTCHAModifier and TypeMethodDescriptionprotected HTTPContextDataFetches the browser data.protected booleanReturns whether the user has passed CAPTCHA validation.Methods inherited from class jakarta.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
public int doEndTag() throws jakarta.servlet.jsp.JspExceptionGenerates this image's HTML.- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.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:
releasein interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
releasein classElementTag
-
doStartTag
public int doStartTag() throws jakarta.servlet.jsp.JspExceptionExecuted post tag setup. Creates a STYLE element if dimensions specified.- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classElementTag- Returns:
- SKIP_BODY always
- Throws:
jakarta.servlet.jsp.JspException- if an error occurs
-