Class FormElementTransfer

  • public class FormElementTransfer
    extends org.eclipse.swt.dnd.ByteArrayTransfer
    Customisation of the ByteArrayTransfer for EDT form editor. A FormElementTransfer should be used for drag and drop operations between form editors.
    • Method Detail

      • getInstance

        public static FormElementTransfer getInstance()
        Returns the singleton.
        the singleton
      • getTransferObjects

        public Collection<TransferObject<?>> getTransferObjects()
        Returns the local transfer data.
        the local transfer data
      • setTransferObjects

        public void setTransferObjects​(Collection<TransferObject<?>> transferObjects)
        Sets the transfer data for local use.
        s - the transfer data
      • javaToNative

        public void javaToNative​(Object object,
                                 org.eclipse.swt.dnd.TransferData transferData)
        Overrides org.eclipse.swt.dnd.ByteArrayTransfer#javaToNative(Object, TransferData). Only encode the transfer type name since the selection is read and written in the same process.
        javaToNative in class org.eclipse.swt.dnd.ByteArrayTransfer
        See Also:
        ByteArrayTransfer.javaToNative(java.lang.Object, org.eclipse.swt.dnd.TransferData)
      • nativeToJava

        public Object nativeToJava​(org.eclipse.swt.dnd.TransferData transferData)
        Overrides org.eclipse.swt.dnd.ByteArrayTransfer#nativeToJava(TransferData). Test if the native drop data matches this transfer type.
        nativeToJava in class org.eclipse.swt.dnd.ByteArrayTransfer
        See Also:
      • getTypeIds

        protected int[] getTypeIds()
        Returns the type id used to identify this transfer.
        Specified by:
        getTypeIds in class org.eclipse.swt.dnd.Transfer
        the type id used to identify this transfer.
      • getTypeNames

        protected String[] getTypeNames()
        Specified by:
        getTypeNames in class org.eclipse.swt.dnd.Transfer