java.lang.Object javax.swing.plaf.ComponentUI javax.swing.plaf.FileChooserUI javax.swing.plaf.basic.BasicFileChooserUI
public class BasicFileChooserUI
Basic L&F implementation of a FileChooser.
Nested Class Summary | |
---|---|
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 |
Field Summary | |
---|---|
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
|
Constructor Summary | |
---|---|
BasicFileChooserUI
(
JFileChooser
b) |
Method Summary | |
---|---|
void |
clearIconCache
() |
protected MouseListener |
createDoubleClickListener
(
JFileChooser
fc,
JList
list) |
ListSelectionListener |
createListSelectionListener
(
JFileChooser
fc) |
protected void |
createModel
() |
PropertyChangeListener |
createPropertyChangeListener
(
JFileChooser
fc) |
void |
ensureFileIsVisible
(
JFileChooser
fc,
File
f) |
FileFilter |
getAcceptAllFileFilter
(
JFileChooser
fc) Returns the default accept all file filter |
JPanel |
getAccessoryPanel
() |
protected JButton |
getApproveButton
(
JFileChooser
fc) |
int |
getApproveButtonMnemonic
(
JFileChooser
fc) |
String |
getApproveButtonText
(
JFileChooser
fc) |
String |
getApproveButtonToolTipText
(
JFileChooser
fc) |
Action |
getApproveSelectionAction
() |
Action |
getCancelSelectionAction
() |
Action |
getChangeToParentDirectoryAction
() |
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
() |
JFileChooser |
getFileChooser
() |
String |
getFileName
() |
FileView |
getFileView
(
JFileChooser
fc) |
Action |
getGoHomeAction
() |
BasicDirectoryModel |
getModel
() |
Action |
getNewFolderAction
() |
Action |
getUpdateAction
() |
void |
installComponents
(
JFileChooser
fc) |
protected void |
installDefaults
(
JFileChooser
fc) |
protected void |
installIcons
(
JFileChooser
fc) |
protected void |
installListeners
(
JFileChooser
fc) |
protected void |
installStrings
(
JFileChooser
fc) |
void |
installUI
(
JComponent
c) Configures the specified component appropriate for the look and feel. |
protected boolean |
isDirectorySelected
() Property to remember whether a directory is currently selected in the UI. |
void |
rescanCurrentDirectory
(
JFileChooser
fc) |
protected void |
setDirectory
(
File
f) Property to remember the directory that is currently selected in the UI. |
void |
setDirectoryName
(
String
dirname) |
protected void |
setDirectorySelected
(boolean b) Property to remember whether a directory is currently selected in the UI. |
void |
setFileName
(
String
filename) |
void |
uninstallComponents
(
JFileChooser
fc) |
protected void |
uninstallDefaults
(
JFileChooser
fc) |
protected void |
uninstallIcons
(
JFileChooser
fc) |
protected void |
uninstallListeners
(
JFileChooser
fc) |
protected void |
uninstallStrings
(
JFileChooser
fc) |
void |
uninstallUI
(
JComponent
c) Reverses configuration which was done on the specified component during installUI. |
Methods inherited from class javax.swing.plaf. ComponentUI |
---|
contains , createUI , getAccessibleChild , getAccessibleChildrenCount , getBaseline , getBaselineResizeBehavior , getMaximumSize , getMinimumSize , getPreferredSize , paint , update |
Methods inherited from class java.lang. Object |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Field Detail |
---|
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 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
Constructor Detail |
---|
public BasicFileChooserUI(JFileChooser b)
Method Detail |
---|
public void installUI(JComponent c)
public void uninstallUI(JComponent c)
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)
public void ensureFileIsVisible(JFileChooser fc, File f)
public JFileChooser getFileChooser()
public JPanel getAccessoryPanel()
protected JButton getApproveButton(JFileChooser fc)
public String getApproveButtonToolTipText(JFileChooser fc)
public void clearIconCache()
protected MouseListener createDoubleClickListener(JFileChooser fc, JList list)
public ListSelectionListener createListSelectionListener(JFileChooser fc)
protected boolean isDirectorySelected()
protected void setDirectorySelected(boolean b)
protected File getDirectory()
protected void setDirectory(File f)
public FileFilter getAcceptAllFileFilter(JFileChooser fc)
public FileView getFileView(JFileChooser fc)
public String getDialogTitle(JFileChooser fc)
public int getApproveButtonMnemonic(JFileChooser fc)
public String getApproveButtonText(JFileChooser fc)
public Action getNewFolderAction()
public Action getGoHomeAction()
public Action getChangeToParentDirectoryAction()
public Action getApproveSelectionAction()
public Action getCancelSelectionAction()
public Action getUpdateAction()