home *** CD-ROM | disk | FTP | other *** search
- package dsntool;
-
- import java.awt.Button;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Dialog;
- import java.awt.Font;
- import java.awt.Frame;
- import java.awt.Label;
- import java.awt.LayoutManager;
- import java.awt.Rectangle;
- import java.awt.Window;
- import java.awt.event.ActionEvent;
- import java.awt.event.WindowEvent;
- import symantec.itools.awt.KeyPressManagerPanel;
-
- public class DeleteBox extends Dialog {
- KeyPressManagerPanel kpm;
- Button yesButton;
- Button noButton;
- Label msg;
- Label msg2;
-
- public DeleteBox(Frame var1, String var2) {
- super(var1, "Delete Data Source Name?", true);
- ((Dialog)this).setResizable(false);
- ((Container)this).setLayout((LayoutManager)null);
- ((Component)this).resize(((Container)this).insets().left + ((Container)this).insets().right + 373, ((Container)this).insets().top + ((Container)this).insets().bottom + 135);
- this.kpm = new KeyPressManagerPanel();
- this.kpm.setLayout((LayoutManager)null);
- this.kpm.reshape(0, 0, 373, 135);
- ((Container)this).add(this.kpm);
- this.msg = new Label(var2, 1);
- this.msg.setFont(new Font("Helvetica", 0, 11));
- this.kpm.add(this.msg);
- this.msg.setBounds(((Container)this).insets().left + 90 - var2.length(), ((Container)this).insets().top + 35, 204, 23);
- this.msg2 = new Label("will be deleted. Are you sure?", 1);
- this.msg2.setFont(new Font("Helvetica", 0, 11));
- this.kpm.add(this.msg2);
- this.msg2.setBounds(((Container)this).insets().left + 84, ((Container)this).insets().top + 55, 204, 23);
- this.noButton = new Button("Keep DSN");
- this.noButton.setActionCommand("button");
- this.noButton.setFont(new Font("Helvetica", 0, 11));
- this.kpm.add(this.noButton);
- this.noButton.setBounds(((Container)this).insets().left + 200, ((Container)this).insets().top + 84, 79, 22);
- this.yesButton = new Button("Delete DSN");
- this.yesButton.setActionCommand("button");
- this.yesButton.setFont(new Font("Helvetica", 0, 11));
- this.kpm.add(this.yesButton);
- this.yesButton.setBounds(((Container)this).insets().left + 50, ((Container)this).insets().top + 84, 79, 22);
- this.noButton.requestFocus();
- SymWindow var3 = new SymWindow(this);
- ((Window)this).addWindowListener(var3);
- SymAction var4 = new SymAction(this);
- this.noButton.addActionListener(var4);
- this.yesButton.addActionListener(var4);
- }
-
- 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 synchronized void wakeUp() {
- this.notify();
- }
-
- void DeleteBox_WindowClosing(WindowEvent var1) {
- this.noButton.setLabel("Default Cancel");
- ActionEvent var2 = new ActionEvent(this.noButton, 1001, "button");
- this.Button_Action(var2);
- }
-
- void Button_Action(ActionEvent var1) {
- ((Component)this).hide();
- ((Window)this).dispose();
- ((DSNTOOL)((Component)this).getParent()).aSymAction.actionPerformed(var1);
- }
- }
-