xworker.swt.dnd.Transfer
事物 Transfer(Transfer)点击打开事物点击浏览描述

描述者:
MetaDescriptor3
事物
thing

Transfer provides a mechanism for converting between a java representation of data and a platform specific representation of data and vice versa. It is used in data transfer operations such as drag and drop and clipboard copy/paste.

You should only need to become familiar with this class if you are implementing a Transfer subclass and you are unable to subclass the ByteArrayTransfer class.

字段摘要
           String label(标签)
           
           String name(名称)
           
           String type(类型)
           可以选择已有的类型也可以输入新的类型。
 
方法摘要
           create
          
 
子事物摘要
           actions(动作)
          
 
字段详细信息

label(标签)点击打开事物


name(名称)点击打开事物


type(类型)点击打开事物

可以选择已有的类型也可以输入新的类型。

如果选择已有的类型,那么返回swt定义的类型。如果输入新的类型,那么必须要实现以下方法:

getSupportedTypes

public abstract TransferData[] getSupportedTypes()
Returns a list of the platform specific data types that can be converted using this transfer agent.

Only the data type fields of the TransferData objects are filled in.

 

返回:
a list of the data types that can be converted using this transfer agent

isSupportedType

public abstract 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).

 

参数:
transferData - a platform specific description of a data type; only the data type fields of the TransferData object need to be filled in
返回:
true if the transferData data type can be converted using this transfer agent

另外程序会自动调用registerType方法注册新类型,类型的id号放在type字段里。


 
方法详细信息

create


 
子事物详细信息

actions(动作)点击打开事物