|
||||||||||
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.datatools.sqltools.common.ui.tableviewer.ObjectTransfer
public class ObjectTransfer
This derived implementation of a byte array transfer short circuits the transfer process so that a local transfer does not serialize the object and hence can and will return the original object, not just a clone. As an addded guard, the time is recorded and serialized in javaToNative to that navive to java can ensure that it's returns the value that was really to have been transferred.
Method Summary | |
---|---|
static ObjectTransfer |
getInstance()
This returns the one instance of this transfer agent. |
java.lang.String[] |
getTypeNames()
This returns the transfer names that this agent supports. |
void |
javaToNative(java.lang.Object object,
org.eclipse.swt.dnd.TransferData transferData)
This records the object and current time and encodes only the current time into the transfer data. |
java.lang.Object |
nativeToJava(org.eclipse.swt.dnd.TransferData transferData)
This decodes the time of the transfer and returns the recorded the object if the recorded time and the decoded time match. |
Methods inherited from class org.eclipse.swt.dnd.ByteArrayTransfer |
---|
getSupportedTypes, isSupportedType |
Methods inherited from class org.eclipse.swt.dnd.Transfer |
---|
registerType |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ObjectTransfer getInstance()
public java.lang.String[] getTypeNames()
getTypeNames
in class org.eclipse.swt.dnd.Transfer
public void javaToNative(java.lang.Object object, org.eclipse.swt.dnd.TransferData transferData)
javaToNative
in class org.eclipse.swt.dnd.ByteArrayTransfer
public java.lang.Object nativeToJava(org.eclipse.swt.dnd.TransferData transferData)
nativeToJava
in class org.eclipse.swt.dnd.ByteArrayTransfer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |