public class BasicFileChooserUI extends FileChooserUI
Modifier and Type | Class and 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 and 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 and Description |
---|
BasicFileChooserUI(JFileChooser b)
Constructs a
BasicFileChooserUI . |
Modifier and Type | Method and Description |
---|---|
void |
clearIconCache()
Clears the icon cache.
|
protected MouseListener |
createDoubleClickListener(JFileChooser fc,
JList<?> list)
Creates a double click listener.
|
ListSelectionListener |
createListSelectionListener(JFileChooser fc)
Creates a list selection listener.
|
protected void |
createModel()
Creates the model.
|
PropertyChangeListener |
createPropertyChangeListener(JFileChooser fc)
Creates the property change listener.
|
static ComponentUI |
createUI(JComponent c)
Creates a
BasicFileChooserUI implementation
for the specified component. |
void |
ensureFileIsVisible(JFileChooser fc,
File f)
Ensure the file in question is visible.
|
FileFilter |
getAcceptAllFileFilter(JFileChooser fc)
Returns the default accept all file filter
|
JPanel |
getAccessoryPanel()
Returns the accessory panel.
|
protected JButton |
getApproveButton(JFileChooser fc)
Returns the approve button.
|
int |
getApproveButtonMnemonic(JFileChooser fc)
Returns the approve button mnemonic.
|
String |
getApproveButtonText(JFileChooser fc)
Returns approve button text.
|
String |
getApproveButtonToolTipText(JFileChooser fc)
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.
|
JButton |
getDefaultButton(JFileChooser fc)
Returns default button for current
LookAndFeel . |
String |
getDialogTitle(JFileChooser fc)
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(JFileChooser fc)
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(JFileChooser fc)
Installs the components.
|
protected void |
installDefaults(JFileChooser fc)
Installs the defaults.
|
protected void |
installIcons(JFileChooser fc)
Installs the icons.
|
protected void |
installListeners(JFileChooser fc)
Installs the listeners.
|
protected void |
installStrings(JFileChooser fc)
Installs the strings.
|
void |
installUI(JComponent c)
Installs the UI.
|
protected boolean |
isDirectorySelected()
Property to remember whether a directory is currently selected in the UI.
|
void |
rescanCurrentDirectory(JFileChooser fc)
Rescan the current directory.
|
protected void |
setDirectory(File f)
Property to remember the directory that is currently selected in the UI.
|
void |
setDirectoryName(String dirname)
Sets the directory name.
|
protected void |
setDirectorySelected(boolean b)
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.
|
protected void |
uninstallDefaults(JFileChooser fc)
Uninstalls the defaults.
|
protected void |
uninstallIcons(JFileChooser fc)
Uninstalls the icons.
|
protected void |
uninstallListeners(JFileChooser fc)
Uninstalls the listeners.
|
protected void |
uninstallStrings(JFileChooser fc)
Uninstalls the strings.
|
void |
uninstallUI(JComponent c)
Uninstalls the UI.
|
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
objectUIDefaults.getUI(JComponent)
public void installUI(JComponent c)
installUI
in class ComponentUI
c
- the componentComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
uninstallUI
in class ComponentUI
c
- the componentComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
public 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 JButton getDefaultButton(JFileChooser fc)
LookAndFeel
.
JFileChooser
will use this button as default button
for dialog windows.getDefaultButton
in class FileChooserUI
fc
- the JFileChooser
whose default button is requestedpublic 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
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
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()
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