01: /*
02: *
03: * Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved.
04: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
05: *
06: * This program is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU General Public License version
08: * 2 only, as published by the Free Software Foundation.
09: *
10: * This program is distributed in the hope that it will be useful, but
11: * WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * General Public License version 2 for more details (a copy is
14: * included at /legal/license.txt).
15: *
16: * You should have received a copy of the GNU General Public License
17: * version 2 along with this work; if not, write to the Free Software
18: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19: * 02110-1301 USA
20: *
21: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
22: * Clara, CA 95054 or visit www.sun.com if you need additional
23: * information or have any questions.
24: */
25: package sun.awt.qt;
26:
27: import java.awt.*;
28: import sun.awt.peer.*;
29: import java.awt.event.*;
30:
31: /**
32: *
33: *
34: * @author Nicholas Allen
35: */
36:
37: class QtDialogPeer extends QtWindowPeer implements DialogPeer {
38: /** Creates a new QtDialogPeer. */
39:
40: QtDialogPeer(QtToolkit toolkit, Dialog target) {
41: super (toolkit, target);
42: setTitle(target.getTitle());
43: setResizable(target.isResizable());
44: setModal(target.isModal());
45: }
46:
47: protected native void create(QtComponentPeer parentPeer,
48: boolean isUndecorated);
49:
50: protected void create(QtComponentPeer parentPeer) {
51: create(parentPeer, ((Dialog) target).isUndecorated());
52: }
53:
54: public void setTitle(String title) {
55: if (title != null)
56: setTitleNative(title);
57: }
58:
59: protected native void setTitleNative(String title);
60:
61: native void setModal(boolean modal);
62:
63: /* Object used for modal wait. When the dialog is hidden we signal this object. */
64:
65: }
|