org.apache.beehive.netui.tags.html
Class Image

Object
  extended by TagSupport
      extended by BodyTagSupport
          extended by AbstractClassicTag
              extended by HtmlBaseTag
                  extended by Image
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag, HtmlConstants, IUrlParams, IAttributeConsumer, IHtmlAttrs, IHtmlCore, IHtmlEvents, IHtmlI18n, INetuiTag

public class Image
extends HtmlBaseTag
implements IUrlParams

Generates an image with the specified attributes. Image ignores its body content.

See Also:
Serialized Form
Example
In this sample, an Image shows "friends.jpg" at 150 x 175 pixels, with the id "Friends".
<netui:image src="friends.jpg" id="Friends" height="150" width="175" />

Field Summary
 
Fields inherited from class AbstractClassicTag
DefaultNamingChain, EMPTY_STRING, NETUI_UNIQUE_CNT
 
Fields inherited from class BodyTagSupport
bodyContent
 
Fields inherited from class TagSupport
id, pageContext
 
Fields inherited from interface HtmlConstants
ABBR, ACCEPT, ACCESSKEY, ACTION, ALIGN, ALINK, ALT, ANCHOR, AREA, AXIS, BACKGROUND, BASE, BGCOLOR, BODY, BORDER, BR, CAPTION, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CLASS, COLS, COLSPAN, COORDS, DIR, DISABLED, DIV, ENCTYPE, FOR, FORM, FORM_GET, FORM_POST, FRAME, HEADERS, HEIGHT, HREF, HREFLANG, HSPACE, HTML, ID, IMAGE, INPUT, INPUT_BUTTON, INPUT_CHECKBOX, INPUT_FILE, INPUT_HIDDEN, INPUT_IMAGE, INPUT_PASSWORD, INPUT_RADIO, INPUT_RESET, INPUT_SUBMIT, INPUT_TEXT, ISMAP, LABEL, LANG, LANGUAGE, LINK, LONGDESC, MAXLENGTH, METHOD, NAME, ONBLUR, ONCHANGE, ONCLICK, ONDBLCLICK, ONFOCUS, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONRESET, ONSELECT, ONSUBMIT, ONUNLOAD, OPTION, READONLY, REL, REV, ROWS, ROWSPAN, RULES, SCOPE, SCRIPT, SELECT, SHAPE, SIZE, SPAN, SRC, STYLE, SUMMARY, TABINDEX, TABLE, TARGET, TBODY, TD, TEXT, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TYPE, USEMAP, VALIGN, VALUE, VLINK, VSPACE, WIDTH
 
Fields inherited from interface BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
Image()
           
 
Method Summary
 void addParameter(String name, Object value, String facet)
          Adds a URL parameter to the generated hyperlink.
 int doEndTag()
          Render the end of the IMG tag.
 int doStartTag()
          Render the beginning of the IMG tag.
protected  AbstractHtmlState getState()
          This method will return the state associated with the tag.
 String getTagName()
          Return the name of the Tag.
protected  void localRelease()
          Release any acquired resources.
 void setAlign(String align)
          Sets the property to specify where to align the image.
 void setAlt(String alt)
          Sets the property to specify the alt text of the image.
 void setAttribute(String name, String value, String facet)
          Base support for the attribute tag.
 void setBorder(String border)
          Sets the border size around the image.
 void setHeight(String height)
          Sets the image height.
 void setHspace(String hspace)
          Sets the the horizontal spacing around the image.
 void setIsmap(String ismap)
          Sets the server-side image map declaration.
 void setLocation(String location)
          Sets the location hash to append to the url.
 void setLongdesc(String longdesc)
          Sets the property to specify the longdesc.
 void setSrc(String src)
          Sets the image source URI.
 void setUsemap(String usemap)
          Sets the client-side image map declaration.
 void setVspace(String vspace)
          Sets the vertical spacing around the image.
 void setWidth(String width)
          Sets the image width.
 
