/*
 * Created on Aug 10, 2003
 *
 * Listen on the target being dropped on the canvas.
 */
package APStudio.dnd;

import org.eclipse.gef.dnd.TemplateTransferDropTargetListener;
import org.eclipse.gef.requests.CreationFactory;
import org.eclipse.gef.EditPartViewer;
import APStudio.models.APElementFactory;
/**
 * @author rajags
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class APTemplateTransferDropTargetListener
	extends TemplateTransferDropTargetListener {

	public APTemplateTransferDropTargetListener(EditPartViewer viewer) {
		super(viewer);
	}
	/* (non-Javadoc)
	 * @see org.eclipse.gef.dnd.TemplateTransferDropTargetListener#getFactory(java.lang.Object)
	 */
	protected CreationFactory getFactory(Object template) {
		if (template instanceof String)
			return new APElementFactory((String)template);
		return null;
	}

}
