Class Index | File Index

Classes


Class adf.DrawRectShapeAction


Extends adf.Action.

Defined in: Action.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Extends adf.Action and takes user interaction with the mouse in order to draw a rectangle based shape onto a adf.graphics.Element.
Field Summary
Field Attributes Field Name and Description
 
Fields borrowed from class adf.Action:
cursor, graphicsZIndex, symbol
Method Summary
Method Attributes Method Name and Description
 
activate(element, callBack, continuousCallBack, graphicsElement)
This method activates the action and registers the required event listeners to draw a rectangular shape onto the adf.graphics.Element.
 
Deactivates the event listeners set by this action
 
Rectivates the event listeners set by this action
Class Detail
adf.DrawRectShapeAction(shapeType)
Extends adf.Action and takes user interaction with the mouse in order to draw a rectangle based shape onto a adf.graphics.Element.
Parameters:
{String} shapeType
Possible values include "Rectangle" or "Oval". Default value is "Rectangle".
Field Detail
name
Default Value:
"adf.DrawRectShapeAction"
Method Detail
activate(element, callBack, continuousCallBack, graphicsElement)
This method activates the action and registers the required event listeners to draw a rectangular shape onto the adf.graphics.Element. The callBack() and continuousCallBack() functions will both receive one single adf.Rectangle as a paramter. The adf.Rectangle will represent the current rectangular shape drawn with a start point where the onmousedown event was fired, and the the opposite corner point where either the last onmousemove event was fired, or where onmouseup was fired.
Parameters:
{HTMLElement} element
The HTML element that is the action's container on which the events are attached
{Function} callBack
Callback function to be called after action is completed
{Function} continuousCallBack
Continuous callback function is called as the rectangle shape is being drawn
{adf.graphics.Element} graphicsElement
Parameter to set graphics container for the action.

deactivate()
Deactivates the event listeners set by this action

reactivate()
Rectivates the event listeners set by this action

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