|
Eclipse Remote Application Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.swt.dnd.Transfer
org.eclipse.rap.rwt.dnd.ClientFileTransfer
public class ClientFileTransfer
The class ClientFileTransfer
allows the user to drop files from the user's file
system on a DropTarget
. The DropEvent will contain data of the type
ClientFile[]
.
Transfer
,
ClientFile
,
ClientFileUploader
Method Summary | |
---|---|
static ClientFileTransfer |
getInstance()
|
TransferData[] |
getSupportedTypes()
Returns a list of the platform specific data types that can be converted using this transfer agent. |
protected int[] |
getTypeIds()
Returns the platform specific ids of the data types that can be converted using this transfer agent. |
protected java.lang.String[] |
getTypeNames()
Returns the platform specific names of the data types that can be converted using this transfer agent. |
boolean |
isSupportedType(TransferData transferData)
Returns true if the TransferData data type can be converted
using this transfer agent, or false otherwise (including if transferData is
null ). |
void |
javaToNative(java.lang.Object object,
TransferData transferData)
Converts a java representation of data to a platform specific representation of the data. |
java.lang.Object |
nativeToJava(TransferData transferData)
Converts a platform specific representation of data to a java representation. |
Methods inherited from class org.eclipse.swt.dnd.Transfer |
---|
registerType, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ClientFileTransfer getInstance()
public TransferData[] getSupportedTypes()
Transfer
Only the data type fields of the TransferData
objects are
filled in.
getSupportedTypes
in class Transfer
public boolean isSupportedType(TransferData transferData)
Transfer
TransferData
data type can be converted
using this transfer agent, or false otherwise (including if transferData is
null
).
isSupportedType
in class Transfer
transferData
- a platform specific description of a data type; only
the data type fields of the TransferData
object need
to be filled in
protected int[] getTypeIds()
Transfer
getTypeIds
in class Transfer
protected java.lang.String[] getTypeNames()
Transfer
getTypeNames
in class Transfer
public void javaToNative(java.lang.Object object, TransferData transferData)
Transfer
On a successful conversion, the transferData.result field will be set to 1. If this transfer agent is unable to perform the conversion, the transferData.result field will be set to a failure value of 0.
IMPORTANT: This method is not part of the RWT public API. It is marked public only so that it can be shared within the packages provided by RWT. It should never be accessed from application code.
javaToNative
in class Transfer
object
- a java representation of the data to be converted; the type
of Object that is passed in is dependent on the
Transfer
subclass.transferData
- an empty TransferData object; this object will be filled
in on return with the platform specific representation of the datapublic java.lang.Object nativeToJava(TransferData transferData)
Transfer
IMPORTANT: This method is not part of the RWT public API. It is marked public only so that it can be shared within the packages provided by RWT. It should never be accessed from application code.
nativeToJava
in class Transfer
transferData
- the platform specific representation of the data to be
converted
null
then null
is returned. The type of Object that is
returned is dependent on the Transfer
subclass.
|
Eclipse Remote Application Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) EclipseSource and others 2002, 2013. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0