summaryrefslogtreecommitdiff
path: root/NET/worlds/console/ConfirmDialog.java
blob: 8b368e4b4b38cf360371a643c24d166f32c115e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*    */ package NET.worlds.console;
/*    */ 
/*    */ import java.awt.Button;
/*    */ import java.awt.GridBagConstraints;
/*    */ import java.awt.Label;
/*    */ import java.awt.Window;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class ConfirmDialog
/*    */   extends OkCancelDialog
/*    */ {
/*    */   private static final long serialVersionUID = 2839131701328189735L;
/*    */   private String prompt;
/*    */   
/*    */   public ConfirmDialog(Window parent, DialogReceiver target, String title, String prompt)
/*    */   {
/* 29 */     super(parent, target, title, Console.message("No"), Console.message("Yes"));
/* 30 */     this.prompt = prompt;
/* 31 */     ready();
/*    */   }
/*    */   
/*    */   public ConfirmDialog(Window parent, String title, String prompt) {
/* 35 */     this(parent, (DialogReceiver)parent, title, prompt);
/*    */   }
/*    */   
/*    */   protected void build()
/*    */   {
/* 40 */     GridBagConstraints c = new GridBagConstraints();
/* 41 */     c.weightx = 1.0D;
/* 42 */     c.weighty = 1.0D;
/* 43 */     c.gridwidth = 0;
/* 44 */     add(this.gbag, new Label(this.prompt), c);
/* 45 */     super.build();
/*    */   }
/*    */   
/*    */   protected boolean setValue()
/*    */   {
/* 50 */     return true;
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */   public void setVisible(boolean visible)
/*    */   {
/* 57 */     super.setVisible(visible);
/* 58 */     if (visible) {
/* 59 */       this.okButton.requestFocus();
/*    */     }
/*    */   }
/*    */ }


/* Location:              C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\ConfirmDialog.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */