Class Index | File Index

Classes


Class adf.Rectangle


Defined in: core.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
adf.Rectangle(left, top, width, height)
A simple object used to represent a rectangle shape in a 2-dimentional coordinate system.
Field Summary
Field Attributes Field Name and Description
 
Represents the center point of this rectangle.
 
height of adf.Rectangle
 
left coordiante of adf.Rectangle
 
top
top coordiante of adf.Rectangle
 
width of adf.Rectangle
Method Summary
Method Attributes Method Name and Description
 
equals(rect)
Checks to see if two rectangles are equal by comparing values for left, top, width and height.
 
offset(oX, oY)
Offsets this rectangle by adding oX to and oY parameters
 
parseStyle(style)
Parses a CSS string that may contain values for any of the following properties
  • left
  • top
  • width
  • height
If any of these values are present, adf.Rectangle#reshape will be called with those parameters;
 
reshape(left, top, width, height)
A convenience function that sets left, top, width and height at the same time.
 
scale(factor, scaleCenter)
Scales an adf.Rectangle by a numeric factor around a given center point
 
Returns an String representation of this rectangle in the format of adf.Rectangle [left = "#", top = "#", width = "#", height = "#"]
 
Generates a CSS string based on the current values for left, top, width and height.
Class Detail
adf.Rectangle(left, top, width, height)
A simple object used to represent a rectangle shape in a 2-dimentional coordinate system.
Parameters:
{Number} left
{Number}
{Number} top
{Number}
{Number} width
{Number}
{Number} height
{Number}
Field Detail
{adf.Point} center
Represents the center point of this rectangle. This value is recalculated when {@adf.Rectangle#reshape} is called.
Default Value:
null

{Number} height
height of adf.Rectangle
Default Value:
0

{Number} left
left coordiante of adf.Rectangle
Default Value:
0

{Number} top
top coordiante of adf.Rectangle
Default Value:
0

{Number} width
width of adf.Rectangle
Default Value:
0
Method Detail
equals(rect)
Checks to see if two rectangles are equal by comparing values for left, top, width and height.
Parameters:
rect
{adf.Rectangle}
Returns:
True if values for left, top, width and height are identify for this rectangle and the rectangle passed as a parameter, otherwise false.

offset(oX, oY)
Offsets this rectangle by adding oX to and oY parameters
Parameters:
oX
{Number}
oY
{Number}
Returns:

parseStyle(style)
Parses a CSS string that may contain values for any of the following properties If any of these values are present, adf.Rectangle#reshape will be called with those parameters;
Parameters:
style
Returns:

reshape(left, top, width, height)
A convenience function that sets left, top, width and height at the same time. No value is returned.
Parameters:
left
{Number}
top
{Number}
width
{Number}
height
{Number}

scale(factor, scaleCenter)
Scales an adf.Rectangle by a numeric factor around a given center point
Parameters:
{Number} factor
{adf.Point} scaleCenter
Returns:
The newly scaled adf.Rectangle

toString()
Returns an String representation of this rectangle in the format of adf.Rectangle [left = "#", top = "#", width = "#", height = "#"]
Returns:

toStyle()
Generates a CSS string based on the current values for left, top, width and height.
Returns:
A CSS formated string

Documentation generated by JsDoc Toolkit 2.1.0 on Mon May 17 2010 13:45:43 GMT-0700 (PDT)