IlvRectangle

IlvObject
  |
  +--IlvRectangle
Category:
Common component
JavaScript File:
IlvUtil.js
Description:
This class can be instantiated to draw a rectangle anywhere on a web page. Each IlvView contains a unique instance of IlvRectangle, to provide its interactors with a means of drawing rectangles. Note: This class can only be instantiated in the BODY part of an HTML document. However, once instantiated, no method should be invoked inside the BODY part of the HTML document. Any methods can be invoked in the onload callback of the BODY.

Constructor Summary
IlvRectangle(init, fillOn)

Method Summary
getBounds()
Returns the bounds of the rectangle.
getScrollPosition()
Returns the scroll position of this IlvRectangle.
getThickness(thickness)
Returns the border thickness of this IlvRectangle.
isVisible()
Returns the visibility of this IlvRectangle.
setBounds(left, top, width, height)
Reshapes this IlvRectangle.
setClip(left, top, width, height)
Sets the clip for this rectangle.
setColor(color)
Sets the color of this IlvRectangle.
setScrollPosition(x, y)
Sets the scroll position of this IlvRectangle.
setThickness(thickness)
Sets the border thickness of this IlvRectangle.
setVisible(visible)
Sets the visibility of this IlvRectangle.

Constructor Detail

IlvRectangle

IlvRectangle(init, fillOn)
Creates an instance of IlvRectangle.

Method Detail

getBounds

getBounds()
Returns the bounds of the rectangle.

getScrollPosition

getScrollPosition()
Returns the scroll position of this IlvRectangle. Note: Modifying the returned object has no impact on the scroll position of the rectangle. To modify the scroll position, use setScrollPosition.
Returns:
An object with two properties: x and y.

Since:
JViews 7.5


getThickness

getThickness(thickness)
Returns the border thickness of this IlvRectangle.

isVisible

isVisible()
Returns the visibility of this IlvRectangle.

setBounds

setBounds(left, top, width, height)
Reshapes this IlvRectangle.
Parameters:
left - Position of the left side, relative to the upper-left corner of the window.
top - Position of the top side, relative to the upper-left corner of the window.
width - The width in pixels.
height - The height in pixels.

setClip

setClip(left, top, width, height)
Sets the clip for this rectangle.
Parameters:
left - Position of the left side, relative to the upper-left corner of the window.
top - Position of the top side, relative to the upper-left corner of the window.
width - The width in pixels.
height - The height in pixels.

setColor

setColor(color)
Sets the color of this IlvRectangle. Note: The default color is black.
Parameters:
color - A string describing the color. For example, "#FFFFFF" corresponds to white.

setScrollPosition

setScrollPosition(x, y)
Sets the scroll position of this IlvRectangle.
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.

Since:
JViews 7.5


setThickness

setThickness(thickness)
Sets the border thickness of this IlvRectangle. The default thickness is 1. Note: The rectangle is always drawn inside its bounds.

setVisible

setVisible(visible)
Sets the visibility of this IlvRectangle.

Inherited Methods from IlvObject
callDispose, dispose, getClassName, hashCode, inherits, instanceOf, invoke, registerDispose, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility