public class DefaultDragAndDropService extends AbstractHandlerService<Object,DragAndDropHandler<Object>> implements DragAndDropService
Constructor and Description |
---|
DefaultDragAndDropService() |
Modifier and Type | Method and Description |
---|---|
boolean |
drop(DragAndDropData data,
Display<?> display)
Performs a drag-and-drop operation in the given display with the specified
DragAndDropData , using the first available compatible handler. |
boolean |
drop(Object data,
Display<?> display)
Performs a drag-and-drop operation in the given display with the specified
data object, using the first available compatible handler.
|
DragAndDropHandler<?> |
getHandler(DragAndDropData data,
Display<?> display)
Gets the drag-and-drop handler which will be used to handle the given
DragAndDropData dragged onto the specified display. |
DragAndDropHandler<?> |
getHandler(Object object,
Display<?> display)
Gets the drag-and-drop handler which will be used to handle the given
object dragged onto the specified display.
|
Class<DragAndDropHandler<Object>> |
getPluginType()
Gets the type of plugins managed by this service.
|
Class<Object> |
getType()
Gets the type associated with the object.
|
protected void |
onEvent(DragEnterEvent e) |
protected void |
onEvent(DragExitEvent e) |
protected void |
onEvent(DragOverEvent e) |
protected void |
onEvent(DropEvent e) |
boolean |
supports(DragAndDropData data,
Display<?> display)
Checks whether the given
DragAndDropData can be dropped onto the
specified display. |
boolean |
supports(Object object,
Display<?> display)
Checks whether the given object can be dropped onto the specified display.
|
getHandler, supports
create, filterInstances, getInstance, getInstances, initialize
getPlugins, getPluginService
dispose, getContext, registerEventHandlers, setContext, toString
compareTo, getInfo, getPriority, setInfo, setPriority
context
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getInstances
getHandler, supports
getInstance
create, getPlugins, getPluginService
initialize, registerEventHandlers
context, getContext, setContext
getPriority, setPriority
compareTo
getInfo, setInfo
dispose
public boolean supports(DragAndDropData data, Display<?> display)
DragAndDropService
DragAndDropData
can be dropped onto the
specified display. A (data, display) pair is deemed compatible if a
compatible handler exists for them.supports
in interface DragAndDropService
DragAndDropHandler
public boolean supports(Object object, Display<?> display)
DragAndDropService
supports
in interface DragAndDropService
DragAndDropHandler
public boolean drop(DragAndDropData data, Display<?> display)
DragAndDropService
DragAndDropData
, using the first available compatible handler.drop
in interface DragAndDropService
DragAndDropHandler
public boolean drop(Object data, Display<?> display)
DragAndDropService
drop
in interface DragAndDropService
DragAndDropHandler
public DragAndDropHandler<?> getHandler(DragAndDropData data, Display<?> display)
DragAndDropService
DragAndDropData
dragged onto the specified display.getHandler
in interface DragAndDropService
public DragAndDropHandler<?> getHandler(Object object, Display<?> display)
DragAndDropService
getHandler
in interface DragAndDropService
public Class<DragAndDropHandler<Object>> getPluginType()
PTService
getPluginType
in interface PTService<DragAndDropHandler<Object>>
public Class<Object> getType()
Typed
protected void onEvent(DragEnterEvent e)
protected void onEvent(DragExitEvent e)
protected void onEvent(DragOverEvent e)
protected void onEvent(DropEvent e)
Copyright © 2009–2015 SciJava. All rights reserved.