Open mgarin opened 2 years ago
If I may add another tiny improvement: If the dialog is set to select directories - FileSelectionMode.directoriesOnly
- I think it's useful to select a directory dropped from the desktop manager, instead of branching into that directory. I have implemented it this way: https://github.com/Sciss/Submin/blob/main/src/main/java/de/sciss/submin/SubminFileChooserPanel.java#L138 (additional check getFileSelectionMode
)
@Sciss That's a good point, I'll throw it onto the list.
I've already done some sketches of the rework locally before so I have the general idea how it should be done, just never really got far into the implementation.
The general goal was and still is to make no compromises - file chooser needs to have clean code, be fully styleable, asynchronous, configurable and easily modifiable in the future. Something akin to the JTabbedPane
rework I've finished a while ago. That will ensure that future fixes and improvements can easily be added on top of existing implementation without breaking random things.
So if you have any other ideas on possible improvements (even any crazy ones) - feel free to throw them in here. Current chooser was written years ago and library features were way more limited back at the time, there are definitely a lot of things that can be improved now, even with Java 6 support.
Current
JFileChooser
implementation has a set of issues that need to be resolved.Bugs
10
215
278
290
600
Initialization speed improvements
140
227
Other improvements
162
163
New features
206
255
311
My original plan was to rework file chooser once project is moved to Java 8+ (or even later one) to incorporate all the NIO improvements, but this might take a long while to get to. So it would be more reasonable to simply rework it at the current project stage and then improve it a bit further after the minimum supported Java version is increased.
Currently I'm planning to work on this in v1.2.15 update, so before the major changes in v1.3.0.