public class BasicFileChooserUI extends FileChooserUI
Modifier and Type | Class and Description |
---|---|
protected class |
BasicFileChooserUI.AcceptAllFileFilter |
protected class |
BasicFileChooserUI.ApproveSelectionAction
Responds to an Open or Save request
|
protected class |
BasicFileChooserUI.BasicFileView |
protected class |
BasicFileChooserUI.CancelSelectionAction
Responds to a cancel request.
|
protected class |
BasicFileChooserUI.ChangeToParentDirectoryAction |
protected class |
BasicFileChooserUI.DoubleClickListener |
protected class |
BasicFileChooserUI.GoHomeAction
Acts on the "home" key event or equivalent event.
|
protected class |
BasicFileChooserUI.NewFolderAction
Creates a new folder.
|
protected class |
BasicFileChooserUI.SelectionListener |
protected class |
BasicFileChooserUI.UpdateAction
Rescans the files in the current directory
|
Modifier and Type | Field and Description |
---|---|
protected int |
cancelButtonMnemonic |
protected String |
cancelButtonText |
protected String |
cancelButtonToolTipText |
protected Icon |
computerIcon |
protected Icon |
detailsViewIcon |
protected Icon |
directoryIcon |
protected int |
directoryOpenButtonMnemonic
The mnemonic keycode used for the approve button when a directory
is selected and the current selection mode is FILES_ONLY.
|
protected String |
directoryOpenButtonText
The label text displayed on the approve button when a directory
is selected and the current selection mode is FILES_ONLY.
|
protected String |
directoryOpenButtonToolTipText
The tooltip text displayed on the approve button when a directory
is selected and the current selection mode is FILES_ONLY.
|
protected Icon |
fileIcon |
protected Icon |
floppyDriveIcon |
protected Icon |
hardDriveIcon |
protected int |
helpButtonMnemonic |
protected String |
helpButtonText |
protected String |
helpButtonToolTipText |
protected Icon |
homeFolderIcon |
protected Icon |
listViewIcon |
protected Icon |
newFolderIcon |
protected int |
openButtonMnemonic |
protected String |
openButtonText |
protected String |
openButtonToolTipText |
protected int |
saveButtonMnemonic |
protected String |
saveButtonText |
protected String |
saveButtonToolTipText |
protected int |
updateButtonMnemonic |
protected String |
updateButtonText |
protected String |
updateButtonToolTipText |
protected Icon |
upFolderIcon |
protected Icon |
viewMenuIcon |
Constructor and Description |
---|
BasicFileChooserUI(JFileChooser b) |
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
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 Icon viewMenuIcon
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 static ComponentUI createUI(JComponent c)
BasicFileChooserUI
implementation
for the specified component. By default
the BasicLookAndFeel
class uses
createUI
methods of all basic UIs classes
to instantiate UIs.c
- the JFileChooser
which needs a UIBasicFileChooserUI
objectUIDefaults.getUI(JComponent)
public void installUI(JComponent c)
ComponentUI
ComponentUI
instance is being installed
as the UI delegate on the specified component. This method should
completely configure the component for the look and feel,
including the following:
LayoutManager
on the component if necessary.
PropertyChangeListener
on the component in order
to detect and respond to component property changes appropriately.
installUI
in class ComponentUI
c
- the component where this UI delegate is being installedComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
ComponentUI
installUI
. This method is invoked when this
UIComponent
instance is being removed as the UI delegate
for the specified component. This method should undo the
configuration performed in installUI
, being careful to
leave the JComponent
instance in a clean state (no
extraneous listeners, look-and-feel-specific property objects, etc.).
This should include the following:
uninstallUI
in class ComponentUI
c
- the component from which this UI delegate is being removed;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple componentsComponentUI.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)
public void rescanCurrentDirectory(JFileChooser fc)
rescanCurrentDirectory
in class FileChooserUI
public void ensureFileIsVisible(JFileChooser fc, File f)
ensureFileIsVisible
in class FileChooserUI
public JFileChooser getFileChooser()
public JPanel getAccessoryPanel()
protected JButton getApproveButton(JFileChooser fc)
public JButton getDefaultButton(JFileChooser fc)
FileChooserUI
LookAndFeel
.
JFileChooser
will use this button as default button
for dialog windows.getDefaultButton
in class FileChooserUI
public String getApproveButtonToolTipText(JFileChooser fc)
public void clearIconCache()
protected MouseListener createDoubleClickListener(JFileChooser fc, JList list)
public ListSelectionListener createListSelectionListener(JFileChooser fc)
protected boolean isDirectorySelected()
true
iff a directory is currently selected.protected void setDirectorySelected(boolean b)
b
- iff a directory is currently selected.protected File getDirectory()
directory
propertysetDirectory(java.io.File)
protected void setDirectory(File f)
f
- the File
object representing the directory that is
currently selectedpublic FileFilter getAcceptAllFileFilter(JFileChooser fc)
getAcceptAllFileFilter
in class FileChooserUI
public FileView getFileView(JFileChooser fc)
getFileView
in class FileChooserUI
public String getDialogTitle(JFileChooser fc)
getDialogTitle
in class FileChooserUI
public int getApproveButtonMnemonic(JFileChooser fc)
public String getApproveButtonText(JFileChooser fc)
getApproveButtonText
in class FileChooserUI
public Action getNewFolderAction()
public Action getGoHomeAction()
public Action getChangeToParentDirectoryAction()
public Action getApproveSelectionAction()
public Action getCancelSelectionAction()
public Action getUpdateAction()
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, 2018, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.