Package library :: Package pyjamas :: Package ui :: Module DragHandler :: Class DragHandler
[hide private]
[frames] | no frames]

Class DragHandler

source code

object --+
         |
        DragHandler

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
onBrowserEvent(self, event) source code
 
addDragListener(self, listener) source code
 
removeDragListener(self, listener) source code
 
onDragStart(self, event)
Store data into the DataTransfer object and set the allowed effects.
source code
 
onDrag(self, event)
this happens periodically while the drag is in progress.
source code
 
onDragEnd(self, event)
This happens on the initiating widget after the dragging mouse is released.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

onDragStart(self, event)

source code 

Store data into the DataTransfer object and set the allowed effects.

Set data into the event's dataTransfer with a content-type and some string data.

Some native dataTransfer objects will only set content-type of "Text" and/or "URL".

allowedEffects is one of: 'none', 'copy', 'copyLink', 'copyMove', 'link', 'linkMove', 'move', or 'all'

an example:

dt = event.dataTransfer
dt.setData('text/plain','Hello, World!')
dt.allowedEffects = 'copyMove'

onDrag(self, event)

source code 

this happens periodically while the drag is in progress. use DOM.eventPreventDefault(event) to cancel drag operation