com.sapportals.htmlb

Class Image

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.Image

public class Image
extends Component

Title: Image Description: Creates a link for an image. To avoid problems with text-only UAs as well as to make image content understandable and navigable to users of non-visual UAs, you need to provide a description with ALT, and avoid server-side image maps

Copyright 2004 SAP AG


Field Summary
static String UI_ID
           
 
Constructor Summary
Image(String src, String alt)
          Creates a Image
 
Method Summary
 String getAlt()
          Returns the alternate text For user agents that cannot display images this attribute specifies alternate text.
 String getHeight()
          Returns the image height
 HoverMenu getHoverMenu()
           
 ImageMap getImageMap()
          Returns the image Map
 String getSrc()
          Returns the image source
 String getTooltip()
          gets the Tooltip for this Image.
 String getUI()
          get a identification String for the renderer that is unique across all supported components.
 String getWidth()
          Returns the image width
 boolean isNested()
           
 void removerHoverMenu(HoverMenu menu)
           
 boolean requiresForm()
          Determines if this Image requires to be placed in form.
 void setAlt(String alt)
          Sets the alternate text For user agents that cannot display images this attribute specifies alternate text.
 void setHeight(String height)
          Sets the height of image
 void setHoverMenu(HoverMenu hoverMenu)
           
 void setImageMap(ImageMap imageMap)
          Sets the image Map
 void setNested(boolean nested)
           
 void setSrc(String src)
          Sets the image source
 void setTooltip(String tooltip)
          sets the Tooltip for this Image.
 void setWidth(String width)
          Sets the width of image
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getId, getParent, initFromPageContext, initFromShortId, initializeFromId, isJsObjectNeeded, preRender, render, renderAsString, setId, setJsObjectNeeded, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UI_ID

public static final String UI_ID
See Also:
Constant Field Values
Constructor Detail

Image

public Image(String src,
             String alt)
Creates a Image

Parameters:
src - URI of image to embed
alt - The alternate text
Method Detail

getUI

public String getUI()
Description copied from class: Component
get a identification String for the renderer that is unique across all supported components. E.g. you could simply return the class name of the component class. The reason for using a separate method and not some internal reflection method is that you can more easily extend the functionality or your Component class without having to rewrite the view class.

Specified by:
getUI in class Component
Returns:
a unique identification string for this Component

getSrc

public String getSrc()
Returns the image source

Returns:
URI of image to embed

setSrc

public void setSrc(String src)
Sets the image source

Parameters:
src - URI of image to embed

getTooltip

public String getTooltip()
gets the Tooltip for this Image. Tooltips can not contain HTML coding.

Returns:
the tooltip text

setTooltip

public void setTooltip(String tooltip)
sets the Tooltip for this Image. Tooltips can not contain HTML coding.

Parameters:
tooltip - the tooltip text

getWidth

public String getWidth()
Returns the image width

Returns:
Width of image in pixel

setWidth

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

Parameters:
width - width of image in pixel

getHeight

public String getHeight()
Returns the image height

Returns:
Height of image in pixel

setHeight

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

Parameters:
height - Height of image in pixel

getAlt

public String getAlt()
Returns the alternate text For user agents that cannot display images this attribute specifies alternate text.

Returns:
The alternate text

setAlt

public void setAlt(String alt)
Sets the alternate text For user agents that cannot display images this attribute specifies alternate text.

Parameters:
alt - The alternate text

getImageMap

public ImageMap getImageMap()
Returns the image Map

Returns:
the image Map

setImageMap

public void setImageMap(ImageMap imageMap)
Sets the image Map

Parameters:
imageMap - the image Map

requiresForm

public boolean requiresForm()
Determines if this Image requires to be placed in form. Always returns false.

Overrides:
requiresForm in class Component
Returns:
false: an Image doesn't require a form.

getHoverMenu

public HoverMenu getHoverMenu()

setHoverMenu

public void setHoverMenu(HoverMenu hoverMenu)

removerHoverMenu

public void removerHoverMenu(HoverMenu menu)

setNested

public void setNested(boolean nested)

isNested

public boolean isNested()


Copyright 2006 SAP AG Complete Copyright Notice