home *** CD-ROM | disk | FTP | other *** search
- import java.awt.BorderLayout;
- import java.awt.Button;
- import java.awt.Container;
- import java.awt.Event;
- import java.awt.Label;
- import java.awt.Panel;
-
- public class DialogExample extends JDPClassLayout {
- JDPUser user;
- JDPJagg jaggSQL;
- JDPPopupMessage popuppanel;
- JDPMaskEdit JDPMaskEditMain;
- String moduleParameter;
- Panel Main;
- JDPDialog JDPDialog1;
- JDPScrollPanel ScrollPanel1;
- Label Label1;
- Button Button1;
- JDPScrollPanel ScrollPanel2;
- Button Button2;
-
- public void InitClass(JDPUser var1, Panel var2, String var3) {
- this.user = var1;
- this.moduleParameter = var3;
- this.jaggSQL = new JDPJagg(var1.jaggPath);
- ((Container)this).setLayout(new BorderLayout());
- this.popuppanel = new JDPPopupMessage(var1, this);
- ((Container)this).add(this.popuppanel);
- this.JDPMaskEditMain = new JDPMaskEdit();
- this.Main = new Panel();
- this.JDPDialog1 = new JDPDialog(var1, this);
- this.ScrollPanel1 = new JDPScrollPanel();
- this.Label1 = new Label("Click here to close the dialog", 0);
- this.Button1 = new Button("Close Dialog");
- this.ScrollPanel2 = new JDPScrollPanel();
- this.Button2 = new Button("Press to display the dialog");
- this.Main.setLayout(new BorderLayout());
- ((Container)this).add("Center", this.Main);
- this.JDPDialog1.add("Center", this.ScrollPanel1);
- this.ScrollPanel1.add("Left", this.Label1);
- this.ScrollPanel1.add("Right", this.Button1);
- this.Main.add("West", this.ScrollPanel2);
- this.ScrollPanel2.add("Left", this.Button2);
- this.InitComponents();
- var1.gParm.addElement(this);
- }
-
- public boolean handleEvent(Event var1) {
- switch (var1.id) {
- case 201:
- if (var1.target.equals(this.JDPDialog1)) {
- this.JDPDialog1.dispose();
- return true;
- }
-
- return false;
- case 503:
- case 504:
- case 505:
- this.popuppanel.postEvent(var1);
- return false;
- case 1001:
- if (var1.target.equals(this.Button1)) {
- this.JDPDialog1.dispose();
- return true;
- } else {
- if (var1.target.equals(this.Button2)) {
- this.JDPDialog1.display();
- return true;
- }
-
- return false;
- }
- default:
- return false;
- }
- }
-
- public void InitComponents() {
- }
- }
-