Class Index | File Index

Classes


Class adf.ResizeElementAction


Extends adf.Action.

Defined in: Action.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
adf.ResizeElementAction(enableDocument, minWidth, minHeight, maxWidth, maxHeight)
Handles user interaction with the mouse in order to resize a givent HTML element.
Field Summary
Field Attributes Field Name and Description
 
Cursor
 
The name of the Action
Fields borrowed from class adf.Action:
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.
 
Deactivates this action by removing all event listeners registered during adf.ResizeElementAction#activate
 
Deactivates, then reactivates this action by calling adf.ResizeElementAction#activate
 
setMaxSize(width, height)
sets the maximum size for the element resized
 
setMinSize(width, height)
Sets the miniumum size for the element resized
Class Detail
adf.ResizeElementAction(enableDocument, minWidth, minHeight, maxWidth, maxHeight)
Handles user interaction with the mouse in order to resize a givent HTML element.
Parameters:
{Boolean} enableDocument
When set to true allows the resize events to be active on the document window.
{Number} minWidth
Minimum Width to which the element can be resized
{Number} minHeight
Minimum Height to which the element can be resized
{Number} maxWidth
Maximum Width to which the element can be resized
{Number} maxHeight
Maximum Height to which the element can be resized
Field Detail
cursor
Cursor
Default Value:
default

name
The name of the Action
Default Value:
"adf.ResizeElementAction"
Method Detail
activate(element, callBack, continuousCallBack, graphicsElement)
This method activates the action and registers the required event listeners. The second parameter callBack() and third paramter continuousCallBack() both receive one parameter, an instance of adf.Rectangle representing the current size and absolute position of the element being resized. The callBack() function will be called when the onmouseup event has been fired by the browser, the continuousCallBack() function will be called each time onmousemove after onmousedown has been fired up until onmouseup has been fired.
function void callback(adf.Rectangle rect)
function void continuousCallBack(adf.Rectangle rect)
Parameters:
{HTMLElement} element
The HTMLElement 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 line is being drawn
{adf.graphics.Element} graphicsElement
Parameter to set Graphics Container for the action. In the callBack, continuousCallBack functions adf.Rectangle is passed back as parameters

deactivate()
Deactivates this action by removing all event listeners registered during adf.ResizeElementAction#activate

reactivate()
Deactivates, then reactivates this action by calling adf.ResizeElementAction#activate

setMaxSize(width, height)
sets the maximum size for the element resized
Parameters:
{Number} width
{Number} height

setMinSize(width, height)
Sets the miniumum size for the element resized
Parameters:
{Number} width
{Number} height

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