blob: 3d0574655914ead0fb8a65e175a7393823dc0c7f [file] [log] [blame]
{ "type": "class",
"qname": "mx.core.DragSource",
"baseClassname": ""
,
"description": "The DragSource class contains the data being dragged. The data can be in multiple formats, depending on the type of control that initiated the drag. <p>Each format of data is identified with a string. The <code>hasFormat()</code> method is used to determine if the object has data in that format. The <code>dataForFormat()</code> method is used to retrieve the data in the specified format.</p> <p>Data can be added directly using the <code>addData()</code> method, or indirectly using the <code>addHandler()</code> method. The <code>addHandler()</code> method registers a callback that will be called if the data is requested. This is useful for adding data in a non-native format that may require large computations or conversions. For example, if you have raw sound data you can add an MP3 format handler. The MP3 conversion will only be done if the MP3 data is requested.</p>",
"tags": [
{ "tagName": "royalesuppresspublicvarwarning",
"values": []},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "mx.core.DragSource",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
,
{ "type": "accessor",
"access": "read-only",
"return": "Array",
"qname": "formats",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Contains the formats of the drag data, as an Array of Strings. Set this property using the <code>addData()</code> or <code>addHandler()</code> methods. The default value depends on data added to the DragSource object.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "addData",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Adds data and a corresponding format String to the drag source. This method does not return a value. This can be any object, such as a String, a DataProvider, and so on. the format for this data.",
"tags": [
{ "tagName": "param",
"values": ["data Object that specifies the drag data.", "format String that specifies a label that describes"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "data", "type": "Object"},
{ "name": "format", "type": "String"}]}
,
{ "type": "method",
"qname": "addHandler",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Adds a handler that is called when data for the specified format is requested. This is useful when dragging large amounts of data. The handler is only called if the data is requested. This method does not return a value. called to request the data. This function must return the data in the specified format.",
"tags": [
{ "tagName": "param",
"values": ["handler Function that specifies the handler", "format String that specifies the format for this data."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "handler", "type": "Function"},
{ "name": "format", "type": "String"}]}
,
{ "type": "method",
"qname": "dataForFormat",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Retrieves the data for the specified format. If the data was added with the <code>addData()</code> method, it is returned directly. If the data was added with the <code>addHandler()</code> method, the handler function is called to return the data. the format for the data to return. This string can be a custom value if you are creating a custom drop target with the <code>addData()</code> method. <p>List-based controls have predefined values for the <code>format</code> parameter. If the control that initiated the drag operation is a Tree, then the format is &quot;treeItems&quot; and the items implement the ITreeDataProvider interface. For all other List-based controls that have built-in drag and drop support, the format is &quot;itemsByIndex&quot; and the items implement the IDataProvider interface.</p> containing the data in the requested format. If you drag multiple items, the returned value is an Array. For a List-based control, the returned value is always an Array, even if it contains a single item.",
"tags": [
{ "tagName": "param",
"values": ["format String that specifies a label that describes"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "return",
"values": ["An Object"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Object",
"params": [{ "name": "format", "type": "String"}]}
,
{ "type": "method",
"qname": "hasFormat",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns <code>true</code> if the data source contains the requested format; otherwise, it returns <code>false</code>. for the data. the requested format.",
"tags": [
{ "tagName": "param",
"values": ["format String that specifies a label that describes the format"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "return",
"values": ["<code>true</code> if the data source contains"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "format", "type": "String"}]}
]
}