Module java.desktop
Package java.awt.desktop

## Class OpenFilesEvent

- java.lang.Object
- - java.util.EventObject
  - - java.awt.desktop.AppEvent
    - - java.awt.desktop.FilesEvent
      - - java.awt.desktop.OpenFilesEvent

All Implemented Interfaces:
  Serializable

    public final class OpenFilesEvent
    extends FilesEvent

Event sent when the app is asked to open a list of files.

Since:
  9
See Also:
  `OpenFilesHandler.openFiles(java.awt.desktop.OpenFilesEvent)`, Serialized Form

### Field Summary

### Fields inherited from class java.util.EventObject

`source`

### Constructor Summary

Constructors
Constructor and Description
`OpenFilesEvent(List<File> files, String searchTerm)` Constructs an `OpenFilesEvent`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getSearchTerm()` Gets the search term.

### Methods inherited from class java.util.EventObject

`getSource, toString`

### Methods inherited from class java.awt.desktop.FilesEvent

`getFiles`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### OpenFilesEvent

    public OpenFilesEvent(List<File> files,
                          String searchTerm)

Constructs an `OpenFilesEvent`

Parameters:
  `files` - files
  `searchTerm` - searchTerm

### Method Detail

#### getSearchTerm

    public String getSearchTerm()

Gets the search term. The platform may optionally provide the search term that was used to find the files. This is for example the case on Mac OS X, when the files were opened using the Spotlight search menu or a Finder search window. This is useful for highlighting the search term in the documents when they are opened.

Returns:
  the search term used to find the files