- All Implemented Interfaces:
AltAttribute,ClassAttribute,DataAttribute,DirAttribute,GlobalAttributes,GlobalBufferedAttributes,HeightAttribute,IdAttribute,OnclickAttribute,OnerrorAttribute,OnloadAttribute,ParamsAttribute,SrcAttribute,StyleAttribute,TitleAttribute,WidthAttribute,DynamicAttributes,JspTag,SimpleTag
public class ImgTag
extends ElementBufferedTag
implements SrcAttribute, ParamsAttribute, WidthAttribute, HeightAttribute, AltAttribute, TitleAttribute, OnclickAttribute, OnerrorAttribute, OnloadAttribute
- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from class com.aoapps.taglib.ElementBufferedTag
global -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanAdds a dynamic attribute.voidAdds a parameter.protected voiddoTag(BufferResult capturedBody, Writer out) voidsetAbsolute(boolean absolute) voidsetAddLastModified(String addLastModified) voidvoidsetCanonical(boolean canonical) voidvoidsetIsmap(boolean ismap) voidsetOnclick(Object onclick) voidsetOnerror(Object onerror) voidvoidvoidvoidvoidMethods inherited from class com.aoapps.taglib.ElementBufferedTag
addData, getClazz, getData, getDir, getId, getStyle, setClazz, setData, setDir, setDynamicAttribute, setId, setStyleMethods inherited from class com.aoapps.encoding.taglib.EncodingBufferedTag
doTag, getTempFileThreshold, invoke, newBufferWriter, newBufferWriter, newBufferWriter, newBufferWriter, setMediaEncoderOptions, writeEncoderPrefix, writeEncoderSuffix, writePrefix, writeSuffixMethods inherited from class jakarta.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.aoapps.taglib.ParamsAttribute
addParam
-
Constructor Details
-
ImgTag
public ImgTag()
-
-
Method Details
-
getContentType
- Specified by:
getContentTypein classEncodingBufferedTag
-
getOutputType
- Specified by:
getOutputTypein classEncodingBufferedTag
-
setSrc
- Specified by:
setSrcin interfaceSrcAttribute
-
addParam
Description copied from interface:ParamsAttributeAdds a parameter.The conversion to string may be deferred, or the value may be streamed instead of being converted to a string. It is incorrect to change the state of the provided value; doing so may or may not affect the value of the resulting parameter.
When the value is an
Enum, the parameter value is obtained fromEnum.name()instead ofEnum.toString(). This is to intuitively use enums as parameters whenEnum.toString()is overridden.Default method is for backward compatibility only. Implementations should override this version.
- Specified by:
addParamin interfaceParamsAttribute
-
setAbsolute
public void setAbsolute(boolean absolute) -
setCanonical
public void setCanonical(boolean canonical) -
setAddLastModified
-
setWidth
- Specified by:
setWidthin interfaceWidthAttribute
-
setHeight
- Specified by:
setHeightin interfaceHeightAttribute
-
setAlt
- Specified by:
setAltin interfaceAltAttribute
-
setTitle
- Specified by:
setTitlein interfaceTitleAttribute
-
setUsemap
-
setIsmap
public void setIsmap(boolean ismap) -
setOnclick
- Specified by:
setOnclickin interfaceOnclickAttribute
-
setOnerror
- Specified by:
setOnerrorin interfaceOnerrorAttribute
-
setOnload
- Specified by:
setOnloadin interfaceOnloadAttribute
-
addDynamicAttribute
protected boolean addDynamicAttribute(String uri, String localName, Object value, List<String> expectedPatterns) throws JspTagException Adds a dynamic attribute.- Overrides:
addDynamicAttributein classElementBufferedTag- Returns:
truewhen added, orfalsewhen attribute not expected and has not been added.- Throws:
JspTagException- See Also:
-
doTag
- Overrides:
doTagin classEncodingBufferedTag- Throws:
JspExceptionIOException
-
