|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectTagSupport
BodyTagSupport
AbstractClassicTag
HtmlBaseTag
AnchorBase
Anchor
ImageAnchor
public class ImageAnchor
Generates a URL-encoded hyperlink to a specified URI with an image enclosed as the body. ImageAnchor provides support for image rollovers. An imageAnchor must have one of five attributes to correctly create the hyperlink:
<netui:imageAnchor href="index.jsp" src="top.jpg" height="25" width="25" />
Field Summary |
---|
Fields inherited from class AnchorBase |
---|
_clientAction, _linkName, _state, REQUIRED_ATTR |
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 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 | |
---|---|
ImageAnchor()
|
Method Summary | |
---|---|
int |
doEndTag()
Render the image and hyperlink. |
int |
doStartTag()
Insert rollover javascript. |
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 |
setImageStyle(String imageStyle)
Set the <img> style for the contained image. |
void |
setImageStyleClass(String imageClass)
Set the label style class for each contained Image. |
void |
setIsmap(String ismap)
Sets the server-side image map declaration. |
void |
setLongdesc(String longdesc)
Sets the property to specify a link to the the long description to supplement the short description in the alt attribute. |
void |
setRolloverImage(String rolloverImage)
Sets the roll-over image of the ImageAnchor. |
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 Anchor |
---|
doAfterBody, getState, setCharSet, setClientAction, setHrefLang, setLinkName, setOnClick, setRel, setRev, setTarget, setType, setValue |
Methods inherited from class AnchorBase |
---|
addParameter, createAnchorBeginTag, getPopupSupport, setAccessKey, setAction, setCoords, setDisableSecondClick, setFormSubmit, setHref, setLocation, setOnBlur, setOnFocus, setPopup, setShape, setTabindex, setTargetScope |
Methods inherited from class HtmlBaseTag |
---|
getJavaScriptAttribute, getOnClick, getTagId, renderDefaultNameAndId, renderNameAndId, setDir, setLang, setOnDblClick, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setStateAttribute, setStyle, setStyleClass, setTagId, setTitle |
Methods inherited from class BodyTagSupport |
---|
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 IHtmlAccessable |
---|
setAccessKey |
Methods inherited from interface IHtmlCore |
---|
setStyle, setStyleClass, setTagId, setTitle |
Methods inherited from interface Tag |
---|
getParent, setPageContext, setParent |
Constructor Detail |
---|
public ImageAnchor()
Method Detail |
---|
public String getTagName()
getTagName
in interface INetuiTag
getTagName
in class Anchor
public void setAttribute(String name, String value, String facet) throws JspException
src
attribute. ImageAnchor supports two facets, image
and anchor. The default
facet is anchor, meaning if the facet is not specified, the attribute will be applied to the
<a> element. To apply an attribute to the <img> element you must specify the
image
facet.
- Specified by:
setAttribute
in interface IAttributeConsumer
- Overrides:
setAttribute
in class AnchorBase
- 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.
public void setAlign(String align)
align
- the image alignment.public void setAlt(String alt)
setAlt
in interface IHtmlAccessable
alt
- the image alignment.public void setLongdesc(String longdesc)
alt
attribute.
longdesc
- the longdesc.public void setBorder(String border)
border
- the border size.public void setHeight(String height)
height
- the height.public void setHspace(String hspace)
hspace
- the horizontal spacing.public void setIsmap(String ismap)
ismap
- the image map declaration.public void setRolloverImage(String rolloverImage)
rolloverImage
- the rollover image.public void setSrc(String src) throws JspException
src
- the image source URI.
JspException
public void setUsemap(String usemap)
usemap
- the map declaration.public void setVspace(String vspace)
vspace
- the vertical spacing.public void setImageStyle(String imageStyle)
style
attribute if that is
set. If this is not set, and style
is set, then it will be applied to
the image.
imageStyle
- the label stylepublic void setImageStyleClass(String imageClass)
styleClass
attribute if that is
set. If this is not set, and styleClass
is set, then it will be applied to
the image.
imageClass
- the image classpublic void setWidth(String width)
width
- the image width.public int doStartTag() throws JspException
Support for indexed property since Struts 1.1
doStartTag
in interface Tag
doStartTag
in class Anchor
JspException
- if a JSP exception has occurredpublic int doEndTag() throws JspException
doEndTag
in interface Tag
doEndTag
in class Anchor
JspException
- if a JSP exception has occurredprotected void localRelease()
localRelease
in class AnchorBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |