/[schmitzm]/branches/2.0-RC1/src/skrueger/swing/CancellableDialogManager.java
ViewVC logotype

Annotation of /branches/2.0-RC1/src/skrueger/swing/CancellableDialogManager.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 422 - (hide annotations)
Fri Oct 2 00:47:48 2009 UTC (15 years, 5 months ago) by alfonx
Original Path: branches/1.0-gt2-2.6/src/skrueger/swing/CancellableDialogManager.java
File MIME type: text/plain
File size: 1000 byte(s)
* GP-Feature: Improved/unified dialog management moved further.
* GP-Feature: popup menu in MenuTree allows to edit DpEntries and Maps
1 alfonx 422 package skrueger.swing;
2    
3    
4     public abstract class CancellableDialogManager<KEY, DIALOG extends CancellableDialogAdapter>
5     extends DialogManager<KEY, DIALOG> {
6    
7     /**
8     * Will force a dispose of all dialogs, but the user may decide whether she
9     * wants to save anything first.
10     */
11     public void forceCloseAllInstances() {
12     for (DIALOG d : getAllInstances()) {
13     d.forceClose();
14     }
15     }
16    
17     /**
18     * Will try to close all dialogs, but the user may decide whether she
19     * wants to save anything first or abort the closing.
20     */
21     public boolean closeAllInstances() {
22     for (DIALOG d : getAllInstances()) {
23     if (!d.close())
24     return false;
25     }
26     return true;
27     }
28    
29     /**
30     * Tells the suer that the dialog shall be closed. The user may save, cancel or abort the closing.
31     *
32     * @return <code>true</code> if there is no open instance or the instance has been disposed
33     */
34     public boolean close(KEY key) {
35     if (isVisibleFor(key)) {
36     return getInstanceFor(key, null).close();
37     }
38    
39     return true;
40     }
41    
42     }

Properties

Name Value
svn:eol-style native
svn:keywords Id URL
svn:mime-type text/plain

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26