/[classpath]/classpath/java/awt/Dialog.java
ViewVC logotype

Diff of /classpath/java/awt/Dialog.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by mark, Sun Jan 13 15:45:15 2002 UTC revision 1.8 by tromey, Tue Jan 22 22:00:14 2002 UTC
# Line 1  Line 1 
1  /* Dialog.java -- An AWT dialog box  /* Dialog.java -- An AWT dialog box
2     Copyright (C) 1999 Free Software Foundation, Inc.     Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 36  import java.awt.peer.ComponentPeer; Line 36  import java.awt.peer.ComponentPeer;
36    * A dialog box widget class.    * A dialog box widget class.
37    *    *
38    * @author Aaron M. Renn (arenn@urbanophile.com)    * @author Aaron M. Renn (arenn@urbanophile.com)
39      * @author Tom Tromey <tromey@redhat.com>
40    */    */
41  public class Dialog extends Window implements java.io.Serializable  public class Dialog extends Window implements java.io.Serializable
42  {  {
# Line 142  Dialog(Frame parent, String title, boole Line 143  Dialog(Frame parent, String title, boole
143    setLayout(new BorderLayout());    setLayout(new BorderLayout());
144  }  }
145    
146    public
147    Dialog (Dialog owner)
148    {
149      this (owner, "", false);
150    }
151    
152    public
153    Dialog (Dialog owner, String title)
154    {
155      this (owner, title, false);
156    }
157    
158    public
159    Dialog (Dialog owner, String title, boolean modal)
160    {
161      super (owner);
162      this.modal = modal;
163      this.title = title;
164      setLayout (new BorderLayout ());
165    }
166    
167  /*************************************************************************/  /*************************************************************************/
168    
169  /*  /*
# Line 170  public synchronized void Line 192  public synchronized void
192  setTitle(String title)  setTitle(String title)
193  {  {
194    this.title = title;    this.title = title;
195      if (peer != null)
196    DialogPeer dp = (DialogPeer)getPeer();      {
197    if (dp != null)        DialogPeer d = (DialogPeer) peer;
198      dp.setTitle(title);        d.setTitle (title);
199        }
200  }  }
201    
202  /*************************************************************************/  /*************************************************************************/
# Line 231  public synchronized void Line 254  public synchronized void
254  setResizable(boolean resizable)  setResizable(boolean resizable)
255  {  {
256    this.resizable = resizable;    this.resizable = resizable;
257      if (peer != null)
258    DialogPeer dp = (DialogPeer)getPeer();      {
259    if (dp != null)        DialogPeer d = (DialogPeer) peer;
260      dp.setResizable(resizable);        d.setResizable (resizable);
261        }
262  }  }
263    
264  /*************************************************************************/  /*************************************************************************/
# Line 245  setResizable(boolean resizable) Line 269  setResizable(boolean resizable)
269  public synchronized void  public synchronized void
270  addNotify()  addNotify()
271  {  {
272    if (getPeer() == null)    if (peer == null)
273      setPeer((ComponentPeer)getToolkit().createDialog(this));      peer = getToolkit ().createDialog (this);
274      super.addNotify ();
275  }  }
276    
277  /*************************************************************************/  /*************************************************************************/
# Line 270  show() Line 295  show()
295  protected String  protected String
296  paramString()  paramString()
297  {  {
298    return(getClass().getName() + "(title+" + title + ",modal=" + modal +    return ("title+" + title + ",modal=" + modal +
299           ",resizable=" + resizable + ")");            ",resizable=" + resizable + "," + super.paramString());
300  }  }
301    
302  } // class Dialog  } // class Dialog

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26