Interface DragAndDropData

    • Method Detail

      • isSupported

        boolean isSupported​(MIMEType mimeType)
        Gets whether the data can be provided as an object with the given MIME type.
      • isSupported

        default boolean isSupported​(Class<?> type)
        Gets whether the data can be provided as an object of the given Java class.
      • getData

        Object getData​(MIMEType mimeType)
        Gets the data with respect to the given MIME type.
        Returns:
        The data object for the given MIME type. May return null if the data is requested too early in the drag-and-drop process, such as during a DragEnterEvent rather than a DropEvent.
        Throws:
        IllegalArgumentException - if the MIME type is not supported.
      • getData

        default <T> T getData​(Class<T> type)
        Gets the data as an object of the given Java class.
      • getMIMEType

        default MIMEType getMIMEType​(Class<?> type)
        Gets the best supported MIME type matching the given Java class.
      • getMIMETypes

        List<MIMEType> getMIMETypes()
        Gets the list of supported MIME types.