|
Eclipse Platform Release 3.1 |
|||||||||||
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.swt.dnd.ByteArrayTransfer
org.eclipse.ui.views.navigator.LocalSelectionTransfer
A LocalSelectionTransfer may be used for drag and drop operations within the same instance of Eclipse. The selection is made available directly for use in the DropTargetListener. dropAccept method. The DropTargetEvent passed to dropAccept does not contain the drop data. The selection may be used for validation purposes so that the drop can be aborted if appropriate. This class is not intended to be subclassed.
Method Summary | |
---|---|
static LocalSelectionTransfer |
getInstance()
Returns the singleton. |
ISelection |
getSelection()
Returns the local transfer data. |
long |
getSelectionSetTime()
Returns the time when the selection operation this transfer is associated with was started. |
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. |
Methods inherited from class org.eclipse.swt.dnd.ByteArrayTransfer |
---|
getSupportedTypes, isSupportedType |
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 LocalSelectionTransfer getInstance()
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; this
object 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
been converted
byte[]
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
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.