All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.ui.dnd.event.FileDropEvent Maven / Gradle / Ivy

There is a newer version: 8.27.3
Show newest version
/*
 * Copyright (C) 2000-2024 Vaadin Ltd
 *
 * This program is available under Vaadin Commercial License and Service Terms.
 *
 * See  for the full
 * license.
 */
package com.vaadin.ui.dnd.event;

import java.util.Collection;

import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.Component;
import com.vaadin.ui.Html5File;
import com.vaadin.ui.dnd.FileDropHandler;

/**
 * File drop event that contains the collection of files dropped on a file drop
 * target.
 *
 * @param 
 *            Type of the file drop target component.
 * @author Vaadin Ltd
 * @see FileDropHandler
 * @since 8.1
 */
public class FileDropEvent
        extends Component.Event {

    private final Collection files;

    /**
     * Creates a file drop event.
     *
     * @param target
     *            The file drop target component.
     * @param files
     *            Collection of files.
     */
    public FileDropEvent(T target, Collection files) {
        super(target);

        this.files = files;
    }

    /**
     * Gets the collection of files dropped onto the file drop target component.
     *
     * @return Collection of files that were dropped onto the file drop target
     *         component.
     */
    public Collection getFiles() {
        return files;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy