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 of DragAndDropData
, which provides a
UI-agnostic way to bundle an object together with its MIME type.
- Author:
- Barry DeZonia, Curtis Rueden
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultDragAndDropData
public DefaultDragAndDropData(Context context,
MIMEType mimeType,
Object data)
isSupported
public boolean isSupported(MIMEType mimeType)
- Description copied from interface:
DragAndDropData
- Gets whether the data can be provided as an object with the given MIME
type.
getData
public Object getData(MIMEType mimeType)
- Description copied from interface:
DragAndDropData
- 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
.
getMIMETypes
public List<MIMEType> getMIMETypes()
- Description copied from interface:
DragAndDropData
- Gets the list of supported MIME types.
Copyright © 2009–2015 SciJava. All rights reserved.