home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / earthlink / nscomm / java40.jar / java / awt / Dialog.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-11-03  |  1.5 KB  |  68 lines

  1. package java.awt;
  2.  
  3. import java.awt.peer.DialogPeer;
  4.  
  5. public class Dialog extends Window {
  6.    boolean resizable;
  7.    boolean modal;
  8.    String title;
  9.  
  10.    public Dialog(Frame var1, boolean var2) {
  11.       super(var1);
  12.       this.resizable = true;
  13.       this.modal = var2;
  14.    }
  15.  
  16.    public Dialog(Frame var1, String var2, boolean var3) {
  17.       this(var1, var3);
  18.       this.title = var2;
  19.    }
  20.  
  21.    public synchronized void addNotify() {
  22.       if (super.peer == null) {
  23.          super.peer = ((Window)this).getToolkit().createDialog(this);
  24.       }
  25.  
  26.       super.addNotify();
  27.    }
  28.  
  29.    public boolean isModal() {
  30.       return this.modal;
  31.    }
  32.  
  33.    public String getTitle() {
  34.       return this.title;
  35.    }
  36.  
  37.    public void setTitle(String var1) {
  38.       this.title = var1;
  39.       DialogPeer var2 = (DialogPeer)super.peer;
  40.       if (var2 != null) {
  41.          var2.setTitle(var1);
  42.       }
  43.  
  44.    }
  45.  
  46.    public boolean isResizable() {
  47.       return this.resizable;
  48.    }
  49.  
  50.    public void setResizable(boolean var1) {
  51.       this.resizable = var1;
  52.       DialogPeer var2 = (DialogPeer)super.peer;
  53.       if (var2 != null) {
  54.          var2.setResizable(var1);
  55.       }
  56.  
  57.    }
  58.  
  59.    protected String paramString() {
  60.       String var1 = super.paramString() + (this.modal ? ",modal" : ",modeless");
  61.       if (this.title != null) {
  62.          var1 = var1 + ",title=" + this.title;
  63.       }
  64.  
  65.       return var1;
  66.    }
  67. }
  68.