java.lang.Object javax.swing.plaf.ComponentUI javax.swing.plaf.FileChooserUI javax.swing.plaf.basic.BasicFileChooserUI
public class BasicFileChooserUI
FileChooser 的基本 L&F 实现。
嵌套类摘要 | |
---|---|
protected class |
BasicFileChooserUI.AcceptAllFileFilter |
protected class |
BasicFileChooserUI.ApproveSelectionAction 响应 Open 或 Save 请求 |
protected class |
BasicFileChooserUI.BasicFileView |
protected class |
BasicFileChooserUI.CancelSelectionAction 响应取消请求。 |
protected class |
BasicFileChooserUI.ChangeToParentDirectoryAction |
protected class |
BasicFileChooserUI.DoubleClickListener |
protected class |
BasicFileChooserUI.GoHomeAction 基于“Home”键事件或等效事件的动作。 |
protected class |
BasicFileChooserUI.NewFolderAction 创建新文件夹。 |
protected class |
BasicFileChooserUI.SelectionListener |
protected class |
BasicFileChooserUI.UpdateAction 重新扫描当前目录中的文件。 |
构造方法摘要 | |
---|---|
BasicFileChooserUI(JFileChooser b) |
从类 javax.swing.plaf.ComponentUI 继承的方法 |
---|
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段详细信息 |
---|
protected Icon directoryIcon
protected Icon fileIcon
protected Icon computerIcon
protected Icon hardDriveIcon
protected Icon floppyDriveIcon
protected Icon newFolderIcon
protected Icon upFolderIcon
protected Icon homeFolderIcon
protected Icon listViewIcon
protected Icon detailsViewIcon
protected int saveButtonMnemonic
protected int openButtonMnemonic
protected int cancelButtonMnemonic
protected int updateButtonMnemonic
protected int helpButtonMnemonic
protected int directoryOpenButtonMnemonic
protected String saveButtonText
protected String openButtonText
protected String cancelButtonText
protected String updateButtonText
protected String helpButtonText
protected String directoryOpenButtonText
protected String saveButtonToolTipText
protected String openButtonToolTipText
protected String cancelButtonToolTipText
protected String updateButtonToolTipText
protected String helpButtonToolTipText
protected String directoryOpenButtonToolTipText
构造方法详细信息 |
---|
public BasicFileChooserUI(JFileChooser b)
方法详细信息 |
---|
public void installUI(JComponent c)
ComponentUI
复制的描述
ComponentUI
实例将作为 UI 委托安装在指定组件上时,可调用此方法。此方法应该为外观完整地配置组件,包括以下方面:
LayoutManager
。 PropertyChangeListener
。
ComponentUI
中的
installUI
c
- 将安装此 UI 委托的组件
ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
ComponentUI
复制的描述
installUI
期间,在指定组件上反向执行的配置操作。当此
UIComponent
实例将作为 UI 委托从指定组件上移除时,可调用此方法。此方法应该取消在
installUI
中执行的配置操作,非常小心地使
JComponent
实例处于某种洁净状态(没有额外的侦听器、没有特定于外观的属性对象等等)。配置内容应该包括以下方面:
ComponentUI
中的
uninstallUI
c
- 从中移除此 UI 委托的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数
ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
public void installComponents(JFileChooser fc)
public void uninstallComponents(JFileChooser fc)
protected void installListeners(JFileChooser fc)
protected void uninstallListeners(JFileChooser fc)
protected void installDefaults(JFileChooser fc)
protected void installIcons(JFileChooser fc)
protected void installStrings(JFileChooser fc)
protected void uninstallDefaults(JFileChooser fc)
protected void uninstallIcons(JFileChooser fc)
protected void uninstallStrings(JFileChooser fc)
protected void createModel()
public BasicDirectoryModel getModel()
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
public String getFileName()
public String getDirectoryName()
public void setFileName(String filename)
public void setDirectoryName(String dirname)
pub