本文整理匯總了Java中java.awt.desktop.OpenFilesEvent類的典型用法代碼示例。如果您正苦於以下問題:Java OpenFilesEvent類的具體用法?Java OpenFilesEvent怎麽用?Java OpenFilesEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
OpenFilesEvent類屬於java.awt.desktop包,在下文中一共展示了OpenFilesEvent類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: performUsing
import java.awt.desktop.OpenFilesEvent; //導入依賴的package包/類
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));
}
示例2: openFiles
import java.awt.desktop.OpenFilesEvent; //導入依賴的package包/類
@Override
public void openFiles(OpenFilesEvent e) {
openFiles(e.getFiles());
}