- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.FileChooserUI
-
- javax.swing.plaf.basic.BasicFileChooserUI
-
- 已知直接子类:
-
MetalFileChooserUI
public class BasicFileChooserUI extends FileChooserUI
FileChooser的基本L&F实现。
-
-
嵌套类汇总
嵌套类 变量和类型 类 描述 protected classBasicFileChooserUI.AcceptAllFileFilter接受所有文件过滤器。protected classBasicFileChooserUI.ApproveSelectionAction响应打开或保存请求protected classBasicFileChooserUI.BasicFileView基本文件视图。protected classBasicFileChooserUI.CancelSelectionAction回复取消请求。protected classBasicFileChooserUI.ChangeToParentDirectoryAction更改为父目录操作。protected classBasicFileChooserUI.DoubleClickListener双击监听器。protected classBasicFileChooserUI.GoHomeAction对“主页”键事件或同等事件采取行动。protected classBasicFileChooserUI.NewFolderAction创建一个新文件夹。protected classBasicFileChooserUI.SelectionListener选择监听器。protected classBasicFileChooserUI.UpdateAction重新扫描当前目录中的文件
-
字段汇总
字段 变量和类型 字段 描述 protected intcancelButtonMnemonic取消按钮助记符protected StringcancelButtonText取消按钮文字protected StringcancelButtonToolTipText取消按钮工具提示文字protected IconcomputerIcon计算机图标protected IcondetailsViewIcon详细信息视图图标protected IcondirectoryIcon目录图标protected intdirectoryOpenButtonMnemonic当选择目录并且当前选择模式为FILES_ONLY时,用于批准按钮的助记键代码。protected StringdirectoryOpenButtonText选择目录并且当前选择模式为FILES_ONLY时,批准按钮上显示标签文本。protected StringdirectoryOpenButtonToolTipText选择目录并且当前选择模式为FILES_ONLY时,批准按钮上显示工具提示文本。protected IconfileIcon文件图标protected IconfloppyDriveIcon软盘驱动器图标protected IconhardDriveIcon硬盘图标protected inthelpButtonMnemonic帮助按钮助记符protected StringhelpButtonText帮助按钮文字protected StringhelpButtonToolTipText帮助按钮工具提示文字protected IconhomeFolderIcon主文件夹图标protected IconlistViewIcon列表视图图标protected IconnewFolderIcon新文件夹图标protected intopenButtonMnemonic打开按钮助记符protected StringopenButtonText打开按钮文本protected StringopenButtonToolTipText打开按钮工具提示文本protected intsaveButtonMnemonic保存按钮助记符protected StringsaveButtonText保存按钮文字protected StringsaveButtonToolTipText保存按钮工具提示文本protected intupdateButtonMnemonic更新按钮助记符protected StringupdateButtonText更新按钮文字protected StringupdateButtonToolTipText更新按钮工具提示文本protected IconupFolderIcon向上文件夹图标protected IconviewMenuIcon查看菜单图标
-
构造方法摘要
构造方法 构造器 描述 BasicFileChooserUI(JFileChooser b)构造一个BasicFileChooserUI。
-
方法摘要
-
声明方法的类 javax.swing.plaf.FileChooserUI
ensureFileIsVisible, getApproveButtonText, getDefaultButton, getFileView, rescanCurrentDirectory
-
声明方法的类 javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
-
-
-
-
字段详细信息
-
directoryIcon
protected Icon directoryIcon
目录图标
-
fileIcon
protected Icon fileIcon
文件图标
-
computerIcon
protected Icon computerIcon
计算机图标
-
hardDriveIcon
protected Icon hardDriveIcon
硬盘图标
-
floppyDriveIcon
protected Icon floppyDriveIcon
软盘驱动器图标
-
newFolderIcon
protected Icon newFolderIcon
新文件夹图标
-
upFolderIcon
protected Icon upFolderIcon
向上文件夹图标
-
homeFolderIcon
protected Icon homeFolderIcon
主文件夹图标
-
listViewIcon
protected Icon listViewIcon
列表视图图标
-
detailsViewIcon
protected Icon detailsViewIcon
详细信息视图图标
-
viewMenuIcon
protected Icon viewMenuIcon
查看菜单图标
-
saveButtonMnemonic
protected int saveButtonMnemonic
保存按钮助记符
-
openButtonMnemonic
protected int openButtonMnemonic
打开按钮助记符
-
cancelButtonMnemonic
protected int cancelButtonMnemonic
取消按钮助记符
-
updateButtonMnemonic
protected int updateButtonMnemonic
更新按钮助记符
-
helpButtonMnemonic
protected int helpButtonMnemonic
帮助按钮助记符
-
directoryOpenButtonMnemonic
protected int directoryOpenButtonMnemonic
当选择目录并且当前选择模式为FILES_ONLY时,用于批准按钮的助记键代码。- 从以下版本开始:
- 1.4
-
saveButtonText
protected String saveButtonText
保存按钮文字
-
openButtonText
protected String openButtonText
打开按钮文本
-
cancelButtonText
protected String cancelButtonText
取消按钮文字
-
updateButtonText
protected String updateButtonText
更新按钮文字
-
helpButtonText
protected String helpButtonText
帮助按钮文字
-
directoryOpenButtonText
protected String directoryOpenButtonText
选择目录并且当前选择模式为FILES_ONLY时,批准按钮上显示标签文本。- 从以下版本开始:
- 1.4
-
saveButtonToolTipText
protected String saveButtonToolTipText
保存按钮工具提示文本
-
openButtonToolTipText
protected String openButtonToolTipText
打开按钮工具提示文本
-
cancelButtonToolTipText
protected String cancelButtonToolTipText
取消按钮工具提示文字
-
updateButtonToolTipText
protected String updateButtonToolTipText
更新按钮工具提示文本
-
helpButtonToolTipText
protected String helpButtonToolTipText
帮助按钮工具提示文字
-
directoryOpenButtonToolTipText
protected String directoryOpenButtonToolTipText
选择目录并且当前选择模式为FILES_ONLY时,批准按钮上显示工具提示文本。- 从以下版本开始:
- 1.4
-
-
构造方法详细信息
-
BasicFileChooserUI
public BasicFileChooserUI(JFileChooser b)
构造一个BasicFileChooserUI。- 参数
-
b- 文件选择器
-
-
方法详细信息
-
createUI
public static ComponentUI createUI(JComponent c)
为指定的组件创建BasicFileChooserUI实现。 默认情况下,BasicLookAndFeel类使用所有基本UI类的createUI方法来实例化UI。- 参数
-
c- 需要UI的JFileChooser - 结果
-
BasicFileChooserUI对象 - 从以下版本开始:
- 1.7
- 另请参见:
-
UIDefaults.getUI(JComponent)
-
installUI
public void installUI(JComponent c)
安装UI。
-
uninstallUI
public void uninstallUI(JComponent c)
卸载UI。- 重写:
-
uninstallUI类ComponentUI - 参数
-
c- 组件 - 另请参见:
-
ComponentUI.installUI(javax.swing.JComponent),JComponent.updateUI()
-
installComponents
public void installComponents(JFileChooser fc)
安装组件。- 参数
-
fc- 文件选择器
-
uninstallComponents
public void uninstallComponents(JFileChooser fc)
卸载组件。- 参数
-
fc- 文件选择器
-
installListeners
protected void installListeners(JFileChooser fc)
安装监听器。- 参数
-
fc- 文件选择器
-
uninstallListeners
protected void uninstallListeners(JFileChooser fc)
卸载侦听器。- 参数
-
fc- 文件选择器
-
installDefaults
protected void installDefaults(JFileChooser fc)
安装默认值。- 参数
-
fc- 文件选择器
-
installIcons
protected void installIcons(JFileChooser fc)
安装图标。- 参数
-
fc- 文件选择器
-
installStrings
protected void installStrings(JFileChooser fc)
安装字符串。- 参数
-
fc- 文件选择器
-
uninstallDefaults
protected void uninstallDefaults(JFileChooser fc)
卸载默认值。- 参数
-
fc- 文件选择器
-
uninstallIcons
protected void uninstallIcons(JFileChooser fc)
卸载图标。- 参数
-
fc- 文件选择器
-
uninstallStrings
protected void uninstallStrings(JFileChooser fc)
卸载字符串。- 参数
-
fc- 文件选择器
-
createModel
protected void createModel()
创建模型。
-
getModel
public BasicDirectoryModel getModel()
返回模型。- 结果
- 该模型
-
createPropertyChangeListener
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
创建属性更改侦听器。- 参数
-
fc- 文件选择器 - 结果
- 属性改变监听器
-
getFileName
public String getFileName()
返回文件名。- 结果
- 文件名
-
getDirectoryName
public String getDirectoryName()
返回目录名称。- 结果
- 目录名称
-
setFileName
public void setFileName(String filename)
设置文件名。- 参数
-
filename- 文件名
-
setDirectoryName
public void setDirectoryName(String dirname)
设置目录名称。- 参数
-
dirname- 文件名
-
getFileChooser
public JFileChooser getFileChooser()
返回文件选择器。- 结果
- 文件选择器
-
getAccessoryPanel
public JPanel getAccessoryPanel()
返回附件面板。- 结果
- 配件面板
-
getApproveButton
protected JButton getApproveButton(JFileChooser fc)
返回批准按钮。- 参数
-
fc- 文件选择器 - 结果
- 批准按钮
-
getApproveButtonToolTipText
public String getApproveButtonToolTipText(JFileChooser fc)
返回批准按钮工具提示。- 参数
-
fc- 文件选择器 - 结果
- 批准按钮工具提示
-
clearIconCache
public void clearIconCache()
清除图标缓存。
-
createDoubleClickListener
protected MouseListener createDoubleClickListener(JFileChooser fc, JList<?> list)
创建双击侦听器。- 参数
-
fc- 文件选择器 -
list- 该清单 - 结果
- 双击监听器
-
createListSelectionListener
public ListSelectionListener createListSelectionListener(JFileChooser fc)
创建列表选择侦听器。- 参数
-
fc- 文件选择器 - 结果
- 列表选择监听器
-
isDirectorySelected
protected boolean isDirectorySelected()
要记住UI中当前是否选择了目录的属性。- 结果
-
trueiff当前选择了一个目录。 - 从以下版本开始:
- 1.4
-
setDirectorySelected
protected void setDirectorySelected(boolean b)
要记住UI中当前是否选择了目录的属性。 这通常由UI在选择事件上调用。- 参数
-
b- 如果当前选择了目录。 - 从以下版本开始:
- 1.4
-
getDirectory
protected File getDirectory()
要记住UI中当前选定的目录的属性。- 结果
-
directory属性的值 - 从以下版本开始:
- 1.4
- 另请参见:
-
setDirectory(java.io.File)
-
setDirectory
protected void setDirectory(File f)
要记住UI中当前选定的目录的属性。 这通常由UI在选择事件上调用。- 参数
-
f- 表示当前所选目录的File对象 - 从以下版本开始:
- 1.4
-
getAcceptAllFileFilter
public FileFilter getAcceptAllFileFilter(JFileChooser fc)
返回默认的accept all文件过滤器- Specified by:
-
getAcceptAllFileFilter在类FileChooserUI - 参数
-
fc- 文件选择器 - 结果
- 一个accept-all文件过滤器
-
getDialogTitle
public String getDialogTitle(JFileChooser fc)
返回此对话框的标题- Specified by:
-
getDialogTitle,类FileChooserUI - 参数
-
fc- 文件选择器 - 结果
- 这个对话框的标题
-
getApproveButtonMnemonic
public int getApproveButtonMnemonic(JFileChooser fc)
返回批准按钮助记符。- 参数
-
fc- 文件选择器 - 结果
- 批准按钮助记符
-
getNewFolderAction
public Action getNewFolderAction()
返回一个新的文件夹操作。- 结果
- 一个新的文件夹操作
-
getGoHomeAction
public Action getGoHomeAction()
返回回家动作。- 结果
- 一个回家的行动
-
getChangeToParentDirectoryAction
public Action getChangeToParentDirectoryAction()
返回对父目录操作的更改。- 结果
- 对父目录操作的更改
-
getApproveSelectionAction
public Action getApproveSelectionAction()
返回批准选择操作。- 结果
- 批准选择行动
-
getCancelSelectionAction
public Action getCancelSelectionAction()
返回取消选择操作。- 结果
- 取消选择操作
-
getUpdateAction
public Action getUpdateAction()
返回更新操作。- 结果
- an update action
-
-