Back to index

wims  3.65+svn20090927
Warning.java
Go to the documentation of this file.
00001 package rene.dialogs;
00002 
00003 import java.awt.*;
00004 import java.awt.event.*;
00005 
00006 import rene.gui.*;
00007 
00013 public class Warning extends CloseDialog 
00014     implements ActionListener
00015 {      public boolean Result;
00016        Frame F;
00017        
00018        public Warning (Frame f, String c, String title, boolean flag, String help)
00019        {      super(f,title,flag);
00020               F=f;
00021               Panel pc=new MyPanel();
00022               FlowLayout fl=new FlowLayout();
00023               pc.setLayout(fl);
00024               fl.setAlignment(FlowLayout.CENTER);
00025               pc.add(new MyLabel(" "+c+" "));
00026               add("Center",pc);
00027               Panel p=new MyPanel();
00028               p.add(new ButtonAction(this,Global.name("close"),"Close"));
00029               if (help!=null && !help.equals("")) addHelp(p,help);
00030               add("South",p);
00031               pack();
00032        }
00033        
00034        public Warning (Frame f, String c, String title, boolean flag)
00035        {      this(f,c,title,flag,"");
00036        }
00037 
00038        public Warning (Frame f, String c, String title)
00039        {      this(f,c,title,true,"");
00040        }
00041        
00042        public Warning (Frame f, String c1, String c2, String title, boolean flag,
00043                      String help)
00044        {      super(f,title,flag);
00045               F=f;
00046               Panel pc=new MyPanel();
00047               pc.setLayout(new GridLayout(0,1));
00048               pc.add(new MyLabel(" "+c1+" "));
00049               pc.add(new MyLabel(" "+c2+" "));
00050               add("Center",pc);
00051               Panel p=new MyPanel();
00052               p.add(new ButtonAction(this,Global.name("close"),"Close"));
00053               if (help!=null && !help.equals("")) addHelp(p,help);
00054               add("South",p);
00055               pack();
00056        }
00057        
00058        public Warning (Frame f, String c1, String c2, String title, boolean flag)
00059        {      this(f,c1,c2,title,flag,"");
00060        }
00061        
00062        public Warning (Frame f, String c1, String c2, String title)
00063        {      this(f,c1,c2,title,true,"");
00064        }
00065 }