public class MetalFileChooserUI extends BasicFileChooserUI
Modifier and Type | Class and Description |
---|---|
protected class |
MetalFileChooserUI.DirectoryComboBoxAction
Acts when DirectoryComboBox has changed the selected item.
|
protected class |
MetalFileChooserUI.DirectoryComboBoxModel
Data model for a type-face selection combo-box.
|
protected class |
MetalFileChooserUI.FileRenderer
Obsolete class, not used in this version.
|
protected class |
MetalFileChooserUI.FilterComboBoxModel
Data model for a type-face selection combo-box.
|
class |
MetalFileChooserUI.FilterComboBoxRenderer
Render different type sizes and styles.
|
protected class |
MetalFileChooserUI.SingleClickListener
Obsolete class, not used in this version.
|
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)
Constructs a new instance of
MetalFileChooserUI . |
Modifier and Type | Method and Description |
---|---|
protected void |
addControlButtons()
Adds control buttons to bottom panel.
|
protected ActionMap |
createActionMap()
Constructs an instance of
ActionMap . |
protected JPanel |
createDetailsView(JFileChooser fc)
Constructs a details view.
|
protected MetalFileChooserUI.DirectoryComboBoxModel |
createDirectoryComboBoxModel(JFileChooser fc)
Constructs a new instance of
DataModel for DirectoryComboBox . |
protected javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxRenderer |
createDirectoryComboBoxRenderer(JFileChooser fc)
Constructs a new instance of
DirectoryComboBoxRenderer . |
protected MetalFileChooserUI.FilterComboBoxModel |
createFilterComboBoxModel()
Constructs a
DataModel for types ComboBox . |
protected MetalFileChooserUI.FilterComboBoxRenderer |
createFilterComboBoxRenderer()
Constructs a
Renderer for types ComboBox . |
protected JPanel |
createList(JFileChooser fc)
Constructs a details view.
|
ListSelectionListener |
createListSelectionListener(JFileChooser fc)
Creates a selection listener for the list of files and directories.
|
PropertyChangeListener |
createPropertyChangeListener(JFileChooser fc)
Creates the property change listener.
|
static ComponentUI |
createUI(JComponent c)
Constructs a new instance of
MetalFileChooserUI . |
void |
ensureFileIsVisible(JFileChooser fc,
File f)
Ensure the file in question is visible.
|
protected ActionMap |
getActionMap()
Returns an instance of
ActionMap . |
protected JButton |
getApproveButton(JFileChooser fc)
Returns the approve button.
|
protected JPanel |
getBottomPanel()
Returns the bottom panel.
|
protected JPanel |
getButtonPanel()
Returns the button panel.
|
String |
getDirectoryName()
Returns the directory name.
|
String |
getFileName()
Returns the file name.
|
Dimension |
getMaximumSize(JComponent c)
Returns the maximum size of the
JFileChooser . |
Dimension |
getMinimumSize(JComponent c)
Returns the minimum size of the
JFileChooser . |
Dimension |
getPreferredSize(JComponent c)
Returns the preferred size of the specified
JFileChooser . |
void |
installComponents(JFileChooser fc)
Installs the components.
|
protected void |
installListeners(JFileChooser fc)
Installs the listeners.
|
protected void |
installStrings(JFileChooser fc)
Installs the strings.
|
void |
installUI(JComponent c)
Installs the UI.
|
protected void |
removeControlButtons()
Removes control buttons from bottom panel.
|
void |
rescanCurrentDirectory(JFileChooser fc)
Rescan the current directory.
|
void |
setDirectoryName(String dirname)
Sets the directory name.
|
protected void |
setDirectorySelected(boolean directorySelected)
Property to remember whether a directory is currently selected in the UI.
|
void |
setFileName(String filename)
Sets the file name.
|
void |
uninstallComponents(JFileChooser fc)
Uninstalls the components.
|
void |
uninstallUI(JComponent c)
Uninstalls the UI.
|
void |
valueChanged(ListSelectionEvent e)
Invokes when
ListSelectionEvent occurs. |
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)
MetalFileChooserUI
.filechooser
- a JFileChooser
public static ComponentUI createUI(JComponent c)
MetalFileChooserUI
.c
- a componentMetalFileChooserUI
public void installUI(JComponent c)
BasicFileChooserUI
installUI
in class BasicFileChooserUI
c
- the componentComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallComponents(JFileChooser fc)
BasicFileChooserUI
uninstallComponents
in class BasicFileChooserUI
fc
- the file chooserpublic void installComponents(JFileChooser fc)
BasicFileChooserUI
installComponents
in class BasicFileChooserUI
fc
- the file chooserprotected JPanel getButtonPanel()
protected JPanel getBottomPanel()
protected void installStrings(JFileChooser fc)
BasicFileChooserUI
installStrings
in class BasicFileChooserUI
fc
- the file chooserprotected void installListeners(JFileChooser fc)
BasicFileChooserUI
installListeners
in class BasicFileChooserUI
fc
- the file chooserprotected ActionMap getActionMap()
ActionMap
.ActionMap
protected ActionMap createActionMap()
ActionMap
.ActionMap
protected JPanel createList(JFileChooser fc)
fc
- a JFileChooser
protected JPanel createDetailsView(JFileChooser fc)
fc
- a JFileChooser
public ListSelectionListener createListSelectionListener(JFileChooser fc)
createListSelectionListener
in class BasicFileChooserUI
fc
- a JFileChooser
ListSelectionListener
public void uninstallUI(JComponent c)
BasicFileChooserUI
uninstallUI
in class BasicFileChooserUI
c
- the componentComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
public Dimension getPreferredSize(JComponent c)
JFileChooser
.
The preferred size is at least as large,
in both height and width,
as the preferred size recommended
by the file chooser's layout manager.getPreferredSize
in class ComponentUI
c
- a JFileChooser
Dimension
specifying the preferred
width and height of the file chooserJComponent.getPreferredSize()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension getMinimumSize(JComponent c)
JFileChooser
.getMinimumSize
in class ComponentUI
c
- a JFileChooser
Dimension
specifying the minimum
width and height of the file chooserJComponent.getMinimumSize()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
ComponentUI.getPreferredSize(javax.swing.JComponent)
public Dimension getMaximumSize(JComponent c)
JFileChooser
.getMaximumSize
in class ComponentUI
c
- a JFileChooser
Dimension
specifying the maximum
width and height of the file chooserJComponent.getMaximumSize()
,
LayoutManager2.maximumLayoutSize(java.awt.Container)
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
BasicFileChooserUI
createPropertyChangeListener
in class BasicFileChooserUI
fc
- the file chooserprotected void removeControlButtons()
protected void addControlButtons()
public void ensureFileIsVisible(JFileChooser fc, File f)
BasicFileChooserUI
ensureFileIsVisible
in class BasicFileChooserUI
fc
- the file chooserf
- the filepublic void rescanCurrentDirectory(JFileChooser fc)
BasicFileChooserUI
rescanCurrentDirectory
in class BasicFileChooserUI
fc
- the file chooserpublic String getFileName()
BasicFileChooserUI
getFileName
in class BasicFileChooserUI
public void setFileName(String filename)
BasicFileChooserUI
setFileName
in class BasicFileChooserUI
filename
- the file nameprotected void setDirectorySelected(boolean directorySelected)
setDirectorySelected
in class BasicFileChooserUI
directorySelected
- if a directory is currently selected.public String getDirectoryName()
getDirectoryName
in class BasicFileChooserUI
public void setDirectoryName(String dirname)
setDirectoryName
in class BasicFileChooserUI
dirname
- the directory nameprotected javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxRenderer createDirectoryComboBoxRenderer(JFileChooser fc)
DirectoryComboBoxRenderer
.fc
- a JFileChooser
DirectoryComboBoxRenderer
protected MetalFileChooserUI.DirectoryComboBoxModel createDirectoryComboBoxModel(JFileChooser fc)
DataModel
for DirectoryComboBox
.fc
- a JFileChooser
DataModel
for DirectoryComboBox
protected MetalFileChooserUI.FilterComboBoxRenderer createFilterComboBoxRenderer()
Renderer
for types ComboBox
.Renderer
for types ComboBox
protected MetalFileChooserUI.FilterComboBoxModel createFilterComboBoxModel()
DataModel
for types ComboBox
.DataModel
for types ComboBox
public void valueChanged(ListSelectionEvent e)
ListSelectionEvent
occurs.e
- an instance of ListSelectionEvent
protected JButton getApproveButton(JFileChooser fc)
BasicFileChooserUI
getApproveButton
in class BasicFileChooserUI
fc
- the file chooser 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, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-01-26-133437.ivan.openjdk9onspinwait