JSDNDEvent
Overview
The JSDNDEvent
object is designed for use in drag-and-drop callback functions, offering detailed event information and support for client-server interaction. It integrates deeply with event management in scripting environments. ## Overview
Key Features
Constants for identifying event types (
ONDRAG
,ONDROP
, etc.) and modifiers (MODIFIER_ALT
,MODIFIER_SHIFT
).Properties such as
data
anddataMimeType
to handle event-specific data transfer.Methods for retrieving event details, such as
getDragResult()
,getType()
, and positional data (getX()
,getY()
).
Advanced Usage
The JSDNDEventType
class facilitates JSON conversion for events in browser contexts. It ensures that events with a source are correctly handled, mapping them to client-side representations using a WeakHashMap
for efficient reference management.
Constants Summarized
Constant returned by JSEvent.
Constant returned by JSEvent.
Constant returned by JSEvent.
Constant returned by JSEvent.
Constant returned by JSEvent.
Constant returned by JSEvent.
Constant for the ALT modifier that can be returned by JSDNDEvent.
Constant for the CTRL modifier that can be returned by JSDNDEvent.
Constant for the META modifier that can be returned by JSDNDEvent.
Constant for the SHIFT modifier that can be returned by JSDNDEvent.
Constant returned by JSEvent.
Constant returned by JSDNDEvent.
Constant returned by JSDNDEvent.
Constant returned by JSDNDEvent.
Constant returned by JSDNDEvent.
Constant returned by JSEvent.
Properties Summarized
A data object that specific events can set, a user can set data back to the system for events that supports this.
The event data mime type.
Methods Summarized
Returns the result of the drag action.
returns the name of the element, can be null if the form was the source of the event.
returns the name of the form the element was placed on.
Returns the modifiers of the event, see JSDNDEvent.
Returns the name of the event which was triggered
Returns the record of the event.
returns the source component/element of the event.
Returns the time the event occurred.
returns the dnd event type see the JSDNDEvents constants what it can return.
Returns the x position of the event, relative to the component that fired it, if applicable.
Returns the y position of the event, relative to the component that fired it, if applicable.
Constants Detailed
ACTION
Constant returned by JSEvent.getType() in a method that is attached to an onAction event.
Sample
DATACHANGE
Constant returned by JSEvent.getType() in a method that is attached to an onDataChange event.
Sample
DOUBLECLICK
Constant returned by JSEvent.getType() in a method that is attached to an onDoubleClick event.
Sample
FOCUSGAINED
Constant returned by JSEvent.getType() in a method that is attached to an onFocusGained or the forms onElementFocusGained event.
Sample
FOCUSLOST
Constant returned by JSEvent.getType() in a method that is attached to an onFocusLost or the forms onElementFocusLost event.
Sample
FORM
Constant returned by JSEvent.getType() in a method that is attached to a form event (like onShow) or command (like onDeleteRecord)
Sample
MODIFIER_ALT
Constant for the ALT modifier that can be returned by JSDNDEvent.getModifiers();
Sample
MODIFIER_CTRL
Constant for the CTRL modifier that can be returned by JSDNDEvent.getModifiers();
Sample
MODIFIER_META
Constant for the META modifier that can be returned by JSDNDEvent.getModifiers();
Sample
MODIFIER_SHIFT
Constant for the SHIFT modifier that can be returned by JSDNDEvent.getModifiers();
Sample
NONE
Constant returned by JSEvent.getType() if the event is not used in a known event or command.
Sample
ONDRAG
Constant returned by JSDNDEvent.getType() in a method that is attached to an onDrag event.
Sample
ONDRAGEND
Constant returned by JSDNDEvent.getType() in a method that is attached to an onDragEnd event.
Sample
ONDRAGOVER
Constant returned by JSDNDEvent.getType() in a method that is attached to an onDragOver event.
Sample
ONDROP
Constant returned by JSDNDEvent.getType() in a method that is attached to an onDrop event.
Sample
RIGHTCLICK
Constant returned by JSEvent.getType() in a method that is attached to an onRightClick event.
Sample
Properties Detailed
data
A data object that specific events can set, a user can set data back to the system for events that supports this.
Sample
dataMimeType
The event data mime type.
Sample
Methods Detailed
getDragResult()
Returns the result of the drag action.
Sample
getElementName()
returns the name of the element, can be null if the form was the source of the event.
Sample
getFormName()
returns the name of the form the element was placed on.
Sample
getModifiers()
Returns the modifiers of the event, see JSDNDEvent.MODIFIER_XXXX for the modifiers that can be returned.
Sample
getName()
Returns the name of the event which was triggered
Sample
getRecord()
Returns the record of the event.
Sample
getSource()
returns the source component/element of the event. If it has a name the getElementName() is the name of this component.
Sample
getTimestamp()
Returns the time the event occurred.
Sample
getType()
returns the dnd event type see the JSDNDEvents constants what it can return.
Sample
getX()
Returns the x position of the event, relative to the component that fired it, if applicable. For example drag'n'drop events will set the x,y positions.
Sample
getY()
Returns the y position of the event, relative to the component that fired it, if applicable. For example drag'n'drop events will set the x,y positions.
Sample
Last updated
Was this helpful?