Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File chooser improvements #677

Open
mgarin opened this issue Oct 18, 2021 · 3 comments
Open

File chooser improvements #677

mgarin opened this issue Oct 18, 2021 · 3 comments

Comments

@mgarin
Copy link
Owner

mgarin commented Oct 18, 2021

Current JFileChooser implementation has a set of issues that need to be resolved.

Bugs

Initialization speed improvements

Other improvements

New features

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.

@mgarin mgarin self-assigned this Oct 18, 2021
@mgarin mgarin added this to Planned in v1.3.0 via automation Oct 18, 2021
@Sciss
Copy link
Contributor

Sciss commented Oct 18, 2021

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)

@mgarin
Copy link
Owner Author

mgarin commented Oct 18, 2021

@Sciss That's a good point, I'll throw it onto the list.

@mgarin
Copy link
Owner Author

mgarin commented Oct 18, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
v1.3.0
  
Planned
Development

No branches or pull requests

2 participants