Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IlvRectangle

IlvObject
   |
   +--IlvSelection
      |
      +--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
Constructor Attributes Constructor Name and Description
 
IlvRectangle(init, parentNode, fillOn)
Method Summary
Method Attributes Method Name and Description
 
Returns the bounds of the rectangle.
 
Returns the scroll position of this IlvRectangle.
 
getThickness(thickness)
Returns the border thickness of this IlvRectangle.
 
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.
 
Sets the scroll position of this IlvRectangle.
 
setThickness(thickness)
Sets the border thickness of this IlvRectangle.
 
setVisible(visible)
Sets the visibility of this IlvRectangle.
Methods inherited from class IlvSelection
getObjectID, getObjectProperties, getObjectProperty, getObjectPropertyNames, getObjectTag, getObjectType, getProperties, setObjectProperties, setObjectProperty, setResizable
Methods inherited from class IlvObject
dispose, getClassName, hashCode, instanceOf, invoke, registerDispose, registerDisposeByClientId, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility
Constructor Detail
IlvRectangle
IlvRectangle(init, parentNode, fillOn)
Parameters:
init - a flag to decide whether the property of this class need initialize.
parentNode - The parent node.
fillOn - true to create a filled rectangle.
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.
Since:
JViews 7.5
Returns:
An object with two properties: x and y.

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

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.
Parameters:
thickness

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

©Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.