public class DataTransfer extends JavaScriptObject
Experimental API: This API is still under development and is subject to change.
Modifier | Constructor and Description |
---|---|
protected |
DataTransfer()
Required constructor for GWT compiler to function.
|
Modifier and Type | Method and Description |
---|---|
void |
clearData()
Remove all data from the current drag sequence.
|
void |
clearData(String format)
Remove the data for the specified format for all drag events in the current
drag sequence.
|
String |
getData(String format)
Get the data for the specified format.
|
void |
setData(String format,
String data)
Set the data for the specified format to associate with all drag events in
the current drag and drop sequence.
|
void |
setDragImage(Element element,
int x,
int y)
Specify the element to use to update the drag feedback.
|
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
protected DataTransfer()
public final void clearData()
public final void clearData(String format)
format
- the format, which is usually the mime-type of the associated
datasetData(String, String)
,
W3C
Specificationpublic final String getData(String format)
format
- the format, which is usually the mime-type of the datasetData(String, String)
,
W3C
Specificationpublic final void setData(String format, String data)
getData(String)
from any subsequent drag events in this sequence
(such as the drop event).
The format is usually the mime-type of the data, but can also be
text
.
format
- the format, which is usually the mime-type of the datadata
- the data to associate with the formatpublic final void setDragImage(Element element, int x, int y)
element
- the feedback imagex
- the x offset of the cursory
- the y offset of the cursorCopyright © 2018. All rights reserved.