Java CefRunFileDialogCallback类使用实例

发布时间:2025-12-09 11:51:27 浏览次数:1

实例1: runFileDialog

import org.cef.callback.CefRunFileDialogCallback; //导入依赖的package包/类@Overridepublic void runFileDialog(FileDialogMode mode, String title, String defaultFilePath, Vector<String> acceptFilters, int selectedAcceptFilter, CefRunFileDialogCallback callback) {    try {        N_RunFileDialog(mode, title, defaultFilePath, acceptFilters, selectedAcceptFilter, callback);    } catch (UnsatisfiedLinkError ule) {        ule.printStackTrace();    }} 

实例2: runFileDialog

import org.cef.callback.CefRunFileDialogCallback; //导入依赖的package包/类@Overridepublic void runFileDialog(FileDialogMode mode,                          String title,                          String defaultFilePath,                          Vector<String> acceptFilters,                          int selectedAcceptFilter,                          CefRunFileDialogCallback callback) {  try {    N_RunFileDialog(mode, title, defaultFilePath, acceptFilters, selectedAcceptFilter, callback);  } catch (UnsatisfiedLinkError ule) {    ule.printStackTrace();  }} 

实例3: runFileDialog

import org.cef.callback.CefRunFileDialogCallback; //导入依赖的package包/类@Overridepublic void runFileDialog(FileDialogMode mode,                  String title,                   String defaultFileName,                   Vector<String> acceptTypes,                  CefRunFileDialogCallback callback) {try {N_RunFileDialog(mode, title, defaultFileName, acceptTypes, callback);} catch (UnsatisfiedLinkError ule) {ule.printStackTrace();}} 

实例4: N_RunFileDialog

import org.cef.callback.CefRunFileDialogCallback; //导入依赖的package包/类private final native void N_RunFileDialog(FileDialogMode mode,String title,String defaultFilePath,Vector<String> acceptFilters,int selectedAcceptFilter,CefRunFileDialogCallback callback); 

实例5: runFileDialog

import org.cef.callback.CefRunFileDialogCallback; //导入依赖的package包/类/** * Call to run a file chooser dialog. Only a single file chooser dialog may be * pending at any given time.The dialog will be initiated asynchronously on * the UI thread. *  * @param mode represents the type of dialog to display. * @param title  to be used for the dialog and may be empty to show the * default title ("Open" or "Save" depending on the mode). * @param defaultFilePath is the path with optional directory and/or file name * component that should be initially selected in the dialog. * @param acceptFilters are used to restrict the selectable file types and may * any combination of (a) valid lower-cased MIME types (e.g. "text/*" or * "image/*"), (b) inpidual file extensions (e.g. ".txt" or ".png"), or (c) * combined description and file extension delimited using "|" and ";" (e.g. * "Image Types|.png;.gif;.jpg"). * @param selectedAcceptFilter is the 0-based index of the filter that should * be selected by default. * @param callback will be executed after the dialog is dismissed or  * immediately if another dialog is already pending. */public void runFileDialog(FileDialogMode mode,                          String title,                          String defaultFilePath,                          Vector<String> acceptFilters,                          int selectedAcceptFilter,                          CefRunFileDialogCallback callback); 
cefrun
需要做网站?需要网络推广?欢迎咨询客户经理 13272073477