public class MetalFileChooserUI extends BasicFileChooserUI
Modifier and Type | Class and Description |
---|---|
protected class |
MetalFileChooserUI.DirectoryComboBoxAction
当DirectoryComboBox更改所选项目时使用。
|
protected class |
MetalFileChooserUI.DirectoryComboBoxModel
类型面部选择组合框的数据模型。
|
protected class |
MetalFileChooserUI.FileRenderer |
protected class |
MetalFileChooserUI.FilterComboBoxModel
类型面部选择组合框的数据模型。
|
class |
MetalFileChooserUI.FilterComboBoxRenderer
渲染不同类型的尺寸和样式。
|
protected class |
MetalFileChooserUI.SingleClickListener |
BasicFileChooserUI.AcceptAllFileFilter, BasicFileChooserUI.ApproveSelectionAction, BasicFileChooserUI.BasicFileView, BasicFileChooserUI.CancelSelectionAction, BasicFileChooserUI.ChangeToParentDirectoryAction, BasicFileChooserUI.DoubleClickListener, BasicFileChooserUI.GoHomeAction, BasicFileChooserUI.NewFolderAction, BasicFileChooserUI.SelectionListener, BasicFileChooserUI.UpdateAction
cancelButtonMnemonic, cancelButtonText, cancelButtonToolTipText, computerIcon, detailsViewIcon, directoryIcon, directoryOpenButtonMnemonic, directoryOpenButtonText, directoryOpenButtonToolTipText, fileIcon, floppyDriveIcon, hardDriveIcon, helpButtonMnemonic, helpButtonText, helpButtonToolTipText, homeFolderIcon, listViewIcon, newFolderIcon, openButtonMnemonic, openButtonText, openButtonToolTipText, saveButtonMnemonic, saveButtonText, saveButtonToolTipText, updateButtonMnemonic, updateButtonText, updateButtonToolTipText, upFolderIcon, viewMenuIcon
Constructor and Description |
---|
MetalFileChooserUI(JFileChooser filechooser) |
clearIconCache, createDoubleClickListener, createModel, getAcceptAllFileFilter, getAccessoryPanel, getApproveButtonMnemonic, getApproveButtonText, getApproveButtonToolTipText, getApproveSelectionAction, getCancelSelectionAction, getChangeToParentDirectoryAction, getDefaultButton, getDialogTitle, getDirectory, getFileChooser, getFileView, getGoHomeAction, getModel, getNewFolderAction, getUpdateAction, installDefaults, installIcons, isDirectorySelected, setDirectory, uninstallDefaults, uninstallIcons, uninstallListeners, uninstallStrings
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, paint, update
public MetalFileChooserUI(JFileChooser filechooser)
public static ComponentUI createUI(JComponent c)
public void installUI(JComponent c)
ComponentUI
ComponentUI
实例作为指定组件上的UI委托时,将调用此方法。
该方法应该完全配置组件的外观,包括以下内容:
LayoutManager
上安装LayoutManager。 PropertyChangeListener
上创建/安装PropertyChangeListener,以便适当地检测和响应组件属性更改。 installUI
在
BasicFileChooserUI
类
c
- 正在安装此UI代理的组件
ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallComponents(JFileChooser fc)
public void installComponents(JFileChooser fc)
protected JPanel getButtonPanel()
protected JPanel getBottomPanel()
protected void installStrings(JFileChooser fc)
protected void installListeners(JFileChooser fc)
protected ActionMap getActionMap()
protected ActionMap createActionMap()
protected JPanel createList(JFileChooser fc)
protected JPanel createDetailsView(JFileChooser fc)
public ListSelectionListener createListSelectionListener(JFileChooser fc)
createListSelectionListener
在
BasicFileChooserUI
fc
- a
JFileChooser
ListSelectionListener
public void uninstallUI(JComponent c)
ComponentUI
installUI
上完成的installUI
。
当将此UIComponent
实例作为指定组件的UI委托删除时,将调用此方法。
该方法应该撤消在installUI中执行的installUI
,小心使JComponent
实例处于干净状态(无外部侦听器,外观特定属性对象等)。
这应该包括以下内容:
uninstallUI
在
BasicFileChooserUI
类
c
- 正在删除此UI代理的组件;
这个参数经常被忽略,但如果UI对象是无状态的并且被多个组件共享,则可能会被使用
ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
public Dimension getPreferredSize(JComponent c)
JFileChooser
。
优选尺寸至少与高度和宽度一样大,如文件选择器布局管理器推荐的首选尺寸。
getPreferredSize
在
ComponentUI
类
c
- a
JFileChooser
Dimension
指定文件选择器的首选宽度和高度
JComponent.getPreferredSize()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension getMinimumSize(JComponent c)
JFileChooser
的最小大小。
getMinimumSize
在
ComponentUI
c
- a
JFileChooser
Dimension
指定文件选择器的最小宽度和高度
JComponent.getMinimumSize()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
ComponentUI.getPreferredSize(javax.swing.JComponent)
public Dimension getMaximumSize(JComponent c)
JFileChooser
的最大大小。
getMaximumSize
在
ComponentUI
c
- a
JFileChooser
Dimension
指定文件选择器的最大宽度和高度
JComponent.getMaximumSize()
,
LayoutManager2.maximumLayoutSize(java.awt.Container)
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
protected void removeControlButtons()
protected void addControlButtons()
public void ensureFileIsVisible(JFileChooser fc, File f)
public void rescanCurrentDirectory(JFileChooser fc)
public String getFileName()
public void setFileName(String filename)
protected void setDirectorySelected(boolean directorySelected)
setDirectorySelected
在
BasicFileChooserUI
类
directorySelected
- 如果当前选择一个目录。
public String getDirectoryName()
public void setDirectoryName(String dirname)
protected javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxRenderer createDirectoryComboBoxRenderer(JFileChooser fc)
protected MetalFileChooserUI.DirectoryComboBoxModel createDirectoryComboBoxModel(JFileChooser fc)
protected MetalFileChooserUI.FilterComboBoxRenderer createFilterComboBoxRenderer()
protected MetalFileChooserUI.FilterComboBoxModel createFilterComboBoxModel()
public void valueChanged(ListSelectionEvent e)
protected JButton getApproveButton(JFileChooser fc)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.