Package se.datadosen.component
Class JXFileChooser
java.lang.Object
se.datadosen.component.JXFileChooser
- All Implemented Interfaces:
DirectoryChooser
,FileChooser
,PathChooser
Swing-like wrapper around XFileChooser (Windows) Cons: Windows only. Current (initial) directory ignored when
choosing directories
Since 23.2: Not in further use due to https://jalbum.net/forum/thread.jspa?messageID=346361#346361
Replaced by the JNA based WindowsFileChooser (which can't default to thumbnail view)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
File[]
void
setCurrentDirectory
(File dir) void
setDialogTitle
(String dialogTitle) void
setDialogType
(int dialogType) void
setFileFilter
(FileFilter filter) Add a file filter.void
setFileSelectionMode
(int mode) void
setFileView
(FileView fileView) void
setMultiSelectionEnabled
(boolean b) void
setSelectedFile
(File file) int
showDialog
(Component parent, String approveButtonText) int
showOpenDialog
(Component parent) int
showSaveDialog
(Component parent)
-
Constructor Details
-
JXFileChooser
public JXFileChooser()
-
-
Method Details
-
setCurrentDirectory
- Specified by:
setCurrentDirectory
in interfacePathChooser
-
getCurrentDirectory
- Specified by:
getCurrentDirectory
in interfacePathChooser
-
setDialogTitle
- Specified by:
setDialogTitle
in interfacePathChooser
-
setDialogType
public void setDialogType(int dialogType) - Specified by:
setDialogType
in interfaceFileChooser
-
setMultiSelectionEnabled
public void setMultiSelectionEnabled(boolean b) - Specified by:
setMultiSelectionEnabled
in interfaceFileChooser
-
setFileSelectionMode
public void setFileSelectionMode(int mode) - Specified by:
setFileSelectionMode
in interfaceFileChooser
-
addActionListener
- Specified by:
addActionListener
in interfaceFileChooser
-
setFileView
- Specified by:
setFileView
in interfaceFileChooser
-
showSaveDialog
- Specified by:
showSaveDialog
in interfaceFileChooser
- Throws:
HeadlessException
-
showOpenDialog
- Specified by:
showOpenDialog
in interfacePathChooser
- Returns:
- Same as JFileChooser show... methods
- Throws:
HeadlessException
-
showDialog
- Specified by:
showDialog
in interfaceFileChooser
- Throws:
HeadlessException
-
getSelectedFile
- Specified by:
getSelectedFile
in interfacePathChooser
-
getSelectedFiles
- Specified by:
getSelectedFiles
in interfaceFileChooser
-
setFileFilter
Description copied from interface:FileChooser
Add a file filter. For max compatibility with different platforms, use the FileNameExtensionFilter subclass of FileFilter- Specified by:
setFileFilter
in interfaceFileChooser
- Parameters:
filter
-
-
setSelectedFile
- Specified by:
setSelectedFile
in interfacePathChooser
-