Packageorg.aswing.event
Classpublic class DragAndDropEvent
InheritanceDragAndDropEvent Inheritance AWEvent Inheritance flash.events.Event



Public Methods
 MethodDefined by
  
DragAndDropEvent(type:String, dragInitiator:Component, sourceData:SourceData, mousePos:IntPoint, targetComponent:Component = null, relatedTargetComponent:Component = null)
Create a drag and drop event.
DragAndDropEvent
  
clone():Event
DragAndDropEvent
  
Returns the drag initiator component.
DragAndDropEvent
  
Returns a IntPoint indicating the cursor location in global space.
DragAndDropEvent
  
Returns the related mouse entered component.
DragAndDropEvent
  
Returns the data source.
DragAndDropEvent
  
Returns the mouse entered component.
DragAndDropEvent
Public Constants
 ConstantDefined by
 InheritedACT : String = "act"
[static] The AWEvent.ACT constant defines the value of the type property of the event object for a act event.
AWEvent
  DRAG_DROP : String = "dragDrop"
[static] The DragAndDropEvent.DRAG_DROP constant defines the value of the type property of the event object for a dragDrop event.
DragAndDropEvent
  DRAG_ENTER : String = "dragEnter"
[static] The DragAndDropEvent.DRAG_ENTER constant defines the value of the type property of the event object for a dragEnter event.
DragAndDropEvent
  DRAG_EXIT : String = "dragExit"
[static] The DragAndDropEvent.DRAG_EXIT constant defines the value of the type property of the event object for a dragExit event.
DragAndDropEvent
  DRAG_OVERRING : String = "dragOverring"
[static] The DragAndDropEvent.DRAG_OVERRING constant defines the value of the type property of the event object for a dragOverring event.
DragAndDropEvent
  DRAG_RECOGNIZED : String = "dragRecongnized"
[static] The DragAndDropEvent.DRAG_RECOGNIZED constant defines the value of the type property of the event object for a dragRecongnized event.
DragAndDropEvent
  DRAG_START : String = "dragStart"
[static] The DragAndDropEvent.DRAG_START constant defines the value of the type property of the event object for a dragStart event.
DragAndDropEvent
 InheritedFOCUS_GAINED : String = "focusGained"
[static] The AWEvent.FOCUS_GAINED constant defines the value of the type property of the event object for a focusGained event.
AWEvent
 InheritedFOCUS_LOST : String = "focusLost"
[static] The AWEvent.FOCUS_LOST constant defines the value of the type property of the event object for a focusLost event.
AWEvent
 InheritedHIDDEN : String = "hidden"
[static] The AWEvent.HIDDEN constant defines the value of the type property of the event object for a hidden event.
AWEvent
 InheritedPAINT : String = "paint"
[static] The AWEvent.PAINT constant defines the value of the type property of the event object for a paint event.
AWEvent
 InheritedSHOWN : String = "shown"
[static] The AWEvent.SHOWN constant defines the value of the type property of the event object for a shown event.
AWEvent
Constructor detail
DragAndDropEvent()constructor
public function DragAndDropEvent(type:String, dragInitiator:Component, sourceData:SourceData, mousePos:IntPoint, targetComponent:Component = null, relatedTargetComponent:Component = null)

Create a drag and drop event.

Parameters
type:String — the type.
 
dragInitiator:Component — the drag initiator component.
 
sourceData:SourceData — the data source.
 
mousePos:IntPoint — a IntPoint indicating the cursor location in global space.
 
targetComponent:Component (default = null) — the mouse entered component.
 
relatedTargetComponent:Component (default = null) — the related target component.
Method detail
clone()method
public override function clone():Event

Returns
Event
getDragInitiator()method 
public function getDragInitiator():Component

Returns the drag initiator component.

Returns
Component
getMousePosition()method 
public function getMousePosition():IntPoint

Returns a IntPoint indicating the cursor location in global space.

Returns
IntPoint
getRelatedTargetComponent()method 
public function getRelatedTargetComponent():Component

Returns the related mouse entered component. For DRAG_ENTER event, it is the previous target component, for DRAG_EXIT it is the next being entered target component.

For DRAG_START, DRAG_RECOGNIZED, DRAG_OVERRING, DRAG_DROP events this property is always null.

Returns
Component
getSourceData()method 
public function getSourceData():SourceData

Returns the data source.

For DRAG_RECOGNIZED events this property is null.

Returns
SourceData
getTargetComponent()method 
public function getTargetComponent():Component

Returns the mouse entered component.

For DRAG_START and DRAG_RECOGNIZED events this property is always null.

Returns
Component
Constant detail
DRAG_DROPconstant
public static const DRAG_DROP:String = "dragDrop"

The DragAndDropEvent.DRAG_DROP constant defines the value of the type property of the event object for a dragDrop event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
getDragInitiator()the drag initiator component
getSourceData()the drag source data
getMousePosition()the mouse point in stage scope
getTargetComponent()the mouse entered target component
currentTargetThe Object that defines the event listener that handles the event. For example, if you use comp.addEventListener() to register an event listener, comp is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.
DRAG_ENTERconstant 
public static const DRAG_ENTER:String = "dragEnter"

The DragAndDropEvent.DRAG_ENTER constant defines the value of the type property of the event object for a dragEnter event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
getDragInitiator()the drag initiator component
getSourceData()the drag source data
getMousePosition()the mouse point in stage scope
getTargetComponent()the mouse entered target component
getRelatedTargetComponent()the previouse entered target component
currentTargetThe Object that defines the event listener that handles the event. For example, if you use comp.addEventListener() to register an event listener, comp is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.
DRAG_EXITconstant 
public static const DRAG_EXIT:String = "dragExit"

The DragAndDropEvent.DRAG_EXIT constant defines the value of the type property of the event object for a dragExit event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
getDragInitiator()the drag initiator component
getSourceData()the drag source data
getMousePosition()the mouse point in stage scope
getTargetComponent()the mouse entered target component
getRelatedTargetComponent()the next being entered target component
currentTargetThe Object that defines the event listener that handles the event. For example, if you use comp.addEventListener() to register an event listener, comp is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.
DRAG_OVERRINGconstant 
public static const DRAG_OVERRING:String = "dragOverring"

The DragAndDropEvent.DRAG_OVERRING constant defines the value of the type property of the event object for a dragOverring event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
getDragInitiator()the drag initiator component
getSourceData()the drag source data
getMousePosition()the mouse point in stage scope
getTargetComponent()the mouse entered target component
currentTargetThe Object that defines the event listener that handles the event. For example, if you use comp.addEventListener() to register an event listener, comp is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.
DRAG_RECOGNIZEDconstant 
public static const DRAG_RECOGNIZED:String = "dragRecongnized"

The DragAndDropEvent.DRAG_RECOGNIZED constant defines the value of the type property of the event object for a dragRecongnized event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
getDragInitiator()the drag initiator component
getMousePosition()the mouse point in stage scope
currentTargetThe Object that defines the event listener that handles the event. For example, if you use comp.addEventListener() to register an event listener, comp is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.
DRAG_STARTconstant 
public static const DRAG_START:String = "dragStart"

The DragAndDropEvent.DRAG_START constant defines the value of the type property of the event object for a dragStart event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
getDragInitiator()the drag initiator component
getSourceData()the drag source data
getMousePosition()the mouse point in stage scope
currentTargetThe Object that defines the event listener that handles the event. For example, if you use comp.addEventListener() to register an event listener, comp is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.