36 lines
779 B
Java
36 lines
779 B
Java
package speiger.src.coreengine.rendering.input.events;
|
|
|
|
import java.nio.file.Path;
|
|
|
|
import speiger.src.coreengine.rendering.input.window.ScaledResolution;
|
|
|
|
public class FileDropEvent extends MouseEvent
|
|
{
|
|
final Path file;
|
|
final String fileName;
|
|
final String fileExtension;
|
|
|
|
public FileDropEvent(Path file, long windowId, int x, int y, ScaledResolution res) {
|
|
super(windowId, x, y);
|
|
this.file = file;
|
|
fileName = file.getFileName().toString();
|
|
fileExtension = fileName.substring(fileName.lastIndexOf(".")+1);
|
|
convertToScreenCoords(res);
|
|
}
|
|
|
|
public String getFileExtension() {
|
|
return fileExtension;
|
|
}
|
|
|
|
public String getFileName() {
|
|
return fileName;
|
|
}
|
|
|
|
public Path getFile() {
|
|
return file;
|
|
}
|
|
|
|
@Override
|
|
public boolean isCancelable(){ return true; }
|
|
}
|