home *** CD-ROM | disk | FTP | other *** search
- package symantec.descfileconverter;
-
- import java.awt.Button;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Dialog;
- import java.awt.Event;
- import java.awt.Frame;
- import java.awt.Label;
- import java.awt.LayoutManager;
- import java.awt.Rectangle;
-
- public class QuitDialog extends Dialog {
- Button yesButton;
- Button noButton;
- Label label1;
-
- void yesButton_Clicked(Event var1) {
- ((Component)this).getParent().handleEvent(new Event(this, 201, (Object)null));
- }
-
- void noButton_Clicked(Event var1) {
- ((Component)this).hide();
- ((Component)this).getParent().requestFocus();
- }
-
- public QuitDialog(Frame var1, boolean var2) {
- super(var1, var2);
- ((Container)this).setLayout((LayoutManager)null);
- ((Dialog)this).addNotify();
- ((Component)this).resize(((Container)this).insets().left + ((Container)this).insets().right + 250, ((Container)this).insets().top + ((Container)this).insets().bottom + 135);
- this.yesButton = new Button(" Yes ");
- this.yesButton.reshape(((Container)this).insets().left + 36, ((Container)this).insets().top + 84, 79, 22);
- ((Container)this).add(this.yesButton);
- this.noButton = new Button(" No ");
- this.noButton.reshape(((Container)this).insets().left + 144, ((Container)this).insets().top + 84, 79, 22);
- ((Container)this).add(this.noButton);
- this.label1 = new Label("Do you really want to quit?");
- this.label1.reshape(((Container)this).insets().left + 48, ((Container)this).insets().top + 36, 149, 23);
- ((Container)this).add(this.label1);
- ((Dialog)this).setTitle("Description File Converter - Quit");
- ((Dialog)this).setResizable(false);
- }
-
- public QuitDialog(Frame var1, String var2, boolean var3) {
- this(var1, var3);
- ((Dialog)this).setTitle(var2);
- }
-
- public synchronized void show() {
- Rectangle var1 = ((Component)this).getParent().bounds();
- Rectangle var2 = ((Component)this).bounds();
- ((Component)this).move(var1.x + (var1.width - var2.width) / 2, var1.y + (var1.height - var2.height) / 2);
- super.show();
- }
-
- public boolean handleEvent(Event var1) {
- if (var1.id == 201) {
- ((Component)this).hide();
- return true;
- } else {
- if (var1.target == this.noButton && var1.id == 1001) {
- this.noButton_Clicked(var1);
- }
-
- if (var1.target == this.yesButton && var1.id == 1001) {
- this.yesButton_Clicked(var1);
- }
-
- return super.handleEvent(var1);
- }
- }
- }
-