Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IlvImageView

IlvObject
   |
   +--IlvEmptyView
      |
      +--IlvImageView

Category:
Common component
JavaScript File:
IlvImageView.js
Description:
An IlvImageView is an extension of IlvEmptyView that is designed to display an image. By default, the image is scaled to fit the view. Use the setImageSize() method to set the image size independent of the view size.

Constructor Summary
Constructor Attributes Constructor Name and Description
 
IlvImageView(left, top, width, height, image)
Method Summary
Method Attributes Method Name and Description
 
addErrorListener(listener)
Adds a listener to be called when an error occurs during the current request for an image from the server.
 
Adds a listener to be called when the view has begun loading a new image.
 
Adds a listener to be called when the view has loaded a new image.
 
Adds a listener to be called when the view has loaded a new image, but before the new image is made visible.
 
addScrollListener(listener)
Adds a listener to be called when the view has been scrolled.
 
Adds a listener to be called when a timeout has occurred during the current request for an image from the server.
 
childrenToHTML(parentNode)
Creates the HTML for this component's child views.
 
Disposes of all resources being used by the view.
 
Returns whether new images will be revealed by fading the previous image.
 
Returns the cursor of the view.
 
Returns the piece of HTML for the view.
 
Returns the image of the view.
 
Returns the size of the view's image.
 
Returns the scroll position of this view.
 
Returns the timeout interval for image requests to the server, in seconds.
 
Returns the tooltip text of the image.
 
Returns whether an image is loaded in the view.
 
Returns the visibility of this view.
 
onTimeout(view)
This method is automatically invoked when a timeout error occurs.
 
Removes a listener installed with addErrorListener.
 
Removes a listener installed with addImageLoadListener.
 
Removes a listener installed with addImagePreloadListener.
 
Removes a listener installed with addTimeoutErrorListener.
 
Sets the background color of the image view.
 
Sets whether new images will be revealed by fading the previous image.
 
setChildrenBounds(left, top, width, height)
Changes the size of the view's child views.
 
setCursor(cursor)
Sets the cursor of the view.
 
setImage(image, width, height)
Sets the image of the view.
 
setImageSize(width, height, skipImageRedisplay, left, top)
Sets the size of the view's image.
 
Sets the scroll position of this view.
 
setTimeoutInterval(interval)
Sets the timeout interval for loading an image from the server.
 
setToolTipText(string)
Sets the tooltip text of the image.
 
setVisible(visible)
Sets the visibility of this view.
 
Starts a timer for errors.
 
Stops the error timer.
Methods inherited from class IlvEmptyView
addSizeListener, getBounds, getHeight, getLeft, getLocation, getSize, getTop, getWidth, isStateInCookie, removeSizeListener, restoreState, saveState, setBounds, setLocation, setSize, setStateInCookie, toHTML
Methods inherited from class IlvObject
getClassName, hashCode, instanceOf, invoke, registerDispose, registerDisposeByClientId, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility
Constructor Detail
IlvImageView
IlvImageView(left, top, width, height, image)
Parameters:
left - The absolute x position of the view on the page.
top - The absolute y position of the view on the page.
width - The width of the view.
height - The height of the view.
image - The URL of an image. If omitted, you can use the setImage() method to set the image URL.
Method Detail
addErrorListener
addErrorListener(listener)
Adds a listener to be called when an error occurs during the current request for an image from the server.
Parameters:
listener - The listener function, which must have the following parameters:

addImageLoadingListener
addImageLoadingListener(listener)
Adds a listener to be called when the view has begun loading a new image.
Parameters:
listener - The listener function, which must have the following parameters:

addImageLoadListener
addImageLoadListener(listener)
Adds a listener to be called when the view has loaded a new image.
Parameters:
listener - The listener function, which must have the following parameters:

addImagePreloadListener
addImagePreloadListener(listener)
Adds a listener to be called when the view has loaded a new image, but before the new image is made visible.
Parameters:
listener - The listener function, which must have the following parameters:

addScrollListener
addScrollListener(listener)
Adds a listener to be called when the view has been scrolled.
Parameters:
listener - The listener function, which must have the following parameters:

addTimeoutErrorListener
addTimeoutErrorListener(listener)
Adds a listener to be called when a timeout has occurred during the current request for an image from the server.
Parameters:
listener - The listener function, which must have the following parameters:

childrenToHTML
childrenToHTML(parentNode)
Creates the HTML for this component's child views. Warning: This method is considered to be part of an IlvImageView's internal implementation and is not a public API.
Parameters:
parentNode

