java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.FileChooserUI
javax.swing.plaf.basic.BasicFileChooserUI
- 直接已知的子类:
-
MetalFileChooserUI
文件选择器的基本外观实现。
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class接受所有文件过滤器。protected class响应打开或保存请求。protected class基本文件视图。protected class响应取消请求。protected class切换到父目录操作。protected class双击监听器。protected class对“主页”键事件或等效事件进行操作。protected class创建新文件夹。protected class选择监听器。protected class重新扫描当前目录中的文件。 -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int取消按钮助记键。protected String取消按钮文本。protected String取消按钮工具提示文本。protected Icon计算机图标。protected Icon详细视图图标。protected Icon目录图标。protected int当选择模式为FILES_ONLY且选择了目录时,用于批准按钮的助记键代码。protected String当选择模式为FILES_ONLY且选择了目录时,显示在批准按钮上的标签文本。protected String当选择模式为FILES_ONLY且选择了目录时,显示在批准按钮上的工具提示文本。protected Icon文件图标。protected Icon软盘驱动器图标。protected Icon硬盘驱动器图标。protected int帮助按钮助记键。protected String帮助按钮文本。protected String帮助按钮工具提示文本。protected Icon主文件夹图标。protected Icon列表视图图标。protected Icon新建文件夹图标。protected int打开按钮助记键。protected String打开按钮文本。protected String打开按钮工具提示文本。protected int保存按钮助记键。protected String保存按钮文本。protected String保存按钮工具提示文本。protected int更新按钮助记键。protected String更新按钮文本。protected String更新按钮工具提示文本。protected Icon上级文件夹图标。protected Icon视图菜单图标。 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid清除图标缓存。protected MouseListenercreateDoubleClickListener(JFileChooser fc, JList<?> list) 创建双击监听器。创建列表选择监听器。protected void创建模型。创建属性更改监听器。static ComponentUI为指定组件创建BasicFileChooserUI实现。voidensureFileIsVisible(JFileChooser fc, File f) 确保所讨论的文件可见。返回默认的接受所有文件过滤器。返回附件面板。protected JButton返回批准按钮。int返回批准按钮助记键。返回批准按钮文本。返回批准按钮工具提示。返回批准选择操作。返回取消选择操作。返回切换到父目录操作。返回此对话框的标题。protected File用于记住当前在UI中选择的目录的属性。返回目录名称。返回文件选择器。返回文件名。返回文件视图。返回返回主目录操作。getModel()返回模型。返回新建文件夹操作。返回更新操作。void安装组件。protected void安装默认值。protected void安装图标。protected void安装监听器。protected void安装字符串。void安装UI。protected boolean用于记住当前在UI中选择的目录的属性。void重新扫描当前目录。protected voidsetDirectory(File f) 用于记住当前在UI中选择的目录的属性。voidsetDirectoryName(String dirname) 设置目录名称。protected voidsetDirectorySelected(boolean b) 用于记住当前在UI中选择的目录的属性。voidsetFileName(String filename) 设置文件名。void卸载组件。protected void卸载默认值。protected void卸载图标。protected void卸载监听器。protected void卸载字符串。void卸载UI。Methods declared in class javax.swing.plaf.FileChooserUI
getDefaultButtonMethods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
-
Field Details
-
directoryIcon
目录图标。 -
fileIcon
文件图标。 -
computerIcon
计算机图标。 -
hardDriveIcon
硬盘驱动器图标。 -
floppyDriveIcon
软盘驱动器图标。 -
newFolderIcon
新建文件夹图标。 -
upFolderIcon
上级文件夹图标。 -
homeFolderIcon
主文件夹图标。 -
listViewIcon
列表视图图标。 -
detailsViewIcon
详细视图图标。 -
viewMenuIcon
视图菜单图标。 -
saveButtonMnemonic
protected int saveButtonMnemonic保存按钮助记键。 -
openButtonMnemonic
protected int openButtonMnemonic打开按钮助记键。 -
cancelButtonMnemonic
protected int cancelButtonMnemonic取消按钮助记键。 -
updateButtonMnemonic
protected int updateButtonMnemonic更新按钮助记键。 -
helpButtonMnemonic
protected int helpButtonMnemonic当选择模式为FILES_ONLY且选择了目录时,用于批准按钮的助记键代码。 -
directoryOpenButtonMnemonic
protected int directoryOpenButtonMnemonicThe mnemonic keycode used for the approve button when a directory is selected and the current selection mode is FILES_ONLY.- 自1.4版本起:
- 1.4
-
saveButtonText
保存按钮文本。 -
openButtonText
打开按钮文本。 -
cancelButtonText
取消按钮文本。 -
updateButtonText
更新按钮文本。 -
helpButtonText
帮助按钮文本。 -
directoryOpenButtonText
当选择模式为FILES_ONLY且选择了目录时,显示在批准按钮上的标签文本。- 自1.4版本起:
- 1.4
-
saveButtonToolTipText
保存按钮工具提示文本。 -
openButtonToolTipText
打开按钮工具提示文本。 -
cancelButtonToolTipText
取消按钮工具提示文本。 -
updateButtonToolTipText
更新按钮工具提示文本。 -
helpButtonToolTipText
帮助按钮工具提示文本。 -
directoryOpenButtonToolTipText
当选择模式为FILES_ONLY且选择了目录时,显示在批准按钮上的工具提示文本。- 自1.4版本起:
- 1.4
-
-
Constructor Details
-
BasicFileChooserUI
构造一个BasicFileChooserUI。- 参数:
-
b- 文件选择器
-
-
Method Details
-
createUI
为指定组件创建BasicFileChooserUI实现。默认情况下,BasicLookAndFeel类使用所有基本UI类的createUI方法来实例化UI。- 参数:
-
c- 需要UI的JFileChooser - 返回:
-
BasicFileChooserUI对象 - 自1.7版本起:
- 1.7
- 参见:
-
installUI
安装UI。- 覆盖:
-
installUI在类ComponentUI中 - 参数:
-
c- 组件 - 参见:
-
uninstallUI
卸载UI。- 覆盖:
-
uninstallUI在类ComponentUI中 - 参数:
-
c- 组件 - 参见:
-
installComponents
安装组件。- 参数:
-
fc- 文件选择器
-
uninstallComponents
卸载组件。- 参数:
-
fc- 文件选择器
-
installListeners
安装监听器。- 参数:
-
fc- 文件选择器
-
uninstallListeners
卸载监听器。- 参数:
-
fc- 文件选择器
-
installDefaults
安装默认值。- 参数:
-
fc- 文件选择器
-
installIcons
安装图标。- 参数:
-
fc- 文件选择器
-
installStrings
安装字符串。- 参数:
-
fc- 文件选择器
-
uninstallDefaults
卸载默认值。- 参数:
-
fc- 文件选择器
-
uninstallIcons
卸载图标。- 参数:
-
fc- 文件选择器
-
uninstallStrings
卸载字符串。- 参数:
-
fc- 文件选择器
-
createModel
protected void createModel()创建模型。 -
getModel
返回模型。- 返回:
- 模型
-
createPropertyChangeListener
创建属性更改监听器。- 参数:
-
fc- 文件选择器 - 返回:
- 属性更改监听器
-
getFileName
返回文件名。- 返回:
- 文件名
-
getDirectoryName
返回目录名。- 返回:
- 目录名
-
setFileName
设置文件名。- 参数:
-
filename- 文件名
-
setDirectoryName
设置目录名。- 参数:
-
dirname- 文件名
-
rescanCurrentDirectory
重新扫描当前目录。- 指定者:
-
rescanCurrentDirectory在类FileChooserUI - 参数:
-
fc- 文件选择器
-
ensureFileIsVisible
确保所讨论的文件可见。- 指定者:
-
ensureFileIsVisible在类FileChooserUI - 参数:
-
fc- 文件选择器 -
f- 文件
-
getFileChooser
返回文件选择器。- 返回:
- 文件选择器
-
getAccessoryPanel
返回附件面板。- 返回:
- 附件面板
-
getApproveButton
返回确认按钮。- 参数:
-
fc- 文件选择器 - 返回:
- 确认按钮
-
getApproveButtonToolTipText
返回确认按钮工具提示。- 参数:
-
fc- 文件选择器 - 返回:
- 确认按钮工具提示
-
clearIconCache
public void clearIconCache()清除图标缓存。 -
createDoubleClickListener
创建双击监听器。- 参数:
-
fc- 文件选择器 -
list- 列表 - 返回:
- 双击监听器
-
createListSelectionListener
创建列表选择监听器。- 参数:
-
fc- 文件选择器 - 返回:
- 列表选择监听器
-
isDirectorySelected
protected boolean isDirectorySelected()属性,用于记住UI中当前是否选择了目录。- 返回:
-
true如果当前选择了目录。 - 自:
- 1.4
-
setDirectorySelected
protected void setDirectorySelected(boolean b) 属性,用于记住UI中当前是否选择了目录。通常在选择事件中由UI调用。- 参数:
-
b- 如果当前选择了目录。 - 自:
- 1.4
-
getDirectory
属性,用于记住UI中当前选择的目录。- 返回:
-
directory属性的值 - 自:
- 1.4
- 参见:
-
setDirectory
属性,用于记住UI中当前选择的目录。通常在选择事件中由UI调用。- 参数:
-
f- 表示当前选择的目录的File对象 - 自:
- 1.4
-
getAcceptAllFileFilter
返回默认接受所有文件过滤器- 指定者:
-
getAcceptAllFileFilter在类FileChooserUI - 参数:
-
fc- 文件选择器 - 返回:
- 一个接受所有文件的过滤器
-
getFileView
从类中复制的描述:FileChooserUI返回文件视图。- 指定者:
-
getFileView在类FileChooserUI - 参数:
-
fc- 文件选择器 - 返回:
- 一个文件视图
-
getDialogTitle
返回此对话框的标题- 指定者:
-
getDialogTitle在类FileChooserUI - 参数:
-
fc- 文件选择器 - 返回:
- 此对话框的标题
-
getApproveButtonMnemonic
返回确认按钮助记键。- 参数:
-
fc- 文件选择器 - 返回:
- 确认按钮助记键
-
getApproveButtonText
返回确认按钮文本。- 指定者:
-
getApproveButtonText在类FileChooserUI - 参数:
-
fc- 文件选择器 - 返回:
- 确认按钮文本
-
getNewFolderAction
返回新建文件夹操作。- 返回:
- 一个新建文件夹操作
-
getGoHomeAction
返回返回主目录操作。- 返回:
- 一个返回主目录操作
-
getChangeToParentDirectoryAction
返回返回父目录操作。- 返回:
- 一个返回父目录操作
-
getApproveSelectionAction
返回确认选择操作。- 返回:
- 一个确认选择操作
-
getCancelSelectionAction
返回取消选择操作。- 返回:
- 一个取消选择操作
-
getUpdateAction
返回更新操作。- 返回:
- 一个更新操作
-