30 import java.awt.HeadlessException;
31 import java.io.File;
32 import java.util.ArrayList;
33 import java.util.List;
34
35 /**
36 * Auxiliary event containing a list of files.
37 *
38 * @since 9
39 */
40 public class FilesEvent extends AppEvent {
41
42 /**
43 * Use serialVersionUID from JDK 9 for interoperability.
44 */
45 private static final long serialVersionUID = 5271763715462312871L;
46
47 /**
48 * The list of files.
49 */
50 final List<File> files;
51
52 /**
53 * Constructs a {@code FilesEvent}.
54 *
55 * @param files the list of files
56 * @throws HeadlessException if {@link GraphicsEnvironment#isHeadless()}
57 * returns {@code true}
58 * @throws UnsupportedOperationException if Desktop API is not supported on
59 * the current platform
60 * @see Desktop#isDesktopSupported()
61 * @see java.awt.GraphicsEnvironment#isHeadless
62 */
63 FilesEvent(final List<File> files) {
64 this.files = files;
65 }
66
67 /**
68 * Gets the list of files.
69 *
|
30 import java.awt.HeadlessException;
31 import java.io.File;
32 import java.util.ArrayList;
33 import java.util.List;
34
35 /**
36 * Auxiliary event containing a list of files.
37 *
38 * @since 9
39 */
40 public class FilesEvent extends AppEvent {
41
42 /**
43 * Use serialVersionUID from JDK 9 for interoperability.
44 */
45 private static final long serialVersionUID = 5271763715462312871L;
46
47 /**
48 * The list of files.
49 */
50 @SuppressWarnings("serial") // Not statically typed as Serializable
51 final List<File> files;
52
53 /**
54 * Constructs a {@code FilesEvent}.
55 *
56 * @param files the list of files
57 * @throws HeadlessException if {@link GraphicsEnvironment#isHeadless()}
58 * returns {@code true}
59 * @throws UnsupportedOperationException if Desktop API is not supported on
60 * the current platform
61 * @see Desktop#isDesktopSupported()
62 * @see java.awt.GraphicsEnvironment#isHeadless
63 */
64 FilesEvent(final List<File> files) {
65 this.files = files;
66 }
67
68 /**
69 * Gets the list of files.
70 *
|