Package org.scijava.ui.dnd
Class DefaultDragAndDropData
- java.lang.Object
-
- org.scijava.AbstractContextual
-
- org.scijava.ui.dnd.AbstractDragAndDropData
-
- org.scijava.ui.dnd.DefaultDragAndDropData
-
- All Implemented Interfaces:
Contextual,DragAndDropData
public class DefaultDragAndDropData extends AbstractDragAndDropData
Default implementation ofDragAndDropData, which provides a UI-agnostic way to bundle an object together with its MIME type.- Author:
- Barry DeZonia, Curtis Rueden
-
-
Constructor Summary
Constructors Constructor Description DefaultDragAndDropData(Context context, MIMEType mimeType, Object data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetData(MIMEType mimeType)Gets the data with respect to the given MIME type.List<MIMEType>getMIMETypes()Gets the list of supported MIME types.booleanisSupported(MIMEType mimeType)Gets whether the data can be provided as an object with the given MIME type.-
Methods inherited from class org.scijava.AbstractContextual
context, getContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.scijava.Contextual
setContext
-
Methods inherited from interface org.scijava.ui.dnd.DragAndDropData
getData, getMIMEType, isSupported
-
-
-
-
Method Detail
-
isSupported
public boolean isSupported(MIMEType mimeType)
Description copied from interface:DragAndDropDataGets whether the data can be provided as an object with the given MIME type.
-
getData
public Object getData(MIMEType mimeType)
Description copied from interface:DragAndDropDataGets 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
DragEnterEventrather than aDropEvent.
-
getMIMETypes
public List<MIMEType> getMIMETypes()
Description copied from interface:DragAndDropDataGets the list of supported MIME types.
-
-