C

DropTarget

Helper class that plays the role of the target during a drag and drop operation that is initiated using startDrag in a DragSource.
Inheritance Hierarchy

Remarks

During the drag operation, the current drop target can be obtained through the QueryContinueDragEventArgs which is fired with the query-continue-drag event, when the drop target changes.

See Also

Developer's Guide

Members

No filters for this type

Constructors

Initializes a new instance of the DropTarget class.
Use the In order to make this instance available to the drag and drop mechanisms, the setDropTarget method should be used.

See Also

API
setDropTarget, getDropTarget

Properties

Gets or sets a value indicating whether dropping to this target is currently allowed.
final

Property Value

true if dropping to this target is currently allowed; otherwise, false.
The element that is registered for this drop target.
If this drop target holds a CanvasComponent, getComponent can be used to retrieve the actual CanvasComponent.
readonlyfinal

Methods

Adds an event handler for a given event type.
final

Parameters

type: string
A string which represents the type of the event to register as listed in events.
listener: function(evt:EventArgs, sender:this): void
The function which will be invoked when the event is raised.
options?: ListenerOptions
Options which specify how the listener will be invoked.
Adds an event handler for a given event type.
final

Parameters

type: string
A string which represents the type of the event to register as listed in events.
listener: function(evt:EventArgs, sender:this): void
The function which will be invoked when the event is raised.
options?: ListenerOptions
Options which specify how the listener will be invoked.

Events

Occurs when a drag enters the drop target.
The handler may adjust the dropEffect and call handled.
dropEffect: DragDropEffects
conversionfinalwritable
Gets or sets the effects that the current handler can realize.
effectAllowed: DragDropEffects
final
Gets the allowed effects for the current drag operation as specified by the DragSource.
handled: boolean
finalwritable
Gets or sets a value indicating whether this DragEventArgs has been handled.
item: DragDropItem
final
Gets the data that is associated with the drag.
keyStates: DragDropKeyStates
final
Gets the key states relevant during the drag and drop operation.
Occurs when a drag leaves the drop target.
The handler may adjust the dropEffect and call handled.
dropEffect: DragDropEffects
conversionfinalwritable
Gets or sets the effects that the current handler can realize.
effectAllowed: DragDropEffects
final
Gets the allowed effects for the current drag operation as specified by the DragSource.
handled: boolean
finalwritable
Gets or sets a value indicating whether this DragEventArgs has been handled.
item: DragDropItem
final
Gets the data that is associated with the drag.
keyStates: DragDropKeyStates
final
Gets the key states relevant during the drag and drop operation.
Occurs when a drag is being performed over the drop target.
The handler may adjust the dropEffect and call handled.
dropEffect: DragDropEffects
conversionfinalwritable
Gets or sets the effects that the current handler can realize.
effectAllowed: DragDropEffects
final
Gets the allowed effects for the current drag operation as specified by the DragSource.
handled: boolean
finalwritable
Gets or sets a value indicating whether this DragEventArgs has been handled.
item: DragDropItem
final
Gets the data that is associated with the drag.
keyStates: DragDropKeyStates
final
Gets the key states relevant during the drag and drop operation.
Occurs when the drop operation is performed on the drop target.
The handler may adjust the dropEffect and call handled.
dropEffect: DragDropEffects
conversionfinalwritable
Gets or sets the effects that the current handler can realize.
effectAllowed: DragDropEffects
final
Gets the allowed effects for the current drag operation as specified by the DragSource.
handled: boolean
finalwritable
Gets or sets a value indicating whether this DragEventArgs has been handled.
item: DragDropItem
final
Gets the data that is associated with the drag.
keyStates: DragDropKeyStates
final
Gets the key states relevant during the drag and drop operation.

Static Methods

Gets the DropTarget instance associated with the given element.
static

Parameters

element: Element
The element to get the drop target instance of.

Return Value

DropTarget
The associated instance or null.

See Also

API
setDropTarget
Sets the drop target for the given element.
static

Parameters

element: Element
The element to register the drop target instance with.
dropTarget: DropTarget
The instance to attach to the element or null to remove the association from the element.

See Also

API
getDropTarget