Child pages
  • DRAGNDROP

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hiddendiv:style=display:none}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACTAUTO CHANGESUPDATE FROM THE PAGECONTENT ANDTHROUGH MERGETHE THEM BACK INTO SERVOY SOURCE{hiddenDOC GENERATOR{div}
{sub-sectiondiv:id=description|text=}{sub-sectiondiv}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Constants Summary{th}{tr}{tbody}{tr}{td}[Number]{td}{td}[#COPY]
Constant for copy drag operation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#MIME_TYPE_SERVOY]
Constant used as mime type for servoy objects.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#MIME_TYPE_SERVOY_RECORD]
Constant used as mime type for servoy record objects.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#MOVE]
Constant for move drag operation.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#NONE]
Constant for no drag operation.{td}{tr}{tbody}{table}\\ 

{table:id=constant|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Constants Details{th}{tr}{tbody:id=COPY|class=node}{tr:id=name}{td}h6.COPY{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:COPY_des|trigger=button|text=}{sub-section}{sub-section:COPY_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:COPY_snc|trigger=button|text=}{sub-section}{sub-section:COPY_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:COPY_prs|trigger=button|text=}{sub-section}{sub-section:COPY_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:COPY_ret|trigger=button|text=}{sub-section}{sub-section:COPY_ret|trigger=none|div:class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:COPY_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:COPY_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:COPY_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:COPY_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:COPY_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:COPY_sam|trigger=none}{code:language=javascript}
function startDrag(event)
{
	if(event.getElementName() == "copy")
		return DRAGNDROP.COPY;
	else if(event.getElementName() == "move")
		return DRAGNDROP.MOVE

	return DRAGNDROP.NONE;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=MIME_TYPE_SERVOY|class=node}{tr:id=name}{td}h6.MIME_TYPE_SERVOY{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:MIME_TYPE_SERVOY_des|trigger=button|text=}{sub-section}{sub-section:MIME_TYPE_SERVOY_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:MIME_TYPE_SERVOY_snc|trigger=button|text=}{sub-section}{sub-section:MIME_TYPE_SERVOY_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:MIME_TYPE_SERVOY_prs|trigger=button|text=}{sub-section}{sub-section:MIME_TYPE_SERVOY_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:MIME_TYPE_SERVOY_ret|trigger=button|text=}{sub-section}{sub-section:MIME_TYPE_SERVOY_ret|trigger=none|div:class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:MIME_TYPE_SERVOY_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MIME_TYPE_SERVOY_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:MIME_TYPE_SERVOY_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MIME_TYPE_SERVOY_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:MIME_TYPE_SERVOY_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MIME_TYPE_SERVOY_sam|trigger=none}{code:language=javascript}
if (event.dataMimeType == DRAGNDROP.MIME_TYPE_SERVOY || event.dataMimeType == DRAGNDROP.MIME_TYPE_SERVOY_RECORD) {
	application.output("Dropping is allowed" );
	return true;
} else { 
	application.output("Dropping is not allowed" );
	return false;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=MIME_TYPE_SERVOY_RECORD|class=node}{tr:id=name}{td}h6.MIME_TYPE_SERVOY_RECORD{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:MIME_TYPE_SERVOY_RECORD_des|trigger=button|text=}{sub-section}{sub-section:MIME_TYPE_SERVOY_RECORD_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:MIME_TYPE_SERVOY_RECORD_snc|trigger=button|text=}{sub-section}{sub-section:MIME_TYPE_SERVOY_RECORD_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:MIME_TYPE_SERVOY_RECORD_prs|trigger=button|text=}{sub-section}{sub-section:MIME_TYPE_SERVOY_RECORD_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:MIME_TYPE_SERVOY_RECORD_ret|trigger=button|text=}{sub-section}{sub-section:MIME_TYPE_SERVOY_RECORD_ret|trigger=none|div:class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:MIME_TYPE_SERVOY_RECORD_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MIME_TYPE_SERVOY_RECORD_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:MIME_TYPE_SERVOY_RECORD_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MIME_TYPE_SERVOY_RECORD_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:MIME_TYPE_SERVOY_RECORD_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MIME_TYPE_SERVOY_RECORD_sam|trigger=none}{code:language=javascript}
if (event.dataMimeType == DRAGNDROP.MIME_TYPE_SERVOY || event.dataMimeType == DRAGNDROP.MIME_TYPE_SERVOY_RECORD) {
	application.output("Dropping is allowed" );
	return true;
} else { 
	application.output("Dropping is not allowed" );
	return false;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=MOVE|class=node}{tr:id=name}{td}h6.MOVE{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:MOVE_des|trigger=button|text=}{sub-section}{sub-section:MOVE_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:MOVE_snc|trigger=button|text=}{sub-section}{sub-section:MOVE_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:MOVE_prs|trigger=button|text=}{sub-section}{sub-section:MOVE_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:MOVE_ret|trigger=button|text=}{sub-section}{sub-section:MOVE_ret|trigger=none|div:class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:MOVE_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MOVE_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:MOVE_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MOVE_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:MOVE_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MOVE_sam|trigger=none}{code:language=javascript}
function startDrag(event)
{
	if(event.getElementName() == "copy")
		return DRAGNDROP.COPY;
	else if(event.getElementName() == "move")
		return DRAGNDROP.MOVE

	return DRAGNDROP.NONE;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=NONE|class=node}{tr:id=name}{td}h6.NONE{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:NONE_des|trigger=button|text=}{sub-section}{sub-section:NONE_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:NONE_snc|trigger=button|text=}{sub-section}{sub-section:NONE_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:NONE_prs|trigger=button|text=}{sub-section}{sub-section:NONE_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:NONE_ret|trigger=button|text=}{sub-section}{sub-section:NONE_ret|trigger=none|div:class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:NONE_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NONE_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:NONE_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NONE_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:NONE_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NONE_sam|trigger=none}{code:language=javascript}
function startDrag(event)
{
	if(event.getElementName() == "copy")
		return DRAGNDROP.COPY;
	else if(event.getElementName() == "move")
		return DRAGNDROP.MOVE

	return DRAGNDROP.NONE;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}