public interface CefDialogHandler
限定符和类型 | 接口和说明 |
---|---|
static class |
CefDialogHandler.FileDialogMode
Supported file dialog modes.
支持文件对话框模式。 |
限定符和类型 | 方法和说明 |
---|---|
boolean |
onFileDialog(CefBrowser browser, CefDialogHandler.FileDialogMode mode, java.lang.String title, java.lang.String defaultFilePath, java.util.Vector<java.lang.String> acceptFilters, int selectedAcceptFilter, CefFileDialogCallback callback)
Called to run a file chooser dialog.
被调用以运行文件选择器对话框。 |
boolean onFileDialog(CefBrowser browser, CefDialogHandler.FileDialogMode mode, java.lang.String title, java.lang.String defaultFilePath, java.util.Vector<java.lang.String> acceptFilters, int selectedAcceptFilter, CefFileDialogCallback callback)
browser
-
-
mode
- represents the type of dialog to display.
- 表示要显示的对话框的类型。
title
- to be used for the dialog and may be empty to show the default title ("Open" or "Save" depending on the mode).
- 用于对话框,可以为空以显示默认标题(“打开”或“保存”,具体取决于模式)。
defaultFilePath
- is the path with optional directory and/or file name component that should be initially selected in the dialog.
- 是应在对话框中初始选择的带有可选目录和/或文件名组件的路径。
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) individual file extensions (e.g. ".txt" or ".png"), or (c) combined description and file extension delimited using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg").
- 用于限制可选文件类型,可以是(a)有效的低级MIME类型(例如“text / *”或“image / *”),(b)单个文件扩展名(例如“.txt”)的任意组合或“.png”),或(c)使用“|”分隔的组合描述和文件扩展名和“;” (例如“图像类型| .png; .gif; .jpg”)。
selectedAcceptFilter
- is the 0-based index of the filter that should be selected by default.
- 是默认情况下应选择的过滤器的从0开始的索引。
callback
- is a callback handler for handling own file dialogs.
- 是一个用于处理自己的文件对话框的回调处理程序。