package ie.dcu.swt.event; import java.io.*; import java.util.*; /** * A file drop event. * * @author Kevin McGuinness */ public class FileDropEvent extends EventObject { /** * Serialization UID. */ private static final long serialVersionUID = -7379037769871853671L; /** * The files. */ private final ArrayList files; /** * Create a file drop event. * * @param source * The source of the file drop. * @param files * A list of absolute file paths. */ public FileDropEvent(Object source, String[] files) { super(source); this.files = new ArrayList(files.length); for (String file : files) { this.files.add(new File(file)); } } /** * Returns an immutable collection of the files for the drop. */ public Collection files() { return Collections.unmodifiableCollection(files); } }