git://git.nikiroo.be
/
nikiroo-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a71e8e3
)
WaitingDialog: do not allow close and dispose when needed
author
Niki Roo
<niki@nikiroo.be>
Mon, 4 May 2020 17:20:05 +0000
(19:20 +0200)
committer
Niki Roo
<niki@nikiroo.be>
Mon, 4 May 2020 17:20:05 +0000
(19:20 +0200)
ui/WaitingDialog.java
patch
|
blob
|
blame
|
history
diff --git
a/ui/WaitingDialog.java
b/ui/WaitingDialog.java
index 15dca6cce1655352e72ebba268086c6c239cdcca..7df5a8b526314917e5ef7211715f33a13ffe9f9b 100644
(file)
--- a/
ui/WaitingDialog.java
+++ b/
ui/WaitingDialog.java
@@
-93,6
+93,8
@@
public class WaitingDialog extends JDialog {
String waitingText) {
super(parent);
String waitingText) {
super(parent);
+ this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
+
this.pg = pg;
if (waitingText != null) {
this.pg = pg;
if (waitingText != null) {
@@
-154,11
+156,14
@@
public class WaitingDialog extends JDialog {
/**
* Notify this {@link WaitingDialog} that the job is done, and dismiss it if
* it was already showing on screen (or never show it if it was not).
/**
* Notify this {@link WaitingDialog} that the job is done, and dismiss it if
* it was already showing on screen (or never show it if it was not).
+ * <p>
+ * Will also dispose the {@link WaitingDialog}.
*/
public void dismiss() {
synchronized (waitLock) {
if (waitScreen) {
setVisible(false);
*/
public void dismiss() {
synchronized (waitLock) {
if (waitScreen) {
setVisible(false);
+ dispose();
}
waitScreen = true;
}
}
waitScreen = true;
}