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(动作)
|
字段详细信息 |
---|
可以选择已有的类型也可以输入新的类型。
如果选择已有的类型,那么返回swt定义的类型。如果输入新的类型,那么必须要实现以下方法:
public abstract TransferData[] getSupportedTypes()
Only the data type fields of the TransferData
objects are filled in.
public abstract boolean isSupportedType(TransferData transferData)
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 另外程序会自动调用registerType方法注册新类型,类型的id号放在type字段里。
方法详细信息 |
---|
子事物详细信息 |
---|