001/*
002 *  $Source: v:/cvsroot/open/projects/WebARTS/ca/bc/webarts/widgets/dnd/FileDropEvent.java,v $
003 *  $Name:  $
004 *  $Revision: 1.1 $
005 *  $Date: 2005-04-10 11:53:16 -0700 (Sun, 10 Apr 2005) $
006 *  $Locker:  $
007 */
008/*
009 *  Copyright (C) 2001 WebARTS Design, North Vancouver Canada
010 *  http://www..webarts.bc.ca
011 *
012 *  This program is free software; you can redistribute it and/or modify
013 *  it under the terms of the GNU General Public License as published by
014 *  the Free Software Foundation; either version 2 of the License, or
015 *  (at your option) any later version.
016 *
017 *  This program is distributed in the hope that it will be useful,
018 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
019 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
020 *  GNU General Public License for more details.
021 *
022 *  You should have received a copy of the GNU General Public License
023 *  along with this program; if not, write to the Free Software
024 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
025 */
026package ca.bc.webarts.widgets.dnd;
027
028/**
029 * This is the event that is passed to the
030 * {@link FileDropListener#filesDropped filesDropped(...)} method in
031 * your {@link FileDropListener} when files are dropped onto
032 * a registered drop target.
033 *
034 * <p>I'm releasing this code into the Public Domain. Enjoy.
035 * </p>
036 * <p><em>Original author: Robert Harder, rharder@usa.net</em></p>
037 *
038 * @author  Robert Harder
039 * @author  rharder@usa.net
040 * @version 1.1
041 */
042public class FileDropEvent extends java.util.EventObject
043{
044
045    private java.io.File[] files;
046
047    /**
048     * Constructs a {@link FileDropEvent} with the array
049     * of files that were dropped and the
050     * {@link FileDropBean} that initiated the event.
051     *
052     * @param files The array of files that were dropped
053     * @source The event source
054     * @since 1.1
055     */
056    public FileDropEvent( java.io.File[] files, Object source )
057    {   super( source );
058        this.files = files;
059    }   // end constructor
060
061    /**
062     * Returns an array of files that were dropped on a
063     * registered drop target.
064     *
065     * @return array of files that were dropped
066     * @since 1.1
067     */
068    public java.io.File[] getFiles()
069    {   return files;
070    }   // end getFiles
071
072}   // end class FileDropEvent
073