Class PanelTransferable<T>

  • Type Parameters:
    T - the type of objects.
    All Implemented Interfaces:
    Transferable


    public abstract class PanelTransferable<T>
    extends Object
    implements Transferable
    The Transferable implementation used during transfers from the DndPanel.
    • Constructor Detail

      • PanelTransferable

        public PanelTransferable(T data,
                                 List<DataFlavor> flavorList)
        Create an instance of the transferable.
        Parameters:
        data - the data to wrap.
        flavorList - the list of supported flavors.
    • Method Detail

      • getTransferData

        public abstract Object getTransferData(DataFlavor flavor,
                                               T t)
        Override this to provide the transferable data object.
        Parameters:
        flavor - the flavor to get the representation of the denoted data object of.
        t - the data to retrieve a representation for.
        Returns:
        the transferable instance.
      • getTransferDataFlavors

        public DataFlavor[] getTransferDataFlavors()
      • isDataFlavorSupported

        public boolean isDataFlavorSupported(DataFlavor flavor)