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

Support custom ActionListeners for Command Buttons #37

Open
CroniD opened this issue May 2, 2014 · 0 comments
Open

Support custom ActionListeners for Command Buttons #37

CroniD opened this issue May 2, 2014 · 0 comments

Comments

@CroniD
Copy link
Contributor

CroniD commented May 2, 2014

In some scenarios you show a dialog which displays a progress of a background task. If those dialogs have a cancel button it should signal the background task to stop and the dialog should remain open till the background task terminates. Currently not possible without dirty hacks.
You can add a PropertyChangeListener for the TaskDialog result, but you can not wait in EDT for the termination of the background task, therefore a new Thread has to be created that closes the dialog when the background task terminates, but once the result changes to a result that is marked as "closing" (see TaskDialogContent.CommandAction.actionPerformed(ActionEvent) ) the dialog will disappear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant