Class DataTypeTransferable

  • All Implemented Interfaces:
    java.awt.datatransfer.ClipboardOwner, java.awt.datatransfer.Transferable

    public class DataTypeTransferable
    extends java.lang.Object
    implements java.awt.datatransfer.Transferable, java.awt.datatransfer.ClipboardOwner
    Defines data that is available for drag/drop and clipboard transfers. The data is a DataType object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getTransferData​(java.awt.datatransfer.DataFlavor f)
      Return the transfer data with the given data flavor.
      java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
      Return all data flavors that this class supports.
      boolean isDataFlavorSupported​(java.awt.datatransfer.DataFlavor f)
      Return whether the specifed data flavor is supported.
      void lostOwnership​(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
      ClipboardOwner interface method.
      java.lang.String toString()
      Get the string representation for this transferable.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • localDataTypeFlavor

        public static final java.awt.datatransfer.DataFlavor localDataTypeFlavor
      • localBuiltinDataTypeFlavor

        public static final java.awt.datatransfer.DataFlavor localBuiltinDataTypeFlavor
    • Constructor Detail

      • DataTypeTransferable

        public DataTypeTransferable​(DataType dt)
        Constructor
        Parameters:
        dt - the dataType being transfered
    • Method Detail

      • getTransferDataFlavors

        public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
        Return all data flavors that this class supports.
        Specified by:
        getTransferDataFlavors in interface java.awt.datatransfer.Transferable
      • isDataFlavorSupported

        public boolean isDataFlavorSupported​(java.awt.datatransfer.DataFlavor f)
        Return whether the specifed data flavor is supported.
        Specified by:
        isDataFlavorSupported in interface java.awt.datatransfer.Transferable
      • getTransferData

        public java.lang.Object getTransferData​(java.awt.datatransfer.DataFlavor f)
                                         throws java.awt.datatransfer.UnsupportedFlavorException,
                                                java.io.IOException
        Return the transfer data with the given data flavor.
        Specified by:
        getTransferData in interface java.awt.datatransfer.Transferable
        Throws:
        java.awt.datatransfer.UnsupportedFlavorException
        java.io.IOException
      • toString

        public java.lang.String toString()
        Get the string representation for this transferable.
        Overrides:
        toString in class java.lang.Object
      • lostOwnership

        public void lostOwnership​(java.awt.datatransfer.Clipboard clipboard,
                                  java.awt.datatransfer.Transferable contents)
        ClipboardOwner interface method.
        Specified by:
        lostOwnership in interface java.awt.datatransfer.ClipboardOwner