001package jmri.util.iharder.dnd; 002 003import java.util.Arrays; 004 005/** 006 * This is the event that is passed to the 007 * {@link URIDropListener#urisDropped URIsDropped(...)} method in your 008 * {@link URIDropListener} when URIs are dropped onto a registered drop 009 * target. 010 * <p> 011 * I'm releasing this code into the Public Domain. Enjoy. 012 * <p> 013 * <em>Original author: Robert Harder, rharder@usa.net</em> 014 * 015 * @author Robert Harder 016 * @author rharder@usa.net 017 * 018 * @version 1.2 019 */ 020public class URIDropEvent extends java.util.EventObject { 021 022 private final java.net.URI[] uris; 023 024 /** 025 * Constructs a {@link URIDropEvent} with the array of files that were 026 * dropped and the object that initiated the event. 027 * 028 * @param uris list of URIs 029 * @param source The event source 030 * @since 1.1 031 */ 032 public URIDropEvent(java.net.URI[] uris, Object source) { 033 super(source); 034 this.uris = Arrays.copyOf(uris, uris.length); 035 } // end constructor 036 037 /** 038 * Returns an array of URIs that were dropped on a registered drop target. 039 * 040 * @return array of URIs that were dropped 041 * @since 1.1 042 */ 043 public java.net.URI[] getURIs() { 044 return Arrays.copyOf(uris, uris.length); 045 } // end getFiles 046 047}