项目:openjdk-jdk10
文件:_AppEventHandler.java
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));
}
项目:openjdk9
文件:_AppEventHandler.java
void performUsing(final OpenFilesHandler handler,searchTerm));
}
项目:openjdk-jdk10
文件:Desktop.java
/**
* Installs the handler which is notified when the application is asked to
* open a list of files.
*
* @implNote Please note that for Mac OS,notifications
* are only sent if the Java app is a bundled application,* with a {@code CFBundleDocumentTypes} array present in its
* Info.plist. See the
* <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">
* Info.plist Key Reference</a> for more @R_598_4045@ion about adding a
* {@code CFBundleDocumentTypes} key to your app's Info.plist.
*
* @param openFileHandler handler
*
* @throws SecurityException if a security manager exists and its
* {@link java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the files,or it denies the
* {@code RuntimePermission("canProcessApplicationEvents")}
* permission,or the calling thread is not allowed to create a
* subprocess
* @throws UnsupportedOperationException if the current platform
* does not support the {@link Desktop.Action#APP_OPEN_FILE} action
* @since 9
*/
public void setopenFileHandler(final OpenFilesHandler openFileHandler) {
checkEventsProcessingPermission();
checkExec();
checkRead();
checkActionSupport(Action.APP_OPEN_FILE);
peer.setopenFileHandler(openFileHandler);
}
项目:openjdk9
文件:Desktop.java
/**
* Installs the handler which is notified when the application is asked to
* open a list of files.
*
* @implNote Please note that for Mac OS,or it denies the
* {@code AWTPermission("showWindowWithoutWarningBanner")}
* permission,or the calling thread is not allowed to create a
* subprocess
* @throws UnsupportedOperationException if the current platform
* does not support the {@link Desktop.Action#APP_OPEN_FILE} action
* @since 9
*/
public void setopenFileHandler(final OpenFilesHandler openFileHandler) {
checkAWTPermission();
checkExec();
checkRead();
checkActionSupport(Action.APP_OPEN_FILE);
peer.setopenFileHandler(openFileHandler);
}
项目:openjdk-jdk10
文件:DesktopPeer.java
项目:openjdk-jdk10
文件:Application.java
/**
* Installs the handler which is notified when the application is asked to open a list of files.
* The {@link OpenFilesHandler#openFiles(OpenFilesEvent)} notifications are only sent if the Java app is a bundled application,with a {@code CFBundleDocumentTypes} array present in it's Info.plist.
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more @R_598_4045@ion about adding a {@code CFBundleDocumentTypes} key to your app's Info.plist.
*
* @param openFileHandler
* @since Java for Mac OS X 10.6 Update 3
* @since Java for Mac OS X 10.5 Update 8
*/
public void setopenFileHandler(final OpenFilesHandler openFileHandler) {
eventHandler.openFilesdispatcher.setHandler(openFileHandler);
}
项目:openjdk9
文件:DesktopPeer.java
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。