package speiger.src.coreengine.rendering.input.events;

import java.io.File;

import speiger.src.coreengine.rendering.input.window.ScaledResolution;

public class FileDropEvent extends MouseEvent
{
	final File file;
	final String fileName;
	final String fileExtension;
	
	public FileDropEvent(File file, int x, int y, ScaledResolution res)
	{
		super(x, y);
		this.file = file;
		fileName = file.getName();
		fileExtension = fileName.substring(fileName.lastIndexOf(".")+1);
		convertToScreenCoords(res);
	}
	
	public String getFileExtension()
	{
		return fileExtension;
	}
	
	public String getFileName()
	{
		return fileName;
	}
	
	public File getFile()
	{
		return file;
	}
	
	@Override
	public boolean isCancelable()
	{
		return true;
	}
}
