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
133
134
135
136
137
138
139
140
141
|
/* */ package NET.worlds.network;
/* */
/* */ import NET.worlds.console.Console;
/* */ import NET.worlds.console.MultiLineLabel;
/* */ import NET.worlds.console.PolledDialog;
/* */ import NET.worlds.core.Std;
/* */ import java.awt.Button;
/* */ import java.awt.Event;
/* */ import java.awt.GridBagConstraints;
/* */ import java.awt.GridBagLayout;
/* */ import java.text.MessageFormat;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class NewVersionDialog
/* */ extends PolledDialog
/* */ {
/* */ private static final long serialVersionUID = -2091867202100838097L;
/* 35 */ private Button yesButton = new Button(Console.message("Yes-Restart"));
/* 36 */ private Button noButton = new Button(Console.message("No-Keep-Playing"));
/* */
/* */
/* */
/* */
/* */
/* 42 */ Object[] arguments = { new String(Std.getProductName()) };
/* 43 */ private String message = MessageFormat.format(
/* 44 */ Console.message("upgrade-is-now"), this.arguments);
/* */
/* */
/* 47 */ private static String title = Console.message("Download-Complete");
/* */
/* */
/* */
/* */
/* */ public NewVersionDialog()
/* */ {
/* 54 */ super(Console.getFrame(), null, title, false);
/* 55 */ setAlignment(1);
/* 56 */ readySetGo();
/* */ }
/* */
/* */
/* */
/* */ protected void build()
/* */ {
/* 63 */ GridBagLayout gbag = new GridBagLayout();
/* 64 */ setLayout(gbag);
/* 65 */ GridBagConstraints c = new GridBagConstraints();
/* 66 */ c.anchor = 10;
/* 67 */ c.fill = 0;
/* 68 */ c.weightx = 1.0D;
/* 69 */ c.weighty = 1.0D;
/* 70 */ c.gridwidth = 0;
/* 71 */ c.gridheight = 1;
/* 72 */ add(gbag, new MultiLineLabel(this.message, 5, 5), c);
/* 73 */ c.gridwidth = 2;
/* 74 */ add(gbag, this.yesButton, c);
/* 75 */ add(gbag, this.noButton, c);
/* */ }
/* */
/* */
/* */ public void setVisible(boolean visible)
/* */ {
/* 81 */ super.setVisible(visible);
/* 82 */ if (visible) {
/* 83 */ this.yesButton.requestFocus();
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */ public synchronized boolean confirmRestart()
/* */ {
/* 92 */ while (isActive()) {
/* */ try {
/* 94 */ wait();
/* */ }
/* */ catch (InterruptedException localInterruptedException) {}
/* */ }
/* 98 */ return getConfirmed();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ protected synchronized boolean done(boolean confirmed)
/* */ {
/* 107 */ boolean retCode = super.done(confirmed);
/* 108 */ notify();
/* 109 */ return retCode;
/* */ }
/* */
/* */
/* */ @Deprecated
/* */ public boolean action(Event event, Object what)
/* */ {
/* 116 */ if (event.target == this.yesButton)
/* 117 */ return done(true);
/* 118 */ if (event.target == this.noButton)
/* 119 */ return done(false);
/* 120 */ return false;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Deprecated
/* */ public boolean keyDown(Event event, int key)
/* */ {
/* 131 */ if (key == 27)
/* 132 */ return done(false);
/* 133 */ return super.keyDown(event, key);
/* */ }
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\network\NewVersionDialog.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|