1 /*********************************************************************************
2 * *
3 * Raptor - Rapid prototyping of Swing GUIs based on JavaBeans like Java objects *
4 * Copyright (C) 2003 XCOM AG *
5 * *
6 * This library is free software; you can redistribute it and/or *
7 * modify it under the terms of the GNU Lesser General Public *
8 * License as published by the Free Software Foundation; either *
9 * version 2.1 of the License, or (at your option) any later version. *
10 * *
11 * This library is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14 * Lesser General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU Lesser General Public *
17 * License along with this library; if not, write to the Free Software *
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
19 * *
20 *********************************************************************************/
21 package net.sf.raptor.ui.dialog;
22
23 import java.awt.Dialog;
24 import java.awt.Frame;
25
26 import javax.swing.JDialog;
27
28 import net.sf.raptor.ui.WindowUtils;
29
30
31 /**
32 * @author XCOM AG
33 *
34 * To change the template for this generated type comment go to
35 * Window>Preferences>Java>Code Generation>Code and Comments
36 */
37 public class XDialog extends JDialog {
38
39 protected Object returnValue;
40
41 /**
42 *
43 */
44 public XDialog() {
45 super();
46 }
47
48 /**
49 * @param owner
50 */
51 public XDialog(Frame owner) {
52 super(owner);
53 }
54
55 /**
56 * @param owner
57 * @param modal
58 */
59 public XDialog(Frame owner, boolean modal) {
60 super(owner, modal);
61 }
62
63 /**
64 * @param owner
65 * @param title
66 */
67 public XDialog(Frame owner, String title) {
68 super(owner, title);
69 }
70
71 /**
72 * @param owner
73 * @param title
74 * @param modal
75 */
76 public XDialog(Frame owner, String title, boolean modal) {
77 super(owner, title, modal);
78 }
79
80 /**
81 * @param owner
82 */
83 public XDialog(Dialog owner) {
84 super(owner);
85 }
86
87 /**
88 * @param owner
89 * @param modal
90 */
91 public XDialog(Dialog owner, boolean modal) {
92 super(owner, modal);
93 }
94
95 /**
96 * @param owner
97 * @param title
98 */
99 public XDialog(Dialog owner, String title) {
100 super(owner, title);
101 }
102
103 /**
104 * @param owner
105 * @param title
106 * @param modal
107 */
108 public XDialog(Dialog owner, String title, boolean modal) {
109 super(owner, title, modal);
110 }
111
112 /**
113 * doModal();
114 *
115 * macht den dialog sichtbar und blockt solange, bis
116 * der hide() oder setVisible(false) aufgerufen wird
117 */
118 public Object doModal() {
119 WindowUtils.doModal(this);
120 return returnValue;
121 }
122
123
124
125 /**
126 * @return
127 */
128 public Object getReturnValue() {
129 return returnValue;
130 }
131
132 /**
133 * @param object
134 */
135 public void setReturnValue(Object object) {
136 returnValue = object;
137 }
138
139 }