public class ImageTag extends FieldTag
| Modifier and Type | Field and Description |
|---|---|
static String |
CROP_BEGIN |
static String |
CROP_END |
static String |
CROP_MIDDLE |
static int |
MODE_HTML_ATTRIBUTES |
static int |
MODE_HTML_IMG |
static int |
MODE_URL |
static UrlEscaper |
URLESCAPER |
parentFieldIdelement, parentNodeIdcloudIdcontextId, EVAL_BODY, helper, id, pageContextTag, referid, writerid| Constructor and Description |
|---|
ImageTag() |
| Modifier and Type | Method and Description |
|---|---|
int |
doEndTag()
write the value of the field.
|
int |
doStartTag() |
protected String |
encodeURL(Node node,
String servletPath) |
protected String |
getAltAttribute(Node node) |
protected String |
getBaseAttributes(String url,
Dimension dim) |
protected String |
getCropTemplate(Node node,
int width,
int height,
String cropTemplate)
Returns the crop template string to be used by img servlet
|
Dimension |
getDimension(Node node,
String template) |
protected String |
getOtherAttributes() |
protected String |
getOutputValue(int mode,
Node node,
String servletPath,
Dimension dim) |
protected String |
getResizeTemplate(Node node,
int width,
int height)
Returns the resize template string to be used by img servlet without cropping
|
String |
getServletArgument(Node node,
String t) |
Parameters |
getServletArguments(String servletArgument,
Function servletPathFunction) |
Function |
getServletFunction(Node node) |
protected Node |
getServletNode(Node node,
String template) |
protected String |
getServletPath(Node node,
String servletArgument) |
protected String |
getSrcAttribute(String url) |
String |
getTemplate(Node node,
String t,
int widthTemplate,
int heightTemplate,
String cropTemplate)
Get template to manipulate image
|
void |
setAbsolute(String a) |
void |
setAlign(String align) |
void |
setAlt(String a) |
void |
setBorder(String border) |
void |
setCrop(String crop) |
void |
setDisposition(String d) |
void |
setHeight(String height) |
void |
setHspace(String hspace) |
void |
setMode(String m) |
void |
setStyle(String style) |
void |
setStyleClass(String styleClass) |
void |
setTemplate(String t)
The transformation template
|
void |
setVspace(String vspace) |
void |
setWidth(String width) |
void |
setXmlnamespace(String x) |
convert, doAfterBody, doFinally, getFieldVar, getNodeVar, handleEditTag, setFieldVar, setFieldVar, setName, setNotfoundfindFieldProvider, findFieldProvider, getField, setFieldfillStandardParameters, findNode, findNodeProvider, findNodeProvider, getCloudVar, getLocale, getNode, getNode, getNodeFromPageContext, initTag, setElement, setNodefindCloudProvider, findCloudProvider, getCloudContext, getNode, getNodeOrNull, setCloudappendMoreParameters, doCatch, findLoopOrQuery, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getCurrentBlock, getDefaultLocale, getEscapedValue, getFormTag, getId, getLocaleFromContext, getObject, getObjectConditional, getPageContext, getPageContextTag, getQuery, getReferid, getString, getTaglibVersion, getThreadPageContext, getTimer, getTimeZone, getWriterValue, haveBody, release, setContext, setEscape, setId, setJspvar, setListdelimiter, setPageContext, setPageContextOnly, setReferid, setVartype, setWrite, setWriterdoInitBody, getBodyContent, getPreviousOut, setBodyContentfindAncestorWithClass, getParent, getValue, getValues, removeValue, setParent, setValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIdgetWriterValue, haveBody, setEscape, setJspvar, setVartype, setWritepublic static final int MODE_URL
public static final int MODE_HTML_ATTRIBUTES
public static final int MODE_HTML_IMG
public static final String CROP_BEGIN
public static final String CROP_MIDDLE
public static final String CROP_END
public static final UrlEscaper URLESCAPER
public void setTemplate(String t) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setMode(String m) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setAlign(String align) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setBorder(String border) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setStyleClass(String styleClass) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setCrop(String crop) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setHeight(String height) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setHspace(String hspace) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setStyle(String style) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setVspace(String vspace) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setWidth(String width) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setAlt(String a) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setAbsolute(String a) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setDisposition(String d) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic void setXmlnamespace(String x) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic int doStartTag()
throws javax.servlet.jsp.JspException
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class FieldTagjavax.servlet.jsp.JspExceptionpublic int doEndTag()
throws javax.servlet.jsp.JspTagException
FieldTagprotected String getServletPath(Node node, String servletArgument) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic Parameters getServletArguments(String servletArgument, Function servletPathFunction) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionprotected String getOutputValue(int mode, Node node, String servletPath, Dimension dim) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionprotected String getSrcAttribute(String url) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionprotected String getBaseAttributes(String url, Dimension dim) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionprotected String getAltAttribute(Node node) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionprotected String getOtherAttributes() throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagExceptionpublic String getTemplate(Node node, String t, int widthTemplate, int heightTemplate, String cropTemplate)
node - - image nodet - - custom template stringwidthTemplate - - width of image, which is used when custom is not providedheightTemplate - - height of image, which is used when custom is not providedcropTemplate - - crop the image. values are 'begin', 'middle' and 'end'.protected String getCropTemplate(Node node, int width, int height, String cropTemplate)
node - - get template for this nodewidth - - template widthheight - - template heightMMBase 1.9-SNAPSHOT - ${javadoctimestamp}