12 |
for (DIALOG d : getAllInstances()) { |
for (DIALOG d : getAllInstances()) { |
13 |
d.forceClose(); |
d.forceClose(); |
14 |
} |
} |
15 |
|
dialogCache.clear(); |
16 |
} |
} |
17 |
|
|
18 |
/** |
/** |
24 |
if (!d.close()) |
if (!d.close()) |
25 |
return false; |
return false; |
26 |
} |
} |
27 |
|
|
28 |
|
dialogCache.clear(); |
29 |
return true; |
return true; |
30 |
} |
} |
31 |
|
|
32 |
/** |
/** |
33 |
* Tells the suer that the dialog shall be closed. The user may save, cancel or abort the closing. |
* Tells the user that the dialog shall be closed. The user may save, cancel or abort the closing. |
34 |
* |
* |
35 |
* @return <code>true</code> if there is no open instance or the instance has been disposed |
* @return <code>true</code> if there is no open instance or the instance has been disposed |
36 |
*/ |
*/ |
37 |
public boolean close(KEY key) { |
public boolean close(KEY key) { |
38 |
if (isVisibleFor(key)) { |
if (isVisibleFor(key)) { |
39 |
return getInstanceFor(key, null).close(); |
boolean closeResult = getInstanceFor(key, null).close(); |
40 |
|
if (closeResult) dialogCache.remove(key); |
41 |
|
return closeResult; |
42 |
} |
} |
43 |
|
dialogCache.remove(key); |
44 |
return true; |
return true; |
45 |
} |
} |
46 |
|
|