public abstract class AbstractDragAndDropHandler<D> extends AbstractHandlerPlugin<D> implements DragAndDropHandler<D>
DragAndDropHandler
s.Constructor and Description |
---|
AbstractDragAndDropHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
check(D dataObject,
Display<?> display)
Throws
IllegalArgumentException if (data, display) pair is
incompatible. |
D |
convertData(DragAndDropData data)
Converts the given
DragAndDropData to the type of data object
supported by this handler. |
protected D |
convertDataUnchecked(DragAndDropData data)
Converts the given data to this handler's native data type, without
verifying compatibility first.
|
D |
convertObject(Object object)
Converts the given object to the type of data object supported by this
handler.
|
protected D |
convertObjectUnchecked(Object object)
Converts the given object to this handler's native data type, without
verifying compatibility first.
|
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,
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.
|
supports
getInfo, getPriority, setInfo, setPriority, toString
context, getContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
drop, supports
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
public boolean supports(D dataObject, Display<?> display)
DragAndDropHandler
supports
in interface DragAndDropHandler<D>
public boolean supportsData(DragAndDropData data)
DragAndDropHandler
DragAndDropData
onto a compatible display.supportsData
in interface DragAndDropHandler<D>
public boolean supportsData(DragAndDropData data, Display<?> display)
DragAndDropHandler
DragAndDropData
onto the specified display.supportsData
in interface DragAndDropHandler<D>
public boolean supportsObject(Object object)
DragAndDropHandler
supportsObject
in interface DragAndDropHandler<D>
public boolean supportsObject(Object object, Display<?> display)
DragAndDropHandler
supportsObject
in interface DragAndDropHandler<D>
public boolean supportsDisplay(Display<?> display)
DragAndDropHandler
Display
.supportsDisplay
in interface DragAndDropHandler<D>
public D convertData(DragAndDropData data)
DragAndDropHandler
DragAndDropData
to the type of data object
supported by this handler.convertData
in interface DragAndDropHandler<D>
public D convertObject(Object object)
DragAndDropHandler
convertObject
in interface DragAndDropHandler<D>
public boolean dropData(DragAndDropData data, Display<?> display)
DragAndDropHandler
Display
.dropData
in interface DragAndDropHandler<D>
public boolean dropObject(Object object, Display<?> display)
DragAndDropHandler
Display
.dropObject
in interface DragAndDropHandler<D>
protected void check(D dataObject, Display<?> display)
IllegalArgumentException
if (data, display) pair is
incompatible.protected D convertDataUnchecked(DragAndDropData data)
Copyright © 2015–2022 SciJava. All rights reserved.