|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DragAndDropHandler<D>
Interface for drag-and-drop handlers. A drag-and-drop handler defines behavior for drag-and-drop operations with respect to a specific sort of objects.
Drag-and-drop handlers discoverable at runtime must implement this interface
and be annotated with @Plugin
with attribute Plugin.type()
=
DragAndDropHandler
.class. While it possible to create a drag-and-drop
handler merely by implementing this interface, it is encouraged to instead
extend AbstractDragAndDropHandler
, for convenience.
Plugin
,
DragAndDropService
Method Summary | |
---|---|
D |
convertData(DragAndDropData data)
Converts the given DragAndDropData to the type of data object
supported by this handler. |
D |
convertObject(Object object)
Converts the given object to the type of data object supported by this handler. |
boolean |
drop(D dataObject,
Display<?> display)
Performs a drop operation with the given data object in the specified Display . |
boolean |
dropData(DragAndDropData data,
Display<?> display)
Performs a drop operation with the given data in the specified Display . |
boolean |
dropObject(Object object,
Display<?> display)
Performs a drop operation with the given data in the specified Display . |
boolean |
supports(D dataObject)
Gets whether this handler supports dropping the given data object onto a compatible display. |
boolean |
supports(D dataObject,
Display<?> display)
Gets whether this handler supports dropping the given data object onto the specified display. |
boolean |
supportsData(DragAndDropData data)
Gets whether this handler supports dropping the given DragAndDropData onto a compatible display. |
boolean |
supportsData(DragAndDropData data,
Display<?> display)
Gets whether this handler supports dropping the given DragAndDropData onto the specified display. |
boolean |
supportsDisplay(Display<?> display)
Gets whether this handler supports dropping an assumed-to-be-compatible data object onto the given Display . |
boolean |
supportsObject(Object object)
Gets whether this handler supports dropping the given object onto a compatible display. |
boolean |
supportsObject(Object object,
Display<?> display)
Gets whether this handler supports dropping the given object onto the specified display. |
Methods inherited from interface org.scijava.Contextual |
---|
context, getContext, setContext |
Methods inherited from interface org.scijava.Prioritized |
---|
getPriority, setPriority |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Methods inherited from interface org.scijava.plugin.HasPluginInfo |
---|
getInfo, setInfo |
Methods inherited from interface org.scijava.Typed |
---|
getType |
Method Detail |
---|
boolean supports(D dataObject, Display<?> display)
boolean supportsData(DragAndDropData data)
DragAndDropData
onto a compatible display.
boolean supportsData(DragAndDropData data, Display<?> display)
DragAndDropData
onto the specified display.
boolean supportsObject(Object object)
boolean supportsObject(Object object, Display<?> display)
boolean supportsDisplay(Display<?> display)
Display
.
D convertData(DragAndDropData data)
DragAndDropData
to the type of data object
supported by this handler.
IllegalArgumentException
- if the handler does not support the given
DragAndDropData
.D convertObject(Object object)
IllegalArgumentException
- if the handler does not support the given
object.boolean drop(D dataObject, Display<?> display)
Display
.
IllegalArgumentException
- if the handler is not compatible with the
given data/display combination.boolean dropData(DragAndDropData data, Display<?> display)
Display
.
IllegalArgumentException
- if the handler is not compatible with the
given data/display combination.boolean dropObject(Object object, Display<?> display)
Display
.
IllegalArgumentException
- if the handler is not compatible with the
given data/display combination.boolean supports(D dataObject)
supports
in interface Typed<D>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |