Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IlvImageEventView

IlvObject
   |
   +--IlvEmptyView
      |
      +--IlvImageView
         |
         +--IlvImageEventView

Category:
Common component
JavaScript File:
IlvImageView.js
Description:
An IlvImageEventView is an extension of IlvImageView designed to display an image and forward all input events to an event handler.

Constructor Summary
Constructor Attributes Constructor Name and Description
 
IlvImageEventView(left, top, width, height, image)
Method Summary
Method Attributes Method Name and Description
 
childrenToHTML(parentNode)
Creates the HTML for this component's child views.
 
Returns the event handler that is receiving keyboard and mouse events from this view.
 
Returns the origin along the x-axis that is used to compute the relative e.mouseX coordinate when mouse events are forwarded to the event handler.
 
Returns the origin along the y-axis that is used to compute the relative e.mouseY coordinate when mouse events are forwarded to the event handler.
 
Returns whether the view is enabled.
 
removeHTML()
 
setChildrenBounds(left, top, width, height)
Changes the size of the view's child views.
 
setCursor(cursor)
Sets the cursor of the view.
 
setEnabled(enabled)
Enables or disables the view.
 
setEventHandler(eventHandler)
Sets the event handler that will receive keyboard and mouse events from this view.
 
setToolTipText(string)
Sets the tooltip text of the image.
 
setVisible(visible)
Sets the visibility of this view.
Methods inherited from class IlvImageView
addErrorListener, addImageLoadingListener, addImageLoadListener, addImagePreloadListener, addScrollListener, addTimeoutErrorListener, dispose, getBlendTransform, getCursor, getHTMLContent, getImage, getImageSize, getScrollPosition, getTimeoutInterval, getToolTipText, isImageLoaded, isVisible, onTimeout, removeErrorListener, removeImageLoadListener, removeImagePreloadListener, removeTimeoutErrorListener, setBackgroundColor, setBlendTransform, setImage, setImageSize, setScrollPosition, setTimeoutInterval, startErrorTimer, stopErrorTimer
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, setClassName, superConstructor, superInvoke, toString, updateVisibility
Constructor Detail
IlvImageEventView
IlvImageEventView(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
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

getEventHandler
getEventHandler()
Returns the event handler that is receiving keyboard and mouse events from this view.

getEventOriginLeft
getEventOriginLeft()
Returns the origin along the x-axis that is used to compute the relative e.mouseX coordinate when mouse events are forwarded to the event handler. This implementation returns the left coordinate of this image view. Override this function to forward mouse events that are relative to a different origin.

getEventOriginTop
getEventOriginTop()
Returns the origin along the y-axis that is used to compute the relative e.mouseY coordinate when mouse events are forwarded to the event handler. This implementation returns the top coordinate of this image view. Override this function to forward mouse events that are relative to a different origin.

isEnabled
isEnabled()
Returns whether the view is enabled.

removeHTML
removeHTML()

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 IlvImageEventView'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.

setEnabled
setEnabled(enabled)
Enables or disables the view.
Parameters:
enabled

setEventHandler
setEventHandler(eventHandler)
Sets the event handler that will receive keyboard and mouse events from this view. The event handler should define 1 or more of the following functions:
  • mouseMove(e) handles Mouse move events.
    Parameter: e - The mouse event.
  • mouseDown(e) handles Mouse down events.
    Parameter: e - The mouse event.
  • mouseDrag(e) handles Mouse drag events.
    Parameter: e - The mouse event.
  • mouseUp(e) handles Mouse up events.
    Parameter: e - The mouse event.
  • mouseOver(e) handles Mouse over events.
    Parameter: e - The mouse event.
  • mouseOut(e) handles Mouse out events.
    Parameter: e - The mouse event.
  • Mouse events have the following read-only properties:

    Parameters:
    eventHandler - The handler that will receive events from this image view.

    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

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