Class IWDraggable

An interface which has to be implemented by all draggable objects.

Author: JAN

Constructor Summary
IWDraggable(container, parent)
            Draggable interface.
 
Method Summary
 void allowDraggingOutsideParent(isDraggingOutsideParentAllowed)
           Enables or disables the dragging mode for elements out of the parent node. The default value is false.
 HTMLDivElement getContainer()
           Returns the draggable object
 int getDragButton()
           Returns the drag button for this element.
 HTMLDivElement getDraggableContainer()
           Returns the draggable container for this element.
 IWSize getDraggingBounds()
           Returns the dragging area.
 DOMElement getOnMouseMoveContainer()
           Returns the container which will be registered for onmousemove events.
 boolean isDraggable()
           Returns true if this element is draggable, otherwise the return value is false.
 boolean isDraggingOutsideParentAllowed()
           Returns true if this element can be dragged out of the parent node.
 void setDragButton(button)
           Sets the drag button for this element. mouse button you must call the setDragButton() method with the parameter IWButton.LEFT + IWButton.RIGHT.
 void setDraggable(isDraggable)
           Sets an flag to indicate whether this element is draggable or not.
 void setDraggableContainer(draggableContainer)
           Sets the draggable container for this element.
 void setDraggingBounds(bounds)
           Sets the dragging area relative to the parent container.
 void setOnMouseMoveContainer(container)
           Sets the container which will be registered for onmousemove events. By default the onmousemove events will be registered on the window.document container.
 
Event Summary
 void triggerOnDrag(event)
           The onDrag event is fired when the object is dragged.

Register an event listener with IWEventManager.addListener(draggableObject, 'ondrag', yourHandlerMethod(event)); to recieve the event.

 void triggerOnDragEnd(event)
           The onDragEnd event is fired after the object is dragged.

Register an event listener with IWEventManager.addListener(draggableObject, 'ondragend', yourHandlerMethod(event)); to recieve the event.

 void triggerOnDragStart(event)
           The onDragStart event is fired before the object is dragged.

Register an event listener with IWEventManager.addListener(draggableObject, 'ondragstart', yourHandlerMethod(event)); to recieve the IWMouseEvent.

 
Constructor Detail

IWDraggable

IWDraggable(container, parent)

Method Detail

allowDraggingOutsideParent

void allowDraggingOutsideParent(isDraggingOutsideParentAllowed)

getContainer

HTMLDivElement getContainer()

getDragButton

int getDragButton()

getDraggableContainer

HTMLDivElement getDraggableContainer()

getDraggingBounds

IWSize getDraggingBounds()

getOnMouseMoveContainer

DOMElement getOnMouseMoveContainer()

isDraggable

boolean isDraggable()

isDraggingOutsideParentAllowed

boolean isDraggingOutsideParentAllowed()

setDragButton

void setDragButton(button)

setDraggable

void setDraggable(isDraggable)

setDraggableContainer

void setDraggableContainer(draggableContainer)

setDraggingBounds

void setDraggingBounds(bounds)

setOnMouseMoveContainer

void setOnMouseMoveContainer(container)

Event Detail

triggerOnDrag

void triggerOnDrag(event)

triggerOnDragEnd

void triggerOnDragEnd(event)

triggerOnDragStart

void triggerOnDragStart(event)

Source-Code Copyright 2007-2009 infoware GmbH - Documentation generated by JsDoc Toolkit 1.4.1 on Tue Nov 28 2017 09:51:51 GMT+0100 (MEZ)