dispose
dispose()
Disposes of all resources being used by the view. Make sure to call the global IlvObject.callDispose() function on the onunload event of the page:
 <body onunload="IlvObject.callDispose()">

getBlendTransform
getBlendTransform()
Returns whether new images will be revealed by fading the previous image. The default value is true.

getCursor
getCursor()
Returns the cursor of the view. The default value is "auto".

getHTMLContent
getHTMLContent()
Returns the piece of HTML for the view.

getImage
getImage()
Returns the image of the view.

getImageSize
getImageSize()
Returns the size of the view's image.
Returns:
An object with two properties: width and height.

getScrollPosition
getScrollPosition()
Returns the scroll position of this view.
Returns:
An object with two properties: x and y.

getTimeoutInterval
getTimeoutInterval()
Returns the timeout interval for image requests to the server, in seconds. The default value is 600 or 10 minutes.

getToolTipText
getToolTipText()
Returns the tooltip text of the image.

isImageLoaded
isImageLoaded()
Returns whether an image is loaded in the view.

isVisible
isVisible()
Returns the visibility of this view.

onTimeout
onTimeout(view)
This method is automatically invoked when a timeout error occurs.
Parameters:
view - The IlvImageView.

removeErrorListener
removeErrorListener(listener)
Removes a listener installed with addErrorListener.
Parameters:
listener - The listener to remove.

removeImageLoadListener
removeImageLoadListener(listener)
Removes a listener installed with addImageLoadListener.
Parameters:
listener - The listener to remove.

removeImagePreloadListener
removeImagePreloadListener(listener)
Removes a listener installed with addImagePreloadListener.
Parameters:
listener - The listener to remove.

removeTimeoutErrorListener
removeTimeoutErrorListener(listener)
Removes a listener installed with addTimeoutErrorListener.
Parameters:
listener - The listener to remove.

setBackgroundColor
setBackgroundColor(color)
Sets the background color of the image view. By default, an image view has no background color and is therefore transparent.
Parameters:
color - A string describing the color. For example, "#FFFFFF" corresponds to white.

setBlendTransform
setBlendTransform(set)
Sets whether new images will be revealed by fading the previous image. The default value is true. This method is available only on Internet Explorer and will be ignored on Netscape Communicator.
Parameters:
set

setChildrenBounds
setChildrenBounds(left, top, width, height)
Changes the size of the view's child views. Warning: This method is considered to be part of an IlvImageView's internal implementation and is not a public API.
Parameters:
left - The absolute x position of the view on the page.
top - The absolute y position of the view on the page.
width - The width of the view.
height - The height of the view.

setCursor
setCursor(cursor)
Sets the cursor of the view.
Parameters:
cursor - The cursor name.

setImage
setImage(image, width, height)
Sets the image of the view.
Parameters:
image - The URL of the image.
width - The optional width of the image. Both the width and height must be specified in order to set the size of the new image. If either the width or height parameters are omitted, the view's image size will not be changed. If width < 0, the image width will be scaled to fit the width of the view.
height - The optional height of the image. Both the width and height must be specified in order to set the size of the new image. If either the width or height parameters are omitted, the view's image size will not be changed. If height < 0, the image height will be scaled to fit the height of the view.

setImageSize
setImageSize(width, height, skipImageRedisplay, left, top)
Sets the size of the view's image. The default is to scale the image to the size of the view.
Parameters:
width - The width of the image. If width < 0, the image width will be scaled to fit the width of the view.
height - The height of the image. If height < 0, the image height will be scaled to fit the height of the view.
skipImageRedisplay - A Boolean flag that indicates that the view's current image should not be scaled and redisplayed at the new size. This is useful if this call to setImageSize() will be immediately followed by a call to setImage. If skipImageRedisplay is omitted or is false, then the view's current image will be scaled and displayed at the new size.
left
top

setScrollPosition
setScrollPosition(x, y)
Sets the scroll position of this view.
Parameters:
x - The scroll position along the x-axis, relative to the top of the panel.
y - The scroll position along the y-axis, relative to the left side of the panel.

setTimeoutInterval
setTimeoutInterval(interval)
Sets the timeout interval for loading an image from the server.
Parameters:
interval - The timeout, specified in seconds. The default value is 600 or 10 minutes.

setToolTipText
setToolTipText(string)
Sets the tooltip text of the image.
Parameters:
string - A string.

setVisible
setVisible(visible)
Sets the visibility of this view.
Parameters:
visible

startErrorTimer
startErrorTimer()
Starts a timer for errors.

stopErrorTimer
stopErrorTimer()
Stops the error timer.

©Copyright Rogue Wave Software Inc. 1997, 2018. All Rights Reserved.