< prev index next >

src/java.desktop/share/classes/java/awt/desktop/FilesEvent.java

Print this page




  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.awt.desktop;
  27 
  28 import java.awt.Desktop;
  29 import java.awt.GraphicsEnvironment;
  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     private static final long serialVersionUID = 5271763715462312871L;




  43     final List<File> files;
  44 
  45     /**
  46      * Constructs a {@code FilesEvent}.
  47      *
  48      * @param  files the list of files
  49      * @throws HeadlessException if {@link GraphicsEnvironment#isHeadless()}
  50      *         returns {@code true}
  51      * @throws UnsupportedOperationException if Desktop API is not supported on
  52      *         the current platform
  53      * @see Desktop#isDesktopSupported()
  54      * @see java.awt.GraphicsEnvironment#isHeadless
  55      */
  56     FilesEvent(final List<File> files) {
  57         this.files = files;
  58     }
  59 
  60     /**
  61      * Gets the list of files.
  62      *


  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.awt.desktop;
  27 
  28 import java.awt.Desktop;
  29 import java.awt.GraphicsEnvironment;
  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      *
< prev index next >