PAJES 3.0.21

org.pajes.html
Class Image

java.lang.Object
  extended by org.pajes.html.Tag
      extended by org.pajes.html.Image
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, HTML

public class Image
extends Tag

Generates the <ing> tag to display a graphical element.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.pajes.html.Tag
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT
 
Constructor Summary
Image()
          Creates an empty image tag.
Image(java.lang.String imageSource)
          Add an image to the page.
Image(java.lang.String imageSource, int height, int width)
          Add an image to the page.
Image(java.lang.String imageSource, int height, int width, int borderWidth)
          Add an image to the page.
Image(java.lang.String imageSource, int height, int width, int borderWidth, java.lang.String alternateText)
          Add an image to the page.
Image(java.lang.String imageSource, int height, int width, java.lang.String alternateText)
          Add an image to the page.
Image(java.lang.String imageSource, int borderWidth, java.lang.String alternateText)
          Add an image to the page.
Image(java.lang.String name, java.lang.String imageSource, int height, int width)
          Add an image to the page.
Image(java.lang.String name, java.lang.String imageSource, int height, int width, int borderWidth)
          Add an image to the page.
Image(java.lang.String name, java.lang.String imageSource, int height, int width, int borderWidth, java.lang.String alternateText)
          Add an image to the page.
Image(java.lang.String name, java.lang.String imageSource, int height, int width, java.lang.String alternateText)
          Add an image to the page.
Image(java.lang.String imageSource, java.lang.String height, java.lang.String width)
          Add an image to the page.
Image(java.lang.String name, java.lang.String imageSource, java.lang.String height, java.lang.String width)
          Add an image to the page.
Image(java.lang.String name, java.lang.String imageSource, java.lang.String height, java.lang.String width, int borderWidth)
          Add an image to the page.
Image(java.lang.String name, java.lang.String imageSource, java.lang.String height, java.lang.String width, int borderWidth, java.lang.String alternateText)
          Add an image to the page.
Image(java.lang.String name, java.lang.String imageSource, java.lang.String height, java.lang.String width, java.lang.String alternateText)
          Add an image to the page.
 
Method Summary
 void addContent(java.lang.String content)
          Adds additional alternate text.
 java.lang.String getAlignment()
          Gets the alignment of the image with respect to other text and images.
 java.lang.String getAlternateText()
          Gets the alternate text to be displayed before the image is loaded.
 java.lang.Integer getBorderWidth()
          Gets the width of the border around the image.
 java.lang.String getHeight()
          Gets the height of the image.
 java.lang.Integer getHorizontalSpace()
          Gets the number of pixels of extra space to leave between the image and the text on the left and right sides of the image.
 java.lang.String getImageMapToUse()
          Returns the client-side image map that will define the coordinates and related hyperlinks.
 java.lang.String getImageSource()
          Gets the source attribute of this image.
 java.lang.String getLowResolutionImageSource()
          Gets the alternate low resolution image.
 java.lang.String getName()
          Gets the name attribute of this image.
 java.lang.Integer getVerticalSpace()
          Gets the number of pixels of extra space to leave between the image and the text on the top and bottom of the image.
 boolean isImageMap()
          Indicates whether this image is an image map.
 Image setAlignment(java.lang.String alignment)
          Sets the alignment of the image with respect to other text and images.
 Image setAlternateText(java.lang.String alternateText)
          Sets the alternate text to be displayed before the image is loaded.
protected  void setAttribute(TagAttribute attribute)
          Adds the specified attribute.
 Image setBorderWidth(int borderWidth)
          Sets the width of the border around the image.
 void setContent(java.lang.String text)
          Sets the alternate text.
 Image setHeight(java.lang.String height)
          Sets the height of the image.
 Image setHorizontalSpace(int pixels)
          Sets the number of pixels of extra space to leave between the image and the text on the left and right sides of the image.
 Image setImageMap(boolean isMap)
          Indicates whether this image is an image map.
 Image setImageMapToUse(java.lang.String map)
          Specifies the client-side image map that will define the coordinates and related hyperlinks.
 Image setImageSource(java.lang.String imageSource)
          Sets the source attribute of this image.
 Image setLowResolutionImageSource(java.lang.String imageSource)
          Sets the alternate low resolution image.
 Image setName(java.lang.String name)
          Sets the name attribute of this image.
 Image setVerticalSpace(int pixels)
          Sets the number of pixels of extra space to leave between the image and the text on the top and bottom of the image.
 Image setWidth(java.lang.String width)
          Sets the width of the image.
 
