MetalFileChooserUI
public class BasicFileChooserUI extends FileChooserUI
Modifier and Type | Class | Description |
---|---|---|
protected class |
BasicFileChooserUI.AcceptAllFileFilter |
Accept all file filter. |
protected class |
BasicFileChooserUI.ApproveSelectionAction |
Responds to an Open or Save request |
protected class |
BasicFileChooserUI.BasicFileView |
A basic file view. |
protected class |
BasicFileChooserUI.CancelSelectionAction |
Responds to a cancel request. |
protected class |
BasicFileChooserUI.ChangeToParentDirectoryAction |
Change to parent directory action. |
protected class |
BasicFileChooserUI.DoubleClickListener |
A double click listener. |
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 |
A selection listener. |
protected class |
BasicFileChooserUI.UpdateAction |
Rescans the files in the current directory |
Modifier and Type | Field | Description |
---|---|---|
protected int |
cancelButtonMnemonic |
Cancel button mnemonic |
protected String |
cancelButtonText |
Cancel button text |
protected String |
cancelButtonToolTipText |
Cancel button tool tip text |
protected Icon |
computerIcon |
Computer icon |
protected Icon |
detailsViewIcon |
Details view icon |
protected Icon |
directoryIcon |
Directory icon |
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 |
File icon |
protected Icon |
floppyDriveIcon |
Floppy drive icon |
protected Icon |
hardDriveIcon |
Hard drive icon |
protected int |
helpButtonMnemonic |
Help button mnemonic |
protected String |
helpButtonText |
Help button text |
protected String |
helpButtonToolTipText |
Help button tool tip text |
protected Icon |
homeFolderIcon |
Home folder icon |
protected Icon |
listViewIcon |
List view icon |
protected Icon |
newFolderIcon |
New folder icon |
protected int |
openButtonMnemonic |
Open button mnemonic |
protected String |
openButtonText |
Open button text |
protected String |
openButtonToolTipText |
Open button tool tip text |
protected int |
saveButtonMnemonic |
Save button mnemonic |
protected String |
saveButtonText |
Save button text |
protected String |
saveButtonToolTipText |
Save button tool tip text |
protected int |
updateButtonMnemonic |
Update button mnemonic |
protected String |
updateButtonText |
Update button text |
protected String |
updateButtonToolTipText |
Update button tool tip text |
protected Icon |
upFolderIcon |
Up folder icon |
protected Icon |
viewMenuIcon |
View menu icon |
Constructor | Description |
---|---|
BasicFileChooserUI |
Constructs a BasicFileChooserUI . |
Modifier and Type | Method | Description |
---|---|---|
void |
clearIconCache() |
Clears the icon cache. |
protected MouseListener |
createDoubleClickListener |
Creates a double click listener. |
ListSelectionListener |
createListSelectionListener |
Creates a list selection listener. |
protected void |
createModel() |
Creates the model. |
PropertyChangeListener |
createPropertyChangeListener |
Creates the property change listener. |
static ComponentUI |
createUI |
Creates a BasicFileChooserUI implementation for the specified component. |
void |
ensureFileIsVisible |
Ensure the file in question is visible. |
FileFilter |
getAcceptAllFileFilter |
Returns the default accept all file filter |
JPanel |
getAccessoryPanel() |
Returns the accessory panel. |
protected JButton |
getApproveButton |
Returns the approve button. |
int |
getApproveButtonMnemonic |
Returns the approve button mnemonic. |
String |
getApproveButtonText |
Returns approve button text. |
String |
getApproveButtonToolTipText |
Returns the approve button tool tip. |
Action |
getApproveSelectionAction() |
Returns an approve selection action. |
Action |
getCancelSelectionAction() |
Returns a cancel selection action. |
Action |
getChangeToParentDirectoryAction() |
Returns a change to parent directory action. |
String |
getDialogTitle |
Returns the title of this dialog |
protected File |
getDirectory() |
Property to remember the directory that is currently selected in the UI. |
String |
getDirectoryName() |
Returns the directory name. |
JFileChooser |
getFileChooser() |
Returns the file chooser. |
String |
getFileName() |
Returns the file name. |
FileView |
getFileView |
Returns a file view. |
Action |
getGoHomeAction() |
Returns a go home action. |
BasicDirectoryModel |
getModel() |
Returns the model. |
Action |
getNewFolderAction() |
Returns a new folder action. |
Action |
getUpdateAction() |
Returns an update action. |
void |
installComponents |
Installs the components. |
protected void |
installDefaults |
Installs the defaults. |
protected void |
installIcons |
Installs the icons. |
protected void |
installListeners |
Installs the listeners. |
protected void |
installStrings |
Installs the strings. |
void |
installUI |
Installs the UI. |
protected boolean |
isDirectorySelected() |
Property to remember whether a directory is currently selected in the UI. |
void |
rescanCurrentDirectory |
Rescan the current directory. |
protected void |
setDirectory |
Property to remember the directory that is currently selected in the UI. |
void |
setDirectoryName |
Sets the directory name. |
protected void |
setDirectorySelected |
Property to remember whether a directory is currently selected in the UI. |
void |
setFileName |
Sets the file name. |
void |
uninstallComponents |
Uninstalls the components. |
protected void |
uninstallDefaults |
Uninstalls the defaults. |
protected void |
uninstallIcons |
Uninstalls the icons. |
protected void |
uninstallListeners |
Uninstalls the listeners. |
protected void |
uninstallStrings |
Uninstalls the strings. |
void |
uninstallUI |
Uninstalls the UI. |
getDefaultButton
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)
BasicFileChooserUI
.b
- file chooserpublic 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
objectpublic void installUI(JComponent c)
installUI
in class ComponentUI
c
- the componentpublic void uninstallUI(JComponent c)
uninstallUI
in class ComponentUI
c
- the componentpublic void installComponents(JFileChooser fc)
fc
- the file chooserpublic void uninstallComponents(JFileChooser fc)
fc
- the file chooserprotected void installListeners(JFileChooser fc)
fc
- the file chooserprotected void uninstallListeners(JFileChooser fc)
fc
- the file chooserprotected void installDefaults(JFileChooser fc)
fc
- the file chooserprotected void installIcons(JFileChooser fc)
fc
- the file chooserprotected void installStrings(JFileChooser fc)
fc
- the file chooserprotected void uninstallDefaults(JFileChooser fc)
fc
- the file chooserprotected void uninstallIcons(JFileChooser fc)
fc
- the file chooserprotected void uninstallStrings(JFileChooser fc)
fc
- the file chooserprotected void createModel()
public BasicDirectoryModel getModel()
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
fc
- the file chooserpublic String getFileName()
public String getDirectoryName()
public void setFileName(String filename)
filename
- the file namepublic void setDirectoryName(String dirname)
dirname
- the file namepublic void rescanCurrentDirectory(JFileChooser fc)
rescanCurrentDirectory
in class FileChooserUI
fc
- the file chooserpublic void ensureFileIsVisible(JFileChooser fc, File f)
ensureFileIsVisible
in class FileChooserUI
fc
- the file chooserf
- the filepublic JFileChooser getFileChooser()
public JPanel getAccessoryPanel()
protected JButton getApproveButton(JFileChooser fc)
fc
- the file chooserpublic String getApproveButtonToolTipText(JFileChooser fc)
fc
- the file chooserpublic void clearIconCache()
protected MouseListener createDoubleClickListener(JFileChooser fc, JList<?> list)
fc
- the file chooserlist
- the listpublic ListSelectionListener createListSelectionListener(JFileChooser fc)
fc
- the file chooserprotected 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
propertyprotected void setDirectory(File f)
f
- the File
object representing the directory that is currently selectedpublic FileFilter getAcceptAllFileFilter(JFileChooser fc)
getAcceptAllFileFilter
in class FileChooserUI
fc
- the file chooserpublic FileView getFileView(JFileChooser fc)
FileChooserUI
getFileView
in class FileChooserUI
fc
- the file chooserpublic String getDialogTitle(JFileChooser fc)
getDialogTitle
in class FileChooserUI
fc
- the file chooserpublic int getApproveButtonMnemonic(JFileChooser fc)
fc
- the file chooserpublic String getApproveButtonText(JFileChooser fc)
getApproveButtonText
in class FileChooserUI
fc
- the file chooserpublic Action getNewFolderAction()
public Action getGoHomeAction()
public Action getChangeToParentDirectoryAction()
public Action getApproveSelectionAction()
public Action getCancelSelectionAction()
public Action getUpdateAction()
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/plaf/basic/BasicFileChooserUI.html