1
2
3
4
5 package org.directdemocracyportal.democracy.web.views.dialogs;
6
7 import thinwire.ui.Dialog;
8
9 /***
10 * The Class AbstractActionDialog.
11 */
12 public class AbstractActionDialog extends Dialog
13 {
14
15 /***
16 * The Enum DialogResult.
17 */
18 public enum DialogResult {
19
20 /*** The Dialog_ closed. */
21 Dialog_Closed,
22
23 /*** The Do_ action. */
24 Do_Action,
25
26 /*** The Action_ cancelled. */
27 Action_Cancelled;
28 }
29
30 /*** The dialog result. */
31 protected DialogResult dialogResult = DialogResult.Dialog_Closed;
32
33 /***
34 * Instantiates a new abstract action dialog.
35 *
36 * @param name the name
37 */
38 public AbstractActionDialog(String name) {
39 super(name);
40 setResizeAllowed(true);
41 setWaitForWindow(true);
42 }
43
44 /***
45 * Gets the dialog result.
46 *
47 * @return the dialog result
48 */
49 public DialogResult getDialogResult() {
50 dialogResult = DialogResult.Dialog_Closed;
51 setVisible(true);
52 return dialogResult;
53 }
54 }