Methods inherited from class HtmlBaseTag
getJavaScriptAttribute, getNearestForm, getOnClick, getTagId, qualifyUrlToContext, renderDefaultNameAndId, renderNameAndId, setDir, setLang, setOnClick, setOnDblClick, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setStateAttribute, setStyle, setStyleClass, setTagId, setTitle
 
Methods inherited from class AbstractClassicTag
applyNamingChain, getErrorsReport, getIdForTagId, getNamingChain, getNextId, getScriptReporter, getUserLocale, hasErrors, qualifyAttribute, registerTagError, registerTagError, reportAndExit, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write
 
Methods inherited from class BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Tag
getParent, setPageContext, setParent
 

Constructor Detail

Image

public Image()
Method Detail

getTagName

public String getTagName()
Return the name of the Tag.

Specified by:
getTagName in interface INetuiTag
Specified by:
getTagName in class AbstractClassicTag
Returns:
the name of the tag.

getState

protected AbstractHtmlState getState()
This method will return the state associated with the tag. This is used by this base class to access the individual state objects created by the tags.

Specified by:
getState in class HtmlBaseTag
Returns:
a subclass of the AbstractHtmlState class.

setAttribute

public void setAttribute(String name,
                         String value,
                         String facet)
                  throws JspException
Base support for the attribute tag. This is overridden to prevent setting the src attribute.

Specified by:
setAttribute in interface IAttributeConsumer
Overrides:
setAttribute in class HtmlBaseTag
Parameters:
name - The name of the attribute. This value may not be null or the empty string.
value - The value of the attribute. This may contain an expression.
facet - The name of a facet to which the attribute will be applied. This is optional.
Throws:
JspException - A JspException may be thrown if there is an error setting the attribute.

setAlign

public void setAlign(String align)
Sets the property to specify where to align the image.

Parameters:
align - - the image alignment.

setAlt

public void setAlt(String alt)
Sets the property to specify the alt text of the image.

Parameters:
alt - - the image alignment.

setLongdesc

public void setLongdesc(String longdesc)
Sets the property to specify the longdesc.

Parameters:
longdesc - - the longdesc.

setBorder

public void setBorder(String border)
Sets the border size around the image.

Parameters:
border - - the border size.

setHeight

public void setHeight(String height)
Sets the image height.

Parameters:
height - - the height.

setHspace

public void setHspace(String hspace)
Sets the the horizontal spacing around the image.

Parameters:
hspace - - the horizontal spacing.

setIsmap

public void setIsmap(String ismap)
Sets the server-side image map declaration.

Parameters:
ismap - - the image map declaration.

setLocation

public void setLocation(String location)
Sets the location hash to append to the url.

Parameters:
location - - the location hash.

setSrc

public void setSrc(String src)
            throws JspException
Sets the image source URI.

Parameters:
src - - the source URI.
Throws:
JspException

setUsemap

public void setUsemap(String usemap)
Sets the client-side image map declaration.

Parameters:
usemap - - the map declaration.

setVspace

public void setVspace(String vspace)
Sets the vertical spacing around the image.

Parameters:
vspace - - the vertical spacing.

setWidth

public void setWidth(String width)
Sets the image width.

Parameters:
width - - the image width.

addParameter

public void addParameter(String name,
                         Object value,
                         String facet)
                  throws JspException
Adds a URL parameter to the generated hyperlink.

Specified by:
addParameter in interface IUrlParams
Parameters:
name - - the name of the parameter to be added.
value - - the value of the parameter to be added (a String or String[]).
facet -
Throws:
JspException

doStartTag

public int doStartTag()
               throws JspException
Render the beginning of the IMG tag.

Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class BodyTagSupport
Throws:
JspException - if a JSP exception has occurred

doEndTag

public int doEndTag()
             throws JspException
Render the end of the IMG tag.

Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class BodyTagSupport
Throws:
JspException - if a JSP exception has occurred

localRelease

protected void localRelease()
Release any acquired resources.

Overrides:
localRelease in class HtmlBaseTag