Package org.scijava.ui.dnd
Class AbstractDragAndDropHandler<D>
- java.lang.Object
-
- org.scijava.AbstractContextual
-
- org.scijava.plugin.AbstractRichPlugin
-
- org.scijava.plugin.AbstractTypedPlugin<D>
-
- org.scijava.plugin.AbstractHandlerPlugin<D>
-
- org.scijava.ui.dnd.AbstractDragAndDropHandler<D>
-
- All Implemented Interfaces:
Comparable<Prioritized>,Contextual,Identifiable,Locatable,Logged,HandlerPlugin<D>,HasPluginInfo,RichPlugin,SciJavaPlugin,SingletonPlugin,TypedPlugin<D>,Prioritized,Typed<D>,DragAndDropHandler<D>,Versioned
- Direct Known Subclasses:
FileDragAndDropHandler,ListDragAndDropHandler,ScriptFileDragAndDropHandler
public abstract class AbstractDragAndDropHandler<D> extends AbstractHandlerPlugin<D> implements DragAndDropHandler<D>
Abstract superclass forDragAndDropHandlers.- Author:
- Curtis Rueden
-
-
Constructor Summary
Constructors Constructor Description AbstractDragAndDropHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheck(D dataObject, Display<?> display)ThrowsIllegalArgumentExceptionif (data, display) pair is incompatible.DconvertData(DragAndDropData data)Converts the givenDragAndDropDatato the type of data object supported by this handler.protected DconvertDataUnchecked(DragAndDropData data)Converts the given data to this handler's native data type, without verifying compatibility first.DconvertObject(Object object)Converts the given object to the type of data object supported by this handler.protected DconvertObjectUnchecked(Object object)Converts the given object to this handler's native data type, without verifying compatibility first.booleandropData(DragAndDropData data, Display<?> display)Performs a drop operation with the given data in the specifiedDisplay.booleandropObject(Object object, Display<?> display)Performs a drop operation with the given data in the specifiedDisplay.booleansupports(D dataObject, Display<?> display)Gets whether this handler supports dropping the given data object onto the specified display.booleansupportsData(DragAndDropData data)Gets whether this handler supports dropping the givenDragAndDropDataonto a compatible display.booleansupportsData(DragAndDropData data, Display<?> display)Gets whether this handler supports dropping the givenDragAndDropDataonto the specified display.booleansupportsDisplay(Display<?> display)Gets whether this handler supports dropping an assumed-to-be-compatible data object onto the givenDisplay.booleansupportsObject(Object object)Gets whether this handler supports dropping the given object onto a compatible display.booleansupportsObject(Object object, Display<?> display)Gets whether this handler supports dropping the given object onto the specified display.-
Methods inherited from class org.scijava.plugin.AbstractTypedPlugin
supports
-
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
getInfo, getPriority, setInfo, setPriority, toString
-
Methods inherited from class org.scijava.AbstractContextual
context, getContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.ui.dnd.DragAndDropHandler
drop, supports
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
Methods inherited from interface org.scijava.Locatable
getLocation
-
Methods inherited from interface org.scijava.Prioritized
compareTo, getPriority, setPriority
-
Methods inherited from interface org.scijava.plugin.RichPlugin
getIdentifier, log
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
-
-
-
Method Detail
-
supports
public boolean supports(D dataObject, Display<?> display)
Description copied from interface:DragAndDropHandlerGets whether this handler supports dropping the given data object onto the specified display.- Specified by:
supportsin interfaceDragAndDropHandler<D>
-
supportsData
public boolean supportsData(DragAndDropData data)
Description copied from interface:DragAndDropHandlerGets whether this handler supports dropping the givenDragAndDropDataonto a compatible display.- Specified by:
supportsDatain interfaceDragAndDropHandler<D>
-
supportsData
public boolean supportsData(DragAndDropData data, Display<?> display)
Description copied from interface:DragAndDropHandlerGets whether this handler supports dropping the givenDragAndDropDataonto the specified display.- Specified by:
supportsDatain interfaceDragAndDropHandler<D>
-
supportsObject
public boolean supportsObject(Object object)
Description copied from interface:DragAndDropHandlerGets whether this handler supports dropping the given object onto a compatible display.- Specified by:
supportsObjectin interfaceDragAndDropHandler<D>
-
supportsObject
public boolean supportsObject(Object object, Display<?> display)
Description copied from interface:DragAndDropHandlerGets whether this handler supports dropping the given object onto the specified display.- Specified by:
supportsObjectin interfaceDragAndDropHandler<D>
-
supportsDisplay
public boolean supportsDisplay(Display<?> display)
Description copied from interface:DragAndDropHandlerGets whether this handler supports dropping an assumed-to-be-compatible data object onto the givenDisplay.- Specified by:
supportsDisplayin interfaceDragAndDropHandler<D>
-
convertData
public D convertData(DragAndDropData data)
Description copied from interface:DragAndDropHandlerConverts the givenDragAndDropDatato the type of data object supported by this handler.- Specified by:
convertDatain interfaceDragAndDropHandler<D>
-
convertObject
public D convertObject(Object object)
Description copied from interface:DragAndDropHandlerConverts the given object to the type of data object supported by this handler.- Specified by:
convertObjectin interfaceDragAndDropHandler<D>
-
dropData
public boolean dropData(DragAndDropData data, Display<?> display)
Description copied from interface:DragAndDropHandlerPerforms a drop operation with the given data in the specifiedDisplay.- Specified by:
dropDatain interfaceDragAndDropHandler<D>
-
dropObject
public boolean dropObject(Object object, Display<?> display)
Description copied from interface:DragAndDropHandlerPerforms a drop operation with the given data in the specifiedDisplay.- Specified by:
dropObjectin interfaceDragAndDropHandler<D>
-
check
protected void check(D dataObject, Display<?> display)
ThrowsIllegalArgumentExceptionif (data, display) pair is incompatible.
-
convertDataUnchecked
protected D convertDataUnchecked(DragAndDropData data)
Converts the given data to this handler's native data type, without verifying compatibility first.
-
-