Methods inherited from class org.pajes.html.Tag
addAttribute, addAttributes, addAttributes, clearAttribute, clearAttributes, clone, destroy, getAttribute, getAttributes, getAttributeSet, getContainer, getContent, getDocument, getId, getOnClickHandler, getOnDBLClickHandler, getOnKeyDownHandler, getOnKeyPressHandler, getOnKeyUpHandler, getOnMouseDownHandler, getOnMouseOutHandler, getOnMouseOverHandler, getOnMouseUpHandler, getParent, getStyle, getStyleSheetClass, getTagName, getTitle, getWritePermission, hasAttribute, init, initAttributes, isChildOf, isChildOf, isWritable, isWritable, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setContainer, setContent, setId, setOnClickHandler, setOnDBLClickHandler, setOnKeyDownHandler, setOnKeyPressHandler, setOnKeyUpHandler, setOnMouseDownHandler, setOnMouseOutHandler, setOnMouseOverHandler, setOnMouseUpHandler, setParent, setStyle, setStyleSheetClass, setTagName, setTitle, setWritable, setWriteAttributes, setWriteEndTag, setWritelnAfter, setWritelnAfterContent, setWritelnBefore, setWritelnBeforeContent, setWritePermission, toString, write, writeContent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Image

public Image()
Creates an empty image tag.


Image

public Image(java.lang.String imageSource)
Add an image to the page.

Parameters:
imageSource - the source URL of the image. Eg. "images/picture.jpg"

Image

public Image(java.lang.String imageSource,
             int height,
             int width)
Add an image to the page.

Parameters:
imageSource - the source URL of the image. Eg. "images/picture.jpg"
height - the height of the image in pixels.
width - the width of the image in pixels.

Image

public Image(java.lang.String imageSource,
             int height,
             int width,
             int borderWidth)
Add an image to the page.

Parameters:
imageSource - the source URL of the image. Eg. "images/picture.jpg"
height - the height of the image in pixels or a percent.
width - the width of the image in pixels or a percent.
borderWidth - the width of the border around the image.

Image

public Image(java.lang.String imageSource,
             int height,
             int width,
             int borderWidth,
             java.lang.String alternateText)
Add an image to the page.

Parameters:
imageSource - the source URL of the image. Eg. "images/picture.jpg"
height - the height of the image in pixels or a percent.
width - the width of the image in pixels or a percent.
borderWidth - the width of the border around the image.
alternateText - the text displayed before the image is loaded.

Image

public Image(java.lang.String imageSource,
             int height,
             int width,
             java.lang.String alternateText)
Add an image to the page.

Parameters:
imageSource - the source URL of the image. Eg. "images/picture.jpg"
height - the height of the image in pixels or a percent.
width - the width of the image in pixels or a percent.
alternateText - the text displayed before the image is loaded.

Image

public Image(java.lang.String imageSource,
             int borderWidth,
             java.lang.String alternateText)
Add an image to the page.

Parameters:
imageSource - the source URL of the image. Eg. "images/picture.jpg"
borderWidth - the width of the border around the image.
alternateText - the text displayed before the image is loaded.

Image

public Image(java.lang.String name,
             java.lang.String imageSource,
             int height,
             int width)
Add an image to the page.

Parameters:
name - the name attribute of this image.
imageSource - the source URL of the image. Eg. "images/picture.jpg"
height - the height of the image in pixels or a percent.
width - the width of the image in pixels or a percent.

Image

public Image(java.lang.String name,
             java.lang.String imageSource,
             int height,
             int width,
             int borderWidth)
Add an image to the page.

Parameters:
name - the name attribute of this image.
imageSource - the source URL of the image. Eg. "images/picture.jpg"
height - the height of the image in pixels or a percent.
width - the width of the image in pixels or a percent.
borderWidth - the width of the border around the image.

Image

public Image(java.lang.String name,
             java.lang.String imageSource,
             int height,
             int width,
             int borderWidth,
             java.lang.String alternateText)
Add an image to the page.

Parameters:
name - the name attribute of this image.
imageSource - the source URL of the image. Eg. "images/picture.jpg"
height - the height of the image in pixels or a percent.
width - the width of the image in pixels or a percent.
borderWidth - the width of the border around the image.
alternateText - the text displayed before the image is loaded.

Image

public Image(java.lang.String name,
             java.lang.String imageSource,
             int height,
             int width,
             java.lang.String alternateText)
Add an image to the page.

Parameters:
name - the name attribute of this image.
imageSource - the source URL of the image. Eg. "images/picture.jpg"
height - the height of the image in pixels or a percent.
width - the width of the image in pixels or a percent.
alternateText - the text displayed before the image is loaded.

Image

public Image(java.lang.String imageSource,
             java.lang.String height,
             java.lang.String width)
Add an image to the page.

Parameters:
imageSource - the source URL of the image. Eg. "images/picture.jpg"
height - the height of the image in pixels or a percent.
width - the width of the image in pixels or a percent.

Image

public Image(java.lang.String name,
             java.lang.String imageSource,
             java.lang.String height,
             java.lang.String width)
Add an image to the page.

Parameters:
name - the name attribute of this image.
imageSource - the source URL of the image. Eg. "images/picture.jpg"
height - the height of the image in pixels or a percent.
width - the width of the image in pixels or a percent.

Image

public Image(java.lang.String name,
             java.lang.String imageSource,
             java.lang.String height,
             java.lang.String width,
             int borderWidth)
Add an image to the page.

Parameters:
name - the name attribute of this image.
imageSource - the source URL of the image. Eg. "images/picture.jpg"
height - the height of the image in pixels or a percent.
width - the width of the image in pixels or a percent.
borderWidth - the width of the border around the image.

Image

public Image(java.lang.String name,
             java.lang.String imageSource,
             java.lang.String height,
             java.lang.String width,
             int borderWidth,
             java.lang.String alternateText)
Add an image to the page.

Parameters:
name - the name attribute of this image.
imageSource - the source URL of the image. Eg. "images/picture.jpg"
height - the height of the image in pixels or a percent.
width - the width of the image in pixels or a percent.
borderWidth - the width of the border around the image.
alternateText - the text displayed before the image is loaded.

Image

public Image(java.lang.String name,
             java.lang.String imageSource,
             java.lang.String height,
             java.lang.String width,
             java.lang.String alternateText)
Add an image to the page.

Parameters:
name - the name attribute of this image.
imageSource - the source URL of the image. Eg. "images/picture.jpg"
height - the height of the image in pixels or a percent.
width - the width of the image in pixels or a percent.
alternateText - the text displayed before the image is loaded.
Method Detail

addContent

public void addContent(java.lang.String content)
Adds additional alternate text.

Specified by:
addContent in interface HTML
Overrides:
addContent in class Tag
Parameters:
content - is the additional alternate text.
See Also:
setAlternateText(java.lang.String), setContent(java.lang.String)

getAlignment

public java.lang.String getAlignment()
Gets the alignment of the image with respect to other text and images.

Returns:
the alignment of the image.

getAlternateText

public java.lang.String getAlternateText()
Gets the alternate text to be displayed before the image is loaded. In some browsers, this text will also appear as a "tool tip" when the mouse cursor passes over the image.

Returns:
the text displayed before the image is loaded.

getBorderWidth

public java.lang.Integer getBorderWidth()
Gets the width of the border around the image.

Returns:
the width of the border around the image, or null if it has not been defined.

getHeight

public java.lang.String getHeight()
Gets the height of the image.

Returns:
the height of the image in pixels or a percent.

getHorizontalSpace

public java.lang.Integer getHorizontalSpace()
Gets the number of pixels of extra space to leave between the image and the text on the left and right sides of the image.

Returns:
the modified Image object.

getImageMapToUse

public java.lang.String getImageMapToUse()
Returns the client-side image map that will define the coordinates and related hyperlinks.

Returns:
the image map that defines the coordinates and related hyperlinks.

getImageSource

public java.lang.String getImageSource()
Gets the source attribute of this image.

Returns:
the source URL of the image. Eg. "images/picture.jpg"

getLowResolutionImageSource

public java.lang.String getLowResolutionImageSource()
Gets the alternate low resolution image.

Returns:
the source URL of the image. Eg. "images/picture.jpg"

getName

public java.lang.String getName()
Gets the name attribute of this image.

Returns:
the name attribute value.

getVerticalSpace

public java.lang.Integer getVerticalSpace()
Gets the number of pixels of extra space to leave between the image and the text on the top and bottom of the image.

Returns:
the number of pixels of extra space to leave between the image and the text on the top and bottom of the image, or null if this has not been defined.

isImageMap

public boolean isImageMap()
Indicates whether this image is an image map.

Returns:
true if this image is an image map.

setAlignment

public Image setAlignment(java.lang.String alignment)
Sets the alignment of the image with respect to other text and images.

Parameters:
alignment - the alignment of the image.
Returns:
the modified Image object.

setAlternateText

public Image setAlternateText(java.lang.String alternateText)
Sets the alternate text to be displayed before the image is loaded. In some browsers, this text will also appear as a "tool tip" when the mouse cursor passes over the image.

Parameters:
alternateText - the text displayed before the image is loaded.
Returns:
the modified Image object.

setBorderWidth

public Image setBorderWidth(int borderWidth)
Sets the width of the border around the image.

Parameters:
borderWidth - the width of the border around the image.
Returns:
the modified Image object.

setContent

public void setContent(java.lang.String text)
Sets the alternate text.

Specified by:
setContent in interface HTML
Overrides:
setContent in class Tag
Parameters:
text - the alternate text.
See Also:
setAlternateText(java.lang.String)

setHeight

public Image setHeight(java.lang.String height)
Sets the height of the image.

Parameters:
height - the height of the image in pixels or a percent.
Returns:
the modified Image object.

setHorizontalSpace

public Image setHorizontalSpace(int pixels)
Sets the number of pixels of extra space to leave between the image and the text on the left and right sides of the image.

Parameters:
pixels - the number of pixels of extra space to leave between the image and the text on the left and right sides of the image.
Returns:
the modified Image object.

setImageMap

public Image setImageMap(boolean isMap)
Indicates whether this image is an image map.

Parameters:
isMap - if true, this image is an image map.
Returns:
the modified Image object.

setImageMapToUse

public Image setImageMapToUse(java.lang.String map)
Specifies the client-side image map that will define the coordinates and related hyperlinks. Specifying an image map automatically calls setImageMap(true).

Parameters:
map - the image map that defines the coordinates and related hyperlinks.
Returns:
the modified Image object.

setImageSource

public Image setImageSource(java.lang.String imageSource)
Sets the source attribute of this image.

Parameters:
imageSource - the source URL of the image. Eg. "images/picture.jpg"
Returns:
the modified Image object.

setLowResolutionImageSource

public Image setLowResolutionImageSource(java.lang.String imageSource)
Sets the alternate low resolution image.

Parameters:
imageSource - the source URL of the image. Eg. "images/picture.jpg"
Returns:
the modified Image object.

setName

public Image setName(java.lang.String name)
Sets the name attribute of this image.

Parameters:
name - the name attribute value.
Returns:
the modified Image object.

setVerticalSpace

public Image setVerticalSpace(int pixels)
Sets the number of pixels of extra space to leave between the image and the text on the top and bottom of the image.

Parameters:
pixels - the number of pixels of extra space to leave between the image and the text on the top and bottom of the image.
Returns:
the modified Image object.

setWidth

public Image setWidth(java.lang.String width)
Sets the width of the image.

Parameters:
width - the width of the image in pixels or a percent.
Returns:
the modified Image object.

setAttribute

protected void setAttribute(TagAttribute attribute)
Description copied from class: Tag
Adds the specified attribute.

Overrides:
setAttribute in class Tag
Parameters:
attribute - The attribute.
See Also:
Tag.setAttribute(org.pajes.html.TagAttribute)

PAJES 3.0.21

Copyright © 1998-2007 Viridian Pty Limited. All Rights Reserved.