public class LocalSelectionTransfer extends ByteArrayTransfer
Modifier | Constructor and Description |
---|---|
protected |
LocalSelectionTransfer()
Only the singleton instance of this class may be used.
|
Modifier and Type | Method and Description |
---|---|
ISelection |
getSelection()
Returns the local transfer data.
|
long |
getSelectionSetTime()
Returns the time when the selection operation
this transfer is associated with was started.
|
static LocalSelectionTransfer |
getTransfer()
Returns the singleton.
|
protected int[] |
getTypeIds()
Returns the type id used to identify this transfer.
|
protected String[] |
getTypeNames()
Returns the type name used to identify this transfer.
|
void |
javaToNative(Object object,
TransferData transferData)
Overrides org.eclipse.swt.dnd.ByteArrayTransfer#javaToNative(Object,
TransferData).
|
Object |
nativeToJava(TransferData transferData)
Overrides org.eclipse.swt.dnd.ByteArrayTransfer#nativeToJava(TransferData).
|
void |
setSelection(ISelection s)
Sets the transfer data for local use.
|
void |
setSelectionSetTime(long time)
Sets the time when the selection operation this
transfer is associated with was started.
|
getSupportedTypes, isSupportedType
registerType, validate
protected LocalSelectionTransfer()
public static LocalSelectionTransfer getTransfer()
public ISelection getSelection()
protected int[] getTypeIds()
getTypeIds
in class Transfer
protected String[] getTypeNames()
getTypeNames
in class Transfer
public void javaToNative(Object object, TransferData transferData)
javaToNative
in class ByteArrayTransfer
object
- a java byte[]
containing the data to be convertedtransferData
- an empty TransferData
object that will
be filled in on return with the platform specific format of the dataByteArrayTransfer.javaToNative(java.lang.Object, org.eclipse.swt.dnd.TransferData)
public Object nativeToJava(TransferData transferData)
nativeToJava
in class ByteArrayTransfer
transferData
- the platform specific representation of the data to be convertedbyte[]
containing the converted data if the conversion was
successful; otherwise nullByteArrayTransfer.nativeToJava(TransferData)
public void setSelection(ISelection s)
s
- the transfer datapublic long getSelectionSetTime()
TypedEvent.time
public void setSelectionSetTime(long time)
setSelectionTime(event.time & 0xFFFF)
time
- the time when the selection operation was startedTypedEvent.time
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.