fr.umlv.unitex
Class MyDropTarget

java.lang.Object
  extended by fr.umlv.unitex.MyDropTarget

public class MyDropTarget
extends java.lang.Object

This class is used to listen drag and drop events. Files that can be dragged are texts (".txt" and ".snt", graphs (".grf") and dictionaries (".dic", "dlf" and "dlc"). If you want to allow drag and drop on a component, you must add a DropTarget field to this component like the following:

public DropTarget dropTarget= MyDropTarget.newDropTarget(this);

Author:
Sébastien Paumier

Constructor Summary
MyDropTarget()
           
 
Method Summary
static java.awt.dnd.DropTarget newDropTarget(java.awt.Component c)
          Creates and returns a DropTarget object that only accepts files supported by Unitex
static java.awt.dnd.DropTarget newTranscodeDropTarget(java.awt.Component c)
          Creates and returns a DropTarget object that accepts all files for transcoding
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyDropTarget

public MyDropTarget()
Method Detail

newDropTarget

public static java.awt.dnd.DropTarget newDropTarget(java.awt.Component c)
Creates and returns a DropTarget object that only accepts files supported by Unitex

Parameters:
c - the component that will be the drop target
Returns:
the DropTarget object

newTranscodeDropTarget

public static java.awt.dnd.DropTarget newTranscodeDropTarget(java.awt.Component c)
Creates and returns a DropTarget object that accepts all files for transcoding

Parameters:
c - the component that will be the drop target
Returns:
the DropTarget object