org.eclipse.gmf.runtime.common.ui.services.dnd.core
Class SelectionTransfer
java.lang.Object
org.eclipse.swt.dnd.Transfer
org.eclipse.swt.dnd.ByteArrayTransfer
org.eclipse.gmf.runtime.common.ui.services.dnd.core.SelectionTransfer
-
public final class SelectionTransfer
- extends
ByteArrayTransfer
This class can be used to transfer a ISelection
between two
parts in a workbench in a drag and drop operation. This class does not
marshall the data.
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
getInstance
public static
SelectionTransfer getInstance()
- Return the singleton.
-
-
Returns:
- the singleton instance of the SelectionTransfer class
javaToNative
public void javaToNative(java.lang.Object object,
TransferData transferData)
- Converts the
TYPE_NAME
into a byte[]
-
-
Overrides:
-
javaToNative
in class
ByteArrayTransfer
-
-
See Also:
-
Transfer.javaToNative(java.lang.Object, org.eclipse.swt.dnd.TransferData)
nativeToJava
public java.lang.Object nativeToJava(
TransferData transferData)
- Retrieves the
byte[]
associated with
TYPE_NAME
. Verifies it is the same as the
TYPE_NAME
and then returns the selection
.
-
-
Overrides:
-
nativeToJava
in class
ByteArrayTransfer
-
-
Returns:
-
Object
-
See Also:
-
Transfer.nativeToJava(org.eclipse.swt.dnd.TransferData)
getTypeIds
protected int[] getTypeIds()
- Returns the type ids supported by this agent
-
-
Specified by:
-
getTypeIds
in class
Transfer
-
-
Returns:
-
int[]
-
See Also:
-
Transfer.getTypeIds()
getTypeNames
protected java.lang.String[] getTypeNames()
- Returns the type names supported by this agent
-
-
Specified by:
-
getTypeNames
in class
Transfer
-
-
Returns:
-
String[]
-
See Also:
-
Transfer.getTypeNames()
getSelection
public
ISelection getSelection()
- Returns the selection.
-
-
Returns:
-
selection
setSelection
public void setSelection(
ISelection aSelection)
- Sets the selection.
-
-
Parameters:
-
aSelection
- The selection to set
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.