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
IlvImageEventView(left, top, width, height, image)

Method Summary
childrenToHTML()
Creates the HTML for this component's child views.
getEventHandler()
Returns the event handler that is receiving keyboard and mouse events from this view.
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.
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.
isEnabled()
Returns whether the view is enabled.
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.

Constructor Detail

IlvImageEventView

IlvImageEventView(left, top, width, height, image)
Creates an instance of IlvImageEventView.

Method Detail

childrenToHTML

childrenToHTML()
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.

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.

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.

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.

    Inherited Methods from IlvImageView
    addErrorListener, addImageLoadListener, addImageLoadingListener, addImagePreloadListener, addScrollListener, addTimeoutErrorListener, childrenToHTML, dispose, getBlendTransform, getCursor, getHTMLContent, getImage, getImageSize, getScrollPosition, getTimeoutInterval, getToolTipText, isImageLoaded, isVisible, onTimeout, removeErrorListener, removeImageLoadListener, removeImagePreloadListener, removeTimeoutErrorListener, setBackgroundColor, setBlendTransform, setChildrenBounds, setCursor, setImage, setImageSize, setScrollPosition, setTimeoutInterval, setToolTipText, setVisible, startErrorTimer, stopErrorTimer
    Inherited Methods from IlvEmptyView
    addSizeListener, childrenToHTML, getBounds, getHeight, getLeft, getLocation, getSize, getTop, getWidth, isStateInCookie, removeSizeListener, restoreState, saveState, setBounds, setChildrenBounds, setLocation, setSize, setStateInCookie, toHTML
    Inherited Methods from IlvObject
    callDispose, dispose, getClassName, hashCode, inherits, instanceOf, invoke, registerDispose, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility