Java Code Examples for java.awt.desktop.OpenFilesEvent

The following are top voted examples for showing how to use java.awt.desktop.OpenFilesEvent. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: openjdk-jdk10   File: _AppEventHandler.java   View source code 5 votes vote down vote up
void performUsing(final OpenFilesHandler handler, final _NativeEvent event) {
    // create file list from fileNames
    final List<String> fileNameList = event.get(0);
    final ArrayList<File> files = new ArrayList<File>(fileNameList.size());
    for (final String fileName : fileNameList) files.add(new File(fileName));

    // populate the properties map
    final String searchTerm = event.get(1);
    handler.openFiles(new OpenFilesEvent(files, searchTerm));
}
 
Example 2
Project: openjdk9   File: _AppEventHandler.java   View source code 5 votes vote down vote up
void performUsing(final OpenFilesHandler handler, final _NativeEvent event) {
    // create file list from fileNames
    final List<String> fileNameList = event.get(0);
    final ArrayList<File> files = new ArrayList<File>(fileNameList.size());
    for (final String fileName : fileNameList) files.add(new File(fileName));

    // populate the properties map
    final String searchTerm = event.get(1);
    handler.openFiles(new OpenFilesEvent(files, searchTerm));
}
 
Example 3
Project: incubator-netbeans   File: NbApplicationAdapterJDK9.java   View source code 4 votes vote down vote up
@Override
public void openFiles(OpenFilesEvent e) {
    openFiles(e.getFiles());
}