Class SimpleSerializingDndPanel<T>

    • Constructor Detail

      • SimpleSerializingDndPanel

        public SimpleSerializingDndPanel(DataFlavor flavor,
                                         T data,
                                         boolean isSource,
                                         boolean isDestination)
        Create an instance of a simple DndPanel that transports data via JDK serialization.
        Parameters:
        flavor - the data flavor to use.
        data - the data to represent initially.
        isSource - whether this panel can be used as a source for dragging.
        isDestination - whether this panel can be used as a destination for dragging.
    • Method Detail

      • getTransferData

        public Object getTransferData(T t)
        Description copied from class: SimpleDndPanel
        Override this to provide the transferable data for the denoted instance.
        Specified by:
        getTransferData in class  SimpleDndPanel<T>
        Parameters:
        t - the instance to retrieve a representation for.
        Returns:
        the transferable object.
      • importData

        public boolean importData(Object transferData)
        Description copied from class: SimpleDndPanel
        Override this to handle importing data.
        Specified by:
        importData in class  SimpleDndPanel<T>
        Parameters:
        transferData - the data to import.
        Returns:
        whether the import succeeded.