Child pages
  • JSDNDEvent

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Constants Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#ACTION]
Constant returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#DATACHANGE]
Constant returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#DOUBLECLICK]
Constant returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#FOCUSGAINED]
Constant returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#FOCUSLOST]
Constant returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#FORM]
Constant returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#MODIFIER_ALT]
Constant for the ALT modifier that can be returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#MODIFIER_CTRL]
Constant for the CTRL modifier that can be returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#MODIFIER_META]
Constant for the META modifier that can be returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#MODIFIER_SHIFT]
Constant for the SHIFT modifier that can be returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#NONE]
Constant returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#ONDRAG]
Constant returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#ONDRAGEND]
Constant returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#ONDRAGOVER]
Constant returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#ONDROP]
Constant returned by JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#RIGHTCLICK]
Constant returned by JSEvent.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[Object]{td}{td}[#data]
A data object that specific events can set, a user can set data back to the system for events that supports this.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#dataMimeType]
The event data mime type.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[Number]{td}{td}[#getDragResult]\()
Returns the result of the drag action.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getElementName]\()
returns the name of the element, can be null if the form was the source of the event.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getFormName]\()
returns the name of the form the element was placed on.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getModifiers]\()
Returns the modifiers of the event, see JSEvent.{td}{tr}{tbody}{tbody}{tr}{td}[JSRecord]{td}{td}[#getRecord]\()
Returns the record of the event.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#getSource]\()
returns the source component/element of the event.{td}{tr}{tbody}{tbody}{tr}{td}[Date]{td}{td}[#getTimestamp]\()
Returns the time the event occurred.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getType]\()
returns the event type see the JSEvents constants what it can return.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getX]\()
Returns the x position of the event, relative to the component that fired it, if applicable.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getY]\()
Returns the y position of the event, relative to the component that fired it, if applicable.{td}{tr}{tbody}{table}\\ 

{table:id=constant|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Constants Details{th}{tr}{tbody:id=ACTION|class=node}{tr:id=name}{td}h6.ACTION{td}{tr}{tr:id=des}{td}Constant returned by JSEvent.getType() in a method that is attached to an onAction event.{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info[String]{td}{tr}{tr:id=prssam}{td}*ParametersSample*\\{tddiv:class=sIndent}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{divcode:language=javascript}
if (event.getType() == JSEvent.ACTION) 
{
   // its an action event.
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=DATACHANGE|class=node}{tr:id=name}{td}h6.DATACHANGE{td}{tr}{tr:id=linkdes}{td}*External links*\\{div:class=sIndent}{div}Constant returned by JSEvent.getType() in a method that is attached to an onDataChange event.{td}{tr}{tr:id=ret}{td}*Returns*\\ [String]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.ACTIONDATACHANGE) 
{
   // its a andata actionchange event.
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=DATACHANGEDOUBLECLICK|class=node}{tr:id=name}{td}h6.DATACHANGEDOUBLECLICK{td}{tr}{tr:id=des}{td}Constant returned by JSEvent.getType() in a method that is attached to an onDataChangeonDoubleClick event.{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info[String]{td}{tr}{tr:id=prssam}{td}*ParametersSample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.DOUBLECLICK) 
{
   // its a double click event.
}
{code}{div}{td}{tr}{tr:idclass=retlastDetailRow}{td}*Returns*\\[String]{td}{tr}{tbody}{trtbody:id=see}{td}*Also see*\\{div:class=sIndent}{div}FOCUSGAINED|class=node}{tr:id=name}{td}h6.FOCUSGAINED{td}{tr}{tr:id=des}{td}Constant returned by JSEvent.getType() in a method that is attached to an onFocusGained or the forms onElementFocusGained event.{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}{ [String]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.DATACHANGEFOCUSGAINED) 
{
   // its a datafocus changegained event.
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=DOUBLECLICKFOCUSLOST|class=node}{tr:id=name}{td}h6.DOUBLECLICKFOCUSLOST{td}{tr}{tr:id=des}{td}Constant returned by JSEvent.getType() in a method that is attached to an onDoubleClick event.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version infoonFocusLost or the forms onElementFocusLost event.{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\ [String]{td}{tr}{tr:id=seesam}{td}*Also seeSample*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.DOUBLECLICKcode:language=javascript}
if (event.getType() == JSEvent.FOCUSLOST) 
{
   // its a doublefocus clicklost event.
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=FOCUSGAINEDFORM|class=node}{tr:id=name}{td}h6.FOCUSGAINEDFORM{td}{tr}{tr:id=des}{td}Constant returned by JSEvent.getType() in a method that is attached to an onFocusGained a form event (like onShow) or thecommand forms onElementFocusGained event.(like onDeleteRecord){td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info[String]{td}{tr}{tr:id=prssam}{td}*ParametersSample*\\{tddiv:class=sIndent}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{divcode:language=javascript}
if (event.getType() == JSEvent.FORM) 
{
   // its a form event or command
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{trtbody:id=link}{td}*External links*\\{div:class=sIndent}{div}MODIFIER_ALT|class=node}{tr:id=name}{td}h6.MODIFIER_ALT{td}{tr}{tr:id=samdes}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.FOCUSGAINED) 
{
   // its a focus gained event.
}
{code}{div}{Constant for the ALT modifier that can be returned by JSEvent.getModifiers();{td}{tr}{tr:classid=lastDetailRowret}{td}{*Returns*\\ [Number]{td}{tr}{tbody}{tbodytr:id=FOCUSLOST|class=node}{tr:id=name}{td}h6.FOCUSLOSTsee}{td}*Also see*\\{div:class=sIndent}[.getModifiers|JSEvent#getModifiers]\\ {div}{td}{tr}{tr:id=dessam}{td}Constant returned by JSEvent.getType() in a method that is attached to an onFocusLost or the forms onElementFocusLost event.*Sample*\\{div:class=sIndent}{code:language=javascript}
//test if the SHIFT modifier is used.
if (event.getModifiers() & JSEvent.MODIFIER_SHIFT)
{
	//do shift action
}
{code}{div}{td}{tr}{tr:idclass=snclastDetailRow}{td}*Since*\\ Replace with version info{td}{tr}{trtbody}{tbody:id=prs}{td}*Parameters*\\{tdMODIFIER_CTRL|class=node}{tr}{tr:id=retname}{td}*Returns*\\[String]h6.MODIFIER_CTRL{td}{tr}{tr:id=seedes}{td}*Also see*\\{div:class=sIndent}{div}Constant for the CTRL modifier that can be returned by JSEvent.getModifiers();{td}{tr}{tr:id=ret}{td}*Returns*\\ [Number]{td}{tr}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{div:class=sIndent}[.getModifiers|JSEvent#getModifiers]\\ {div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
//test if the SHIFT modifier is used.
if (event.getTypegetModifiers() ==& JSEvent.FOCUSLOSTMODIFIER_SHIFT)

{
   	//do its a focus lost event.shift action
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=FORMMODIFIER_META|class=node}{tr:id=name}{td}h6.FORMMODIFIER_META{td}{tr}{tr:id=des}{td}Constant returnedfor by JSEvent.getType() in a method that is attached to a form event (like onShow) or command (like onDeleteRecord)the META modifier that can be returned by JSEvent.getModifiers();{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info[Number]{td}{tr}{tr:id=prssee}{td}*ParametersAlso see*\\{div:class=sIndent}[.getModifiers|JSEvent#getModifiers]\\ {div}{td}{tr}{tr:id=retsam}{td}*ReturnsSample*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent{div:class=sIndent}{code:language=javascript}
//test if the SHIFT modifier is used.
if (event.getModifiers() & JSEvent.MODIFIER_SHIFT)
{
	//do shift action
}
{code}{div}{td}{tr}{tr:idclass=linklastDetailRow}{td}*External links*\\{div:class=sIndent{td}{divtr}{tdtbody}{trtbody:id=MODIFIER_SHIFT|class=node}{tr:id=samname}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.FORM) 
{
   // its a form event or command
}
{code}{div}{h6.MODIFIER_SHIFT{td}{tr}{tr:id=des}{td}Constant for the SHIFT modifier that can be returned by JSEvent.getModifiers();{td}{tr}{tr:classid=lastDetailRowret}{td}*Returns*\\ [Number]{td}{tr}{tbody}{tbodytr:id=MODIFIER_ALT|class=node}{tr:id=name}{td}h6.MODIFIER_ALTsee}{td}*Also see*\\{div:class=sIndent}[.getModifiers|JSEvent#getModifiers]\\ {div}{td}{tr}{tr:id=dessam}{td}Constant for}*Sample*\\{div:class=sIndent}{code:language=javascript}
//test if the ALTSHIFT modifier thatis canused.
be returned byif (event.getModifiers() & JSEvent.getModifiers();{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version infoMODIFIER_SHIFT)
{
	//do shift action
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=NONE|class=node}{tr:id=name}{td}h6.NONE{td}{tr}{tr:id=prsdes}{td}*Parameters*\\Constant returned by JSEvent.getType() if the event is not used in a known event or command.{td}{tr}{tr:id=ret}{td}*Returns*\\ [NumberString]{td}{tr}{tr:id=seesam}{td}*Also seeSample*\\{div:class=sIndent}[.getModifiers|JSEvent#getModifiers]\\ {{code:language=javascript}
if (event.getType() == JSEvent.NONE) 
{
   // type is not set.
}
{code}{div}{td}{tr}{tr:id=linkclass=lastDetailRow}{td}{td}*External links*\\{div:class=sIndent}{div}}{tr}{tbody}{tbody:id=ONDRAG|class=node}{tr:id=name}{td}h6.ONDRAG{td}{tr}{tr:id=samdes}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
//test if the SHIFT modifier is used.
if (event.getModifiers() & JSEvent.MODIFIER_SHIFT)
{
	//do shift action
}
{code}{div}{Constant returned by JSEvent.getType() in a method that is attached to an onDrag event.{td}{tr}{tr:classid=lastDetailRowret}{td}*Returns*\\ [String]{td}{tr}{tbody}{tbodytr:id=MODIFIER_CTRL|class=nodesam}{tr:id=name}{td}h6.MODIFIER_CTRL{td}{tr}{tr:id=des}{td}Constant for the CTRL modifier that can be returned by JSEvent.getModifiers();{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[Number]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}[.getModifiers|JSEvent#getModifiers]\\ {div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
//test if the SHIFT modifier is used.
if (event.getModifiers() & JSEvent.MODIFIER_SHIFT)
{
	//do shift action
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=MODIFIER_META|class=node}{tr:id=name}{td}h6.MODIFIER_META{td}{tr}{tr:id=des}{td}Constant for the META modifier that can be returned by JSEvent.getModifiers();{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[Number]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}[.getModifiers|JSEvent#getModifiers]\\ {div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
//test if the SHIFT modifier is used.
if (event.getModifiers() & JSEvent.MODIFIER_SHIFT)
{
	//do shift action
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=MODIFIER_SHIFT|class=node}{tr:id=name}{td}h6.MODIFIER_SHIFT{td}{tr}{tr:id=des}{td}Constant for the SHIFT modifier that can be returned by JSEvent.getModifiers();{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[Number]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}[.getModifiers|JSEvent#getModifiers]\\ {div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
//test if the SHIFT modifier is used.
if (event.getModifiers() & JSEvent.MODIFIER_SHIFT)
{
	//do shift action
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=NONE|class=node}{tr:id=name}{td}h6.NONE{td}{tr}{tr:id=des}{td}Constant returned by JSEvent.getType() if the event is not used in a known event or command.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.NONE) 
{
   // type is not set.
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ONDRAG|class=node}{tr:id=name}{td}h6.ONDRAG{td}{tr}{tr:id=des}{td}Constant returned by JSEvent.getType() in a method that is attached to an onDrag event.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.ONDRAG) 
{
   // its an ondrag event
   if (event.getElementName() == 'todragelement')
   	return DRAGNDROP.COPY
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ONDRAGEND|class=node}{tr:id=name}{td}h6.ONDRAGEND{td}{tr}{tr:id=des}{td}Constant returned by JSEvent.getType() in a method that is attached to an onDragEnd event.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.ONDRAGEND) 
{
   // its an on drag end event.
   // return true if the drop has been completed successfully
   return event.isDropSuccess(); 
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ONDRAGOVER|class=node}{tr:id=name}{td}h6.ONDRAGOVER{td}{tr}{tr:id=des}{td}Constant returned by JSEvent.getType() in a method that is attached to an onDragOver event.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.ONDRAGOVER) 
{
   // its an on drag over event.
   // return true if it over the right element.
   return event.getElementName() == 'candroponelement';
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ONDROP|class=node}{tr:id=name}{td}h6.ONDROP{td}{tr}{tr:id=des}{td}Constant returned by JSEvent.getType() in a method that is attached to an onDrop event.{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.ONDRAG) 
{
   // its an ondrag event
   if (event.getElementName() == 'todragelement')
   	return DRAGNDROP.COPY
}
{code}{div}{td}{tr}{tr:idclass=snclastDetailRow}{td}*Since*\\ Replace with version info{td}{tr}{tbody}{trtbody:id=prs}{td}*Parameters*\\{td}{trONDRAGEND|class=node}{tr:id=retname}{td}*Returns*\\[String]h6.ONDRAGEND{td}{tr}{tr:id=seedes}{td}*Also see*\\{div:class=sIndent}{div}{Constant returned by JSEvent.getType() in a method that is attached to an onDragEnd event.{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}{ [String]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.ONDROPONDRAGEND) 
{
   // its aan on drop event.
   var element = elements[event.getElementName()];drag end event.
   // doreturn true if the drop has been oncompleted elementsuccessfully
   return trueevent.isDropSuccess(); 
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=RIGHTCLICK|class=node}{tbody:id=ONDRAGOVER|class=node}{tr:id=name}{td}h6.ONDRAGOVER{td}{tr}{tr:id=des}{td}Constant returned by JSEvent.getType() in a method that is attached to an onDragOver event.{td}{tr}{tr:id=nameret}{td}h6.RIGHTCLICK*Returns*\\ [String]{td}{tr}{tr:id=dessam}{td}Constant returned by}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.getType() in a method that is attached to an onRightClick event.ONDRAGOVER) 
{
   // its an on drag over event.
   // return true if it over the right element.
   return event.getElementName() == 'candroponelement';
}
{code}{div}{td}{tr}{tr:idclass=snclastDetailRow}{td}*Since*\\ Replace with version info{td}{tr}{trtbody}{tbody:id=prs}{td}*Parameters*\\{tdONDROP|class=node}{tr}{tr:id=retname}{td}*Returns*\\[String]h6.ONDROP{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}:id=des}{td}Constant returned by JSEvent.getType() in a method that is attached to an onDrop event.{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}{ [String]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.RIGHTCLICK) 
{
   // its a right click event. JSEvent.ONDROP) 
{
   // its a on drop event.
   var element = elements[event.getElementName()];
   // do drop on element
   return true;
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{tabletbody:id=propertyRIGHTCLICK|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=data|class=node=node}{tr:id=name}{td}h6.RIGHTCLICK{td}{tr}{tr:id=des}{td}Constant returned by JSEvent.getType() in a method that is attached to an onRightClick event.{td}{tr}{tr:id=ret}{td}*Returns*\\ [String]{td}{tr}{tr:id=namesam}{td}h6.data{td}{tr}{tr:id=des}{td}A data object that specific events can set, a user can set data back to the system for events that supports this.*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.RIGHTCLICK) 
{
   // its a right click event.
}
{code}{div}{td}{tr}{tr:id=sncclass=lastDetailRow}{td}{td}*Since*}{tr}{tbody}{table}\\ Replace
with version info{td}{tr
{table:id=property|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:id=prs}{td}*Parameters*\\{tdstyle=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=data|class=node}{tr:id=retname}{td}*Returns*\\[Object]h6.data{td}{tr}{tr:id=seedes}{td}*Also see*\\{div:class=sIndent}{div}{A data object that specific events can set, a user can set data back to the system for events that supports this.{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div} [Object]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// A client design method that handles ondrag
if (event.getType() == JSEvent.ONDRAG)
{
     // the data is the selected elements array
     var elements = event.data;
     // only start a client design drag when there is 1 element
     if (elements.length == 1)
     {
     	return true;
     }
}

// code for a data drag method
event.data = "drag me!";
return DRAGNDROP.COPY;

// code for a data drop method
var data = event.data;
elemements[event.getElementName()].setText(data);
return true;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=dataMimeType|class=node}{tr:id=name}{td}h6.dataMimeType{td}{tr}{tr:id=des}{td}The event data mime type.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[String]td}h6.dataMimeType{td}{tr}{tr:id=seedes}{td}*Also see*\\{div:class=sIndent}{div}{The event data mime type.{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}{ [String]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// only accept drag if data is a servoy record 
function onDragOver(event)
{
		if(event.dataMimeType.indexOf("application/x-servoy-record-object") == 0) return true;
		else return false;
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getDragResult|class=node}{tr:id=name}{td}h6.getDragResult{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getDragResult{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Returns the result of the drag action.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\ action.{td}{tr}{tr:id=ret}{td}*Returns*\\ [Number] -- a DRAGNDROP constant, representing the result of the drag action{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
function onDragEnd(event)
{
		var dragResult = event.getDragResult();
		if(dragResult == DRAGNDROP.NONE)
		{
			// the drag was canceled
		}
		else if(dragResult == DRAGNDROP.COPY)
		{
			// the drag ended with a copy action
		}
		else if(dragResult == DRAGNDROP.MOVE)
		{
			// the drag ended with a move action
		}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getElementName|class=node}{tr:id=name}{td}h6.getElementName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getElementName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}returns the name of the element, can be null if the form was the source of the event.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{ was the source of the event.{td}{tr}{tr:id=ret}{td}*Returns*\\ [String] -- a String representing the element name.{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{ element name.{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getElementName() == 'myElement')
{
    elements[event.getElementName()].bgcolor = '#ff0000';
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFormName|class=node}{tr:id=name}{td}h6.getFormName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getFormName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}returns the name of the form the element was placed on.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\: bold;}getFormName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\[String] -- a String representing the form namereturns the name of the form the element was placed on.{td}{tr}{tr:id=seeret}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{Returns*\\ [String] -- a String representing the form name.{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
forms[event.getFormName()].myFormMethod();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getModifiers|class=node}{tr:id=name}{td}h6.getModifiers{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getModifiers{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Returns the modifiers of the event, see JSEvent.MODIFIER\_XXXX for the modifiers that can be returned.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\Returns the modifiers of the event, see JSEvent.MODIFIER\_XXXX for the modifiers that can be returned.{td}{tr}{tr:id=ret}{td}*Returns*\\ [Number] -- an int which holds the modifiers as a bitset.{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div} bitset.{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
//test if the SHIFT modifier is used.
if (event.getModifiers() & JSEvent.MODIFIER_SHIFT)
{
	//do shift action
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRecord|class=node}{tr:id=name}{td}h6.getRecord{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRecord]{span}{span:id=iets|style=float: left; font-weight: bold;}getRecord{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Returns the record of the event.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\: left; font-weight: bold;}getRecord{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\[JSRecord] -- Record the record of the event.{td}{tr}{tr:id=seeret}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}Returns*\\ [JSRecord] -- Record of the event{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
event.Record();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getSource|class=node}{tr:id=name}{td}h6.getSource{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}getSource{span}{span:id=iets|style=float: left;}\(){spantd}h6.getSource{td}{tr}{tr:id=dessig}{td}returns the source component/element of the event.
If it has a name the getElementName() is the name of this component.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}getSource{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\[Object] -- an Object representing the source of this event.{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}returns the source component/element of the event.
If it has a name the getElementName() is the name of this component.{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}{ [Object] -- an Object representing the source of this event.{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var sourceDataProvider = event.getSource().getDataProviderID();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTimestamp|class=node}{tr:id=name}{td}h6.getTimestamp{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Date]{span}{span:id=iets|style=float: left; font-weight: bold;}getTimestamp{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Returns the time the event occurred.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\ event occurred.{td}{tr}{tr:id=ret}{td}*Returns*\\ [Date] -- a Date when this event happened.{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
event.getTimestamp();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getType|class=node}{tr:id=name}{td}h6.getType{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{spantd}{span:id=iets|style=float: left; fontmargin-weightright: bold5px;}getType[String]{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}returns the event type see the JSEvents constants what it can return.
Plugins can create events with there own types.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\ font-weight: bold;}getType{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\[String] -- a String representing the type of this event.{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}returns the event type see the JSEvents constants what it can return.
Plugins can create events with there own types.{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}{ [String] -- a String representing the type of this event.{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
if (event.getType() == JSEvent.ACTION) 
{
   // its an action event.
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getX|class=node}{tr:id=name}{td}h6.getX{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getX{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}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.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\ positions.{td}{tr}{tr:id=ret}{td}*Returns*\\ [Number] -- an int representing the X position.{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var x = event.getX();
var xPrevious = previousEvent.getX();
var movedXPixels = x -xPrevious;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getY|class=node}{tr:id=name}{td}h6.getY{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getY{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}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.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{ will set the x,y positions.{td}{tr}{tr:id=ret}{td}*Returns*\\ [Number] -- an int representing the Y position.{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var y = event.getY();
var yPrevious = previousEvent.getY();
var movedYPixels = y -yPrevious;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}