DRAGNDROP

Overview

Scope defining drag and drop constants.

Constants Summarized

TypeNameSummary

Constant for copy drag operation.

Constant used as mime type for servoy objects.

Constant used as mime type for servoy record objects.

Constant for move drag operation.

Constant for no drag operation.

Constants Detailed

COPY

Constant for copy drag operation.

Type Number

Sample

function startDrag(event)
{
	if(event.getElementName() == "copy")
		return DRAGNDROP.COPY;
	else if(event.getElementName() == "move")
		return DRAGNDROP.MOVE

	return DRAGNDROP.NONE;
}

MIME_TYPE_SERVOY

Constant used as mime type for servoy objects.

Type String

Sample

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;
}

MIME_TYPE_SERVOY_RECORD

Constant used as mime type for servoy record objects.

Type String

Sample

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;
}

MOVE

Constant for move drag operation.

Type Number

Sample

function startDrag(event)
{
	if(event.getElementName() == "copy")
		return DRAGNDROP.COPY;
	else if(event.getElementName() == "move")
		return DRAGNDROP.MOVE

	return DRAGNDROP.NONE;
}

NONE

Constant for no drag operation.

Type Number

Sample

function startDrag(event)
{
	if(event.getElementName() == "copy")
		return DRAGNDROP.COPY;
	else if(event.getElementName() == "move")
		return DRAGNDROP.MOVE

	return DRAGNDROP.NONE;
}

Last updated