org.scijava.ui.dnd
Class ScriptFileDragAndDropHandler

java.lang.Object
  extended by org.scijava.AbstractContextual
      extended by org.scijava.plugin.AbstractRichPlugin
          extended by org.scijava.plugin.AbstractTypedPlugin<D>
              extended by org.scijava.plugin.AbstractHandlerPlugin<D>
                  extended by org.scijava.ui.dnd.AbstractDragAndDropHandler<File>
                      extended by org.scijava.ui.dnd.ScriptFileDragAndDropHandler
All Implemented Interfaces:
Comparable<Prioritized>, Contextual, HandlerPlugin<File>, HasPluginInfo, RichPlugin, SciJavaPlugin, SingletonPlugin, TypedPlugin<File>, Prioritized, Typed<File>, DragAndDropHandler<File>

public class ScriptFileDragAndDropHandler
extends AbstractDragAndDropHandler<File>

Drag-and-drop handler for script files.

Author:
Curtis Rueden

Constructor Summary
ScriptFileDragAndDropHandler()
           
 
Method Summary
 boolean drop(File file, Display<?> display)
          Performs a drop operation with the given data object in the specified Display.
 Class<File> getType()
          Gets the type associated with the object.
 boolean supports(File file)
          Gets whether this object is compatible with the given data object.
 
Methods inherited from class org.scijava.ui.dnd.AbstractDragAndDropHandler
check, convertData, convertDataUnchecked, convertObject, convertObjectUnchecked, dropData, dropObject, supports, supportsData, supportsData, supportsDisplay, supportsObject, supportsObject
 
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
compareTo, getInfo, getPriority, setInfo, setPriority, toString
 
Methods inherited from class org.scijava.AbstractContextual
context, getContext, setContext
 
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.Prioritized
getPriority, setPriority
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
 

Constructor Detail

ScriptFileDragAndDropHandler

public ScriptFileDragAndDropHandler()
Method Detail

drop

public boolean drop(File file,
                    Display<?> display)
Description copied from interface: DragAndDropHandler
Performs a drop operation with the given data object in the specified Display.


supports

public boolean supports(File file)
Description copied from interface: Typed
Gets whether this object is compatible with the given data object.

By default, this method will return true always, since the type is known to be compatible. But individual implementations may have other requirements beyond class assignability.

Specified by:
supports in interface Typed<File>
Specified by:
supports in interface DragAndDropHandler<File>
Overrides:
supports in class AbstractTypedPlugin<File>

getType

public Class<File> getType()
Description copied from interface: Typed
Gets the type associated with the object.



Copyright © 2009–2015 SciJava. All rights reserved.