com.sas.taglib.servlet.tbeans.form
Class ImageTag

com.sas.taglib.servlet.tbeans.form.ImageTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally
Direct Known Subclasses:
CellContentsImageRendererTag

public class ImageTag

ImageTag is the tag handler class for the sas:Image custom tag . ImageTag is invoked by the JSP page to evaluate the sas:Image custom tag during the execution of the page. Tag handler methods are called by the JSP page implementation class at various points during the evaluation of the tag. The tag handler methods in turn call methods on the underlying Transformation Bean object, Image, to execute the methods.

If you need to extend or modify the functionality of the sas:Image custom tag, you can subclass this tag handler class.

For More Information:

Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Refer to the Custom Tag Library Reference for usage information on the sas:Image custom tag.

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site.

See Also:
BaseImage, Serialized Form

Field Summary
static java.lang.String RB_KEY
          Key used to lookup resources in the resource bundle.
 
Fields inherited from class com.sas.taglib.servlet.tbeans.form.BaseFormElementBodyTag
accessKey, onBlur, onChange, onClick, onDblClick, onFocus, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onSelect, styleClassPrefix, tabIndex
 
Fields inherited from class com.sas.taglib.BaseBodyTag
DELIMITERS
 
Constructor Summary
ImageTag()
          Constructs a ImageTag
 
Method Summary
protected  void applyAttributes()
          Sets the attributes (image, alternateText, alignment, height, width, horizontalSpace, verticalSpace, borderWidth, useAsFormElement, URL, target, model, modelObject) on the underlying Image object.
 int doStartTag()
          Processes the start tag for this instance.
 java.lang.String getAlignment()
          Gets the alignment attribute (String) of the ImageTag.
 java.lang.String getAlternateText()
          Gets the alternateText attribute (String) of the ImageTag.
 int getBorderWidth()
          Gets the borderWidth attribute (int) of the ImageTag.
 boolean getEnabled()
          Gets the enabled attribute of the ImageTag.
 int getHeight()
          Gets the height attribute (int) of the ImageTag.
 int getHeightPercentage()
          Gets the heightPercentage attribute (int) of the ImageTag.
 int getHorizontalSpace()
          Gets the horizontalSpace attribute (int) of the ImageTag.
 java.lang.String getImage()
          Gets the image attribute (String) of the ImageTag.
 java.lang.String getTarget()
          Gets the target attribute (String) of the ImageTag.
 java.lang.String getURL()
          Gets the URL property (String) of the ImageTag.
 boolean getUseAsFormElement()
          Gets the useAsFormElement attribute (String) of the ImageTag.
 int getVerticalSpace()
          Gets the verticalSpace attribute (int) of the ImageTag.
 int getWidth()
          Gets the width attribute (int) of the ImageTag.
 int getWidthPercentage()
          Gets the widthPercentage attribute (int) of the ImageTag.
protected  void initialize(boolean includeAttributes)
          Initializes attributes and variables for this tag handler.
 void setAlignment(java.lang.String alignment)
          Sets the alignment attribute (String) of the ImageTag.
 void setAlternateText(java.lang.String alttxt)
          Sets the alternateText attribute (String) of the ImageTag.
 void setBorderWidth(int bwidth)
          Sets the borderWidth attribute (int) of the ImageTag.
 void setEnabled(boolean enabled)
          Sets the enabled attribute (boolean) of the Image Tag.
 void setHeight(int h)
          Sets the height attribute (int) of the ImageTag
 void setHeightPercentage(int h)
          Sets the heightPercentage attribute (int) of the ImageTag
 void setHorizontalSpace(int hspace)
          Sets the horizontalSpace attribute (int) of the ImageTag.
 void setImage(java.lang.String imagesrc)
          Sets the image attribute (String) of the ImageTag.
 void setTarget(java.lang.String value)
          Sets the target attribute (String) of the ImageTag.
 void setURL(java.lang.String value)
          Sets the URL attribute (String) of the ImageTag.
 void setUseAsFormElement(boolean value)
          Sets the useAsFormElement attribute (boolean) of the ImageTag.
 void setVerticalSpace(int vspace)
          Sets the verticalSpace attribute (int) of the ImageTag.
 void setWidth(int w)
          Sets the width attribute (int) of the ImageTag.
 void setWidthPercentage(int w)
          Sets the widthPercentage attribute (int) of the ImageTag.
 
Methods inherited from class com.sas.taglib.servlet.tbeans.form.BaseFormElementBodyTag
getAccessKey, getOnBlur, getOnChange, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getStyleClassPrefix, getTabIndex, isEnabled, setAccessKey, setOnBlur, setOnChange, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setStyleClassPrefix, setTabIndex
 
Methods inherited from class com.sas.taglib.servlet.tbeans.BaseTransformationBodyTag
doEndTag, getCustomAttributes, getEpilog, getLocale, getName, getObjectDataProperty, getProlog, getRender, getRenderType, setCustomAttributes, setEpilog, setLocale, setName, setObjectDataProperty, setProlog, setRender, setRenderType
 
Methods inherited from class com.sas.taglib.BaseBodyTag
doCatch, doFinally, getApplyAttributes, getBodyStrings, getCompositeComponentKey, getInstantiate, getPageContext, getRef, getScope, getTagScope, getWrappedClassName, getWrappedObject, getWrappedObject, loadBeanInstance, newInstance, release, removeFromScope, searchContext, setApplyAttributes, setCompositeComponentKey, setInstantiate, setRef, setScope, setTagScope, setVariableWithinScope, setWrappedClassName, setWrappedObject, validate
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
Key used to lookup resources in the resource bundle.

See Also:
Constant Field Values
Constructor Detail

ImageTag

public ImageTag()
Constructs a ImageTag

Method Detail

initialize

protected void initialize(boolean includeAttributes)
Initializes attributes and variables for this tag handler.

Overrides:
initialize in class BaseFormElementBodyTag
Parameters:
includeAttributes - Set to true if attributes are to be set to default values.

setImage

public void setImage(java.lang.String imagesrc)
Sets the image attribute (String) of the ImageTag.

Parameters:
imagesrc - The URL location of the image.

setAlternateText

public void setAlternateText(java.lang.String alttxt)
Sets the alternateText attribute (String) of the ImageTag.

Parameters:
alttxt - The alternate text of the image.

setAlignment

public void setAlignment(java.lang.String alignment)
Sets the alignment attribute (String) of the ImageTag.

Parameters:
align - The text alignment of the image.

setHeight

public void setHeight(int h)
Sets the height attribute (int) of the ImageTag

Parameters:
height - The height of the image.

setHeightPercentage

public void setHeightPercentage(int h)
Sets the heightPercentage attribute (int) of the ImageTag

Parameters:
heightPercentage - The height percentage of the image.

setWidth

public void setWidth(int w)
Sets the width attribute (int) of the ImageTag.

Parameters:
width - The width of the image.

setWidthPercentage

public void setWidthPercentage(int w)
Sets the widthPercentage attribute (int) of the ImageTag.

Parameters:
widthPercentage - The width percentage of the image.

setHorizontalSpace

public void setHorizontalSpace(int hspace)
Sets the horizontalSpace attribute (int) of the ImageTag.

Parameters:
hspace - The horizontal spacing of the image.

setVerticalSpace

public void setVerticalSpace(int vspace)
Sets the verticalSpace attribute (int) of the ImageTag.

Parameters:
vspace - The vertical spacing of the image.

setBorderWidth

public void setBorderWidth(int bwidth)
Sets the borderWidth attribute (int) of the ImageTag. The default borderWidth for the Image Custom Tag is 0.

Parameters:
border - The border width of the image.

setUseAsFormElement

public void setUseAsFormElement(boolean value)
Sets the useAsFormElement attribute (boolean) of the ImageTag. Valid values are: true, false.

Parameters:
useasformelement - Specifies whether to use the form version or standard version of the image, "true" uses the form version.

setURL

public void setURL(java.lang.String value)
Sets the URL attribute (String) of the ImageTag.

Parameters:
url - The URL to which the image should be linked.

setTarget

public void setTarget(java.lang.String value)
Sets the target attribute (String) of the ImageTag.

Parameters:
target - The target the image should use.

setEnabled

public void setEnabled(boolean enabled)
Sets the enabled attribute (boolean) of the Image Tag. Valid values are: true, false.

Overrides:
setEnabled in class BaseFormElementBodyTag
Parameters:
enabled - The state of the Image element; "false" results in a disabled image.
See Also:
BaseFormElementBodyTag.isEnabled()

getImage

public java.lang.String getImage()
Gets the image attribute (String) of the ImageTag.

Returns:
the URL location of the image

getAlternateText

public java.lang.String getAlternateText()
Gets the alternateText attribute (String) of the ImageTag.

Returns:
The alternate text of the image

getAlignment

public java.lang.String getAlignment()
Gets the alignment attribute (String) of the ImageTag.

Returns:
the text alignment of the image

getHeight

public int getHeight()
Gets the height attribute (int) of the ImageTag.

Returns:
the height of the image

getHeightPercentage

public int getHeightPercentage()
Gets the heightPercentage attribute (int) of the ImageTag.

Returns:
the height percentage of the image

getWidth

public int getWidth()
Gets the width attribute (int) of the ImageTag.

Returns:
the width of the image

getWidthPercentage

public int getWidthPercentage()
Gets the widthPercentage attribute (int) of the ImageTag.

Returns:
the width percentage of the image

getHorizontalSpace

public int getHorizontalSpace()
Gets the horizontalSpace attribute (int) of the ImageTag.

Returns:
the horizontal spacing of the image

getVerticalSpace

public int getVerticalSpace()
Gets the verticalSpace attribute (int) of the ImageTag.

Returns:
the vertical spacing of the image

getBorderWidth

public int getBorderWidth()
Gets the borderWidth attribute (int) of the ImageTag. The default borderWidth for the Image Custom Tag is 0.

Returns:
the border width of the image

getUseAsFormElement

public boolean getUseAsFormElement()
Gets the useAsFormElement attribute (String) of the ImageTag.

Returns:
whether the form version or standard version of the image bean should be used

getURL

public java.lang.String getURL()
Gets the URL property (String) of the ImageTag.

Returns:
the URL to which the image should linked

getTarget

public java.lang.String getTarget()
Gets the target attribute (String) of the ImageTag.

Returns:
the target the image should use

getEnabled

public boolean getEnabled()
Gets the enabled attribute of the ImageTag.

Returns:
true if the image is enabled

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Processes the start tag for this instance. The doStartTag() method assumes that all setter methods have been invoked before. When this method is invoked, the body has not yet been invoked.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class BaseTransformationBodyTag
Returns:
int designating the next course of action for the tag/jsp page.
Throws:
javax.servlet.jsp.JspException - Thrown if some type of JSP error occurs
See Also:
BaseBodyTag.setInstantiate(boolean), TagSupport.doStartTag()

applyAttributes

protected void applyAttributes()
                        throws javax.servlet.jsp.JspException
Sets the attributes (image, alternateText, alignment, height, width, horizontalSpace, verticalSpace, borderWidth, useAsFormElement, URL, target, model, modelObject) on the underlying Image object.

Overrides:
applyAttributes in class BaseFormElementBodyTag
Throws:
javax.servlet.jsp.JspException - Thrown if some type of JSP error occurs



Copyright © 2009 SAS Institute Inc. All Rights Reserved.