Class DragDropEventBase<H extends EventHandler>

Type Parameters:
H - handler type
All Implemented Interfaces:
HasNativeEvent
Direct Known Subclasses:
DragEndEvent, DragEnterEvent, DragEvent, DragLeaveEvent, DragOverEvent, DragStartEvent, DropEvent

public abstract class DragDropEventBase<H extends EventHandler> extends DomEvent<H>
Base class for drag and drop events.
  • Constructor Details

    • DragDropEventBase

      public DragDropEventBase()
  • Method Details

    • isSupported

      public static boolean isSupported()
      Runtime check for whether drag events are supported in this browser.
      Returns:
      true if supported, false if not
    • getData

      public String getData(String format)
      Get the data for the specified format from the DataTransfer object.
      Parameters:
      format - the format
      Returns:
      the data for the specified format
    • getDataTransfer

      public DataTransfer getDataTransfer()
      Get the DataTransfer associated with the current drag event.
      Returns:
      the DataTransfer object
    • setData

      public void setData(String format, String data)
      Set the data in the DataTransfer object for the specified format.
      Parameters:
      format - the format
      data - the data to associate with the format