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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
/* */ package NET.worlds.console;
/* */
/* */ import NET.worlds.core.IniFile;
/* */ import NET.worlds.core.Std;
/* */ import NET.worlds.network.NetUpdate;
/* */ import java.awt.BorderLayout;
/* */ import java.awt.Button;
/* */ import java.awt.Color;
/* */ import java.awt.Component;
/* */ import java.awt.Event;
/* */ import java.awt.Font;
/* */ import java.awt.Frame;
/* */ import java.awt.GridBagConstraints;
/* */ import java.awt.GridBagLayout;
/* */ import java.awt.Label;
/* */ import java.awt.Panel;
/* */ import java.awt.TextArea;
/* */ import java.util.Enumeration;
/* */ import java.util.Vector;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class AboutDialog
/* */ extends PolledDialog
/* */ {
/* */ private static final long serialVersionUID = -2810306367601133331L;
/* 63 */ Button okButton = new Button(Console.message("OK"));
/* */
/* 65 */ private static Font font = new Font(
/* 66 */ Console.message("ConsoleFont"), 0, 12);
/* 67 */ private static Font bfont = new Font(
/* 68 */ Console.message("ButtonFont"), 0, 12);
/* */ String apptitle;
/* */
/* */ AboutDialog(String apptitle, Frame frame)
/* */ {
/* 73 */ super(frame, null, Console.message("About") + Std.getProductName(), true);
/* 74 */ this.apptitle = apptitle;
/* 75 */ ready();
/* */ }
/* */
/* */ private Component setConstraints(GridBagLayout gbag, Component comp, GridBagConstraints c)
/* */ {
/* 80 */ gbag.setConstraints(comp, c);
/* 81 */ return comp;
/* */ }
/* */
/* */ protected void build()
/* */ {
/* 86 */ setBackground(Color.white);
/* */
/* 88 */ setLayout(new BorderLayout());
/* 89 */ add("North", new Filler(10, 10));
/* 90 */ add("South", new Filler(10, 10));
/* 91 */ add("East", new Filler(10, 10));
/* 92 */ add("West", new Filler(10, 10));
/* */
/* 94 */ GridBagLayout gbag = new GridBagLayout();
/* 95 */ Panel p = new Panel(gbag);
/* 96 */ p.setFont(font);
/* */
/* 98 */ GridBagConstraints c = new GridBagConstraints();
/* 99 */ c.fill = 0;
/* 100 */ c.weightx = 1.0D;
/* 101 */ c.weighty = 1.0D;
/* 102 */ c.gridwidth = 0;
/* 103 */ c.gridheight = 1;
/* 104 */ String logo = IniFile.override().getIniString("AboutLogo", Console.message("wlogo.gif"));
/* 105 */ p.add(setConstraints(gbag, new ImageCanvas(logo), c));
/* 106 */ c.weightx = 0.0D;
/* 107 */ c.weighty = 0.0D;
/* 108 */ p.add(setConstraints(gbag, new Label(this.apptitle), c));
/* 109 */ if (Gamma.getShaper() != null) {
/* 110 */ p.add(setConstraints(
/* 111 */ gbag,
/* 112 */ new Label(Console.message("about-box-build-date") +
/* 113 */ " " +
/* 114 */ Std.getBuildInfo() + ":" + Std.getJavaVersion()), c));
/* */ } else {
/* 116 */ p.add(setConstraints(
/* 117 */ gbag,
/* 118 */ new Label(Console.message("about-box-rev") +
/* 119 */ " " +
/* 120 */ Std.getVersion() +
/* 121 */ " : " + Std.getJavaVersion()), c));
/* */ }
/* 123 */ Vector<String> worlds = NetUpdate.aboutWorlds();
/* 124 */ TextArea worldList = new TextArea(10, 40);
/* 125 */ worldList.setEditable(false);
/* */
/* 127 */ p.add(setConstraints(gbag, worldList, c));
/* */
/* 129 */ for (Enumeration<String> e = worlds.elements(); e.hasMoreElements();) {
/* 130 */ worldList.append((String)e.nextElement() + "\n");
/* */ }
/* */
/* 133 */ p.add(setConstraints(gbag,
/* 134 */ new Label(Console.message("about-box-1")), c));
/* 135 */ p.add(setConstraints(gbag,
/* 136 */ new Label(Console.message("about-box-2")), c));
/* */
/* 138 */ this.okButton.setFont(bfont);
/* 139 */ p.add(setConstraints(gbag, this.okButton, c));
/* */
/* 141 */ add("Center", p);
/* */ }
/* */
/* */ @Deprecated
/* */ public boolean action(Event event, Object what)
/* */ {
/* 147 */ if (event.target == this.okButton)
/* 148 */ return done(true);
/* 149 */ return false;
/* */ }
/* */
/* */ @Deprecated
/* */ public boolean keyDown(Event event, int key)
/* */ {
/* 155 */ if ((key == 27) || (key == 10))
/* 156 */ return done(true);
/* 157 */ return super.keyDown(event, key);
/* */ }
/* */
/* */
/* */
/* */ public void setVisible(boolean visible)
/* */ {
/* 164 */ super.setVisible(visible);
/* 165 */ if (visible) {
/* 166 */ this.okButton.requestFocus();
/* */ }
/* */ }
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\AboutDialog.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|