Class Index | File Index

Classes


Class adf.DrawCircleAction


Extends adf.Action.

Defined in: Action.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Extends adf.Action and handles user interation with the mouse to draw a circle shape onto an instance of adf.graphics.Element.
Fields borrowed from class adf.Action:
cursor, graphicsZIndex, name, 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.
 
Deactivates the action and the event listeners set by this action
 
Reactivates the action and the event listeners set by this action
Class Detail
adf.DrawCircleAction()
Extends adf.Action and handles user interation with the mouse to draw a circle shape onto an instance of adf.graphics.Element.
Method Detail
activate(element, callBack, continuousCallBack, graphicsElement)
This method activates the action and registers the required event listeners. The second parameter callBack() will be called when the onmouseup event is fired by the browser and will receive two parameters, an instance of adf.Point representing the center point (with respect to the coordinates of the element receiving the events), and an integer representing the radius of the circle in pixels. The third parmater continuousCallBack() will be called each time the onmousemove event has been fired by the browser and it will receive the exact same parameters as callBack(), with the only difference being the radius value will be based on the current position of the mouse pointer at the time the onmousemove event was fired.
Parameters:
{HTMLElement} element
The HTMLElement that is the action's container on which the events are attached
{Function} callBack
Sallback function to be called after action is completed
{Function} continuousCallBack
Continuous Callback function is called as the circle is being drawn
{adf.graphics.Element} graphicsElement
Parameter to set graphics container for the action.

deactivate()
Deactivates the action and the event listeners set by this action

reactivate()
Reactivates the action and 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)