Closed ArchibaldBienetre closed 2 years ago
Thanks for reporting this! Well, I will try to reproduce the issue and see that there will be a fix.
Well yes. I can reproduce this. And you are right, the result converter is not triggered on double click. I need to look into the dialog API to understand how to call this. Very good, thanks for pointing this out.
Nevertheless, I was planning to completely remove the Dialog part. Do you actually prefer the Dialog version over the Stage version?
Please try out the branch issue-44. It is quite a hack as the controller now also has a reference to the dialog.
In general, a rethinking of the current structure is needed.
But, if this works for you, I'd release it as 0.0.7 to Maven Central.
I was testing it manually with net.raumzeitfalle.fx.demos.DemoJavaFxDialog.java
.
Beside the double click issue, the dark mode in the Dialog is not working properly - need to put some work in there as well.
Do you actually prefer the Dialog version over the Stage version?
You mean, this? https://github.com/Oliver-Loeffler/FXFileChooser#a-version-with-a-completely-customizable-stage I have not given it a try, yet. I was glad to get something to work with TestFX ':D
I can have a look.
Yes this one. Was playing with both approaches, using a modal stage vs. using a JavaFX dialog. Nevertheless, this project deserves some more love over next time. It should now work with the modal Stage and the dialog,
TestFX is awesome - but I think it needs more people working on it. It is really underrated and underappreciated.
Btw, which Java version are you using? Would this be still useful to you if the project would move to Java 11?
... I was testing it manually with
net.raumzeitfalle.fx.demos.DemoJavaFxDialog.java
.Beside the double click issue, the dark mode in the Dialog is not working properly - need to put some work in there as well.
I can confirm both
It was a bit of a struggle to make it work. I installed JDK 8 as that is the target version, and then some dependencies were still missing (Java 8 does not support modules yet, I'd rule out those):
Thank you for putting in your time, I'd be superglad for a 0.0.7 alpha that I could use without the workaround :) .
Do you actually prefer the Dialog version over the Stage version?
You mean, this? https://github.com/Oliver-Loeffler/FXFileChooser#a-version-with-a-completely-customizable-stage I have not given it a try, yet. I was glad to get something to work with TestFX ':D
I can have a look.
Nice, it seems I can just use it as a drop-in replacement, that's fine then.
Hi,
so there is now a new version 0.0.7
, just uploaded it. It contains the fix for the broken double click in the Dialog. The fix for the broken dark mode will then become part of 0.0.8
or later. This change comprises the internal API, hence going with 0.0.7
should be okay.
<dependency>
<groupId>net.raumzeitfalle.fx</groupId>
<artifactId>filechooser</artifactId>
<version>0.0.7</version>
</dependency>
or
implementation 'net.raumzeitfalle.fx:filechooser:0.0.7'
Thanks for sharing your setup details - so I will get this project into a little better shape and ready for Java11 soon, there will be also a module-info then but this is not a mandatory requirement. There will be a solution for darkmode in Dialog within a few days,
The stage version It works as a drop-in, looks a little different. Well, there is the directory chooser, which is in a quite early stage. It should then also be suitable for huge directory trees.
For development on this I am currently using the Azul Java 8 JDK, zulu
where JavaFX is included. Think Azul also offers Java-11 and Java-17 with FX included. This is quite convenient for development.
Kudos for your work-around!
The dark mode inside Dialog is now working again. Also the resize behavior improved for the dialog as the minimum size is now properly constrained. There will be a 0.0.8
release tomorrow bringing the improvements.
Dark mode and resizing are now properly working with version 0.0.8
. Closed with 5e27cb456567fc196b0731d2ec7aa60df32ddf6d and bebd9dd795e25a44d8c44a902fc617fe4e7c3d45.
New version is available at Maven Central.
<dependency>
<groupId>net.raumzeitfalle.fx</groupId>
<artifactId>filechooser</artifactId>
<version>0.0.8</version>
</dependency>
@ArchibaldBienetre The new version 0.0.8
is now available. Its been tested on MacOS and Windows 10, works for both. Would be glad if you could share if it eventually works as intended on Ubuntu!
Thanks for checking in!
I've been using the 0.0.8
since this afternoon, the update introduced no serious problems (just the default skin, I had to change that to MODENA
now), my integration tests (testfx) still work as before. :heavy_check_mark:
Manual test works, dark layout too.
My project uses FXFileChooserStage
now, but I'll take the Dialog implementation for another spin :mag:
EDIT: Dialog implementation is still (i.e., like the 0.0.7
) working like a charm :heavy_check_mark:
Hi, first of all thank ou for this piece of software, it will be very useful for me :)
However, I think I found a small bug. It occurs for me, running Ubuntu Linux 21.10 Impish (I don't know if that makes a difference anywhere).
How it normally works
When I use
FXFileChooserDialog#showOpenDialog
this way, it works:What I think is broken
When I instead do this I get an empty optional as the result:
I don't exactly know why this happens - I debugged a bit, and double-click handling in
net.raumzeitfalle.fx.filechooser.FileChooserController#handleDoubleClickInFilesList
definitely gets triggered. Justjavafx.scene.control.Dialog#getResult
does not seem to get the result then.Workaround
I can work around the issue by getting
FXFileChooserDialog.model.getSelectedFile()
using reflection:(the model is working, as verified by a test case)
net.raumzeitfalle.fx.filechooser.FileChooserController#cancelAction
gets no hits, I would have expected that code to prevent thisnet.raumzeitfalle.fx.filechooser.FXFileChooserDialog#FXFileChooserDialog
does the work to get things to the result, but it does not get called in case of the double click:More context
So far, I'm using FxFileChooserDialog in a playground project only. Find the latest code here as part of this PR: https://github.com/ArchibaldBienetre/javaFxTestGradle/pull/1/files