BiDragEvent
This event is used in drag and drop sesssions
This class extends
BiMouseEvent
and therefore all methods and fields available for
BiMouseEvent
are also available for
BiDragEvent
.
Constructor
new
BiDragEvent
(
sType,oMouseEvent
)
Parameters
| Name | Type | Optional | Default | Descripton |
sType |
String |
The type of the event | ||
oMouseEvent |
|
The mouse event object used to initiate this event |
Properties
| Name | Type | get | set | Descripton |
action |
String |
![]() |
Returns the action that the session is currently using | |
dragIcon |
|
![]() |
![]() |
The component to use as the icon next to the pointer |
dropDataTypes |
String[] |
![]() |
Returns the types that the data is avaible for | |
manager |
|
![]() |
This returns the drag and drop manager used in the drag and drop session | |
realTarget |
|
![]() |
This is the component that mouse is currently over. This is useful in case You want to show a drop marker relative to the component below the pointer and that component is not a valid drop target | |
relatedTarget |
|
![]() |
Returns the related component in the drag'n drop session For dragover this returns the component that was left (if a
valid drop target)For dragout this returns the component that was entered (if a
valid drop target)For dragdrop this returns the source of the drag'n dropFor dragend this returns the destination (drop target) |
Methods
| Name | Description |
addAction |
Adds an action supported by the drag and drop session |
addData |
This adds some data to be used in the drag and drop session |
clearActions |
Removes the supported actions for the current drag and drop session |
clearData |
Clears the data associated with the drag and drop session |
getData |
Returns the data for the given type |
removeAction |
Removes an action which is no longer supported by the drag and drop session |
startDrag |
Call this in a dragstart
event to start the actual drag and drop session. |
Events
None.
Static Methods
None.
Static Fields
None.
Remarks
Unlike BiMouseEvent the target (and relatedTarget) is not always the direct component under the mouse pointer but the first valid drop target (or the source of the drag'n drop). Valid drop targets are decided based on the drop data types and the data in the drag'n drop session.
Method Details
addAction
Adds an action supported by the drag and drop session
Syntax
object.addAction
(
sAction
)
Parameters
| Name | Type | Optional | Default | Descripton |
sAction |
String |
The name of the action to add |
Return Type
void
addData
This adds some data to be used in the drag and drop session
Syntax
object.addData ( sType,oData )
Parameters
| Name | Type | Optional | Default | Descripton |
sType |
String |
A string identifying the data | ||
oData |
Object |
The data to be used |
Return Type
void
clearActions
Removes the supported actions for the current drag and drop session
Syntax
object.clearActions ( )
Parameters
No arguments.
Return Type
void
clearData
Clears the data associated with the drag and drop session
Syntax
object.clearData ( )
Parameters
No arguments.
Return Type
void
getData
Returns the data for the given type
Syntax
object.getData
(
sType
)
Parameters
| Name | Type | Optional | Default | Descripton |
sType |
String |
The string identifying the data |
Return Type
Object
removeAction
Removes an action which is no longer supported by the drag and drop session
Syntax
object.removeAction
(
sAction
)
Parameters
| Name | Type | Optional | Default | Descripton |
sAction |
String |
The name of the action to remove |
Return Type
void
startDrag
Call this in a dragstart
event to start the actual drag and drop session.
Syntax
object.startDrag ( )
Parameters
No arguments.
Return Type
void
