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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
/* */ package NET.worlds.console;
/* */
/* */ import NET.worlds.network.Galaxy;
/* */ import NET.worlds.network.VarErrorException;
/* */ import java.awt.BorderLayout;
/* */ import java.awt.Button;
/* */ import java.awt.Event;
/* */ import java.awt.Font;
/* */ import java.awt.Panel;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class InternetConnectionDialog
/* */ extends PolledDialog
/* */ {
/* */ private static final long serialVersionUID = 612016940893432560L;
/* */ private String msg;
/* 35 */ private Button okButton = new Button(Console.message("Retry"));
/* 36 */ private Button cancelButton = new Button(Console.message("Single-user"));
/* */
/* */ private static boolean firstTimeDone;
/* */ private static boolean choseSingleUserMode;
/* 40 */ private static Font bfont = new Font(Console.message("ButtonFont"),
/* 41 */ 0, 12);
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isFirstTimeDone()
/* */ {
/* 50 */ return firstTimeDone;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean choseSingleUserMode()
/* */ {
/* 60 */ return choseSingleUserMode;
/* */ }
/* */
/* */
/* */ public InternetConnectionDialog(Galaxy galaxy, VarErrorException ve)
/* */ {
/* 66 */ super(Console.getFrame(), galaxy, Console.message("Internet-Connection"), true);
/* 67 */ setAlignment(1);
/* 68 */ this.msg = ve.getMsg().replace('\n', ' ');
/* 69 */ ready();
/* */ }
/* */
/* */ protected boolean done(boolean confirmed)
/* */ {
/* 74 */ boolean ret = super.done(confirmed);
/* 75 */ choseSingleUserMode = !confirmed;
/* 76 */ firstTimeDone = true;
/* 77 */ return ret;
/* */ }
/* */
/* */ protected void build()
/* */ {
/* 82 */ setLayout(new BorderLayout());
/* 83 */ Panel txtPanel = new Panel(new BorderLayout());
/* 84 */ txtPanel.add("Center", new TextCanvas(this.msg, 400));
/* 85 */ txtPanel.add("North", new Filler(10, 10));
/* 86 */ txtPanel.add("South", new Filler(10, 10));
/* 87 */ txtPanel.add("East", new Filler(10, 10));
/* 88 */ txtPanel.add("West", new Filler(10, 10));
/* */
/* 90 */ add("Center", txtPanel);
/* */
/* 92 */ Panel buttons = new Panel();
/* 93 */ this.okButton.setFont(bfont);
/* 94 */ this.cancelButton.setFont(bfont);
/* 95 */ buttons.add(this.okButton);
/* 96 */ buttons.add(this.cancelButton);
/* */
/* 98 */ add("South", buttons);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Deprecated
/* */ public boolean action(Event event, Object what)
/* */ {
/* 109 */ Object target = event.target;
/* 110 */ if (target == this.okButton)
/* 111 */ return done(true);
/* 112 */ if (target == this.cancelButton)
/* 113 */ return done(false);
/* 114 */ return false;
/* */ }
/* */
/* */ @Deprecated
/* */ public boolean keyDown(Event event, int key)
/* */ {
/* 120 */ if (key == 27)
/* 121 */ return done(false);
/* 122 */ if (key == 10)
/* 123 */ return done(true);
/* 124 */ return super.keyDown(event, key);
/* */ }
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\InternetConnectionDialog.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|