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.console;
/* */
/* */ import java.awt.Button;
/* */ import java.awt.Event;
/* */ import java.awt.Font;
/* */ import java.awt.GridBagConstraints;
/* */ import java.awt.GridBagLayout;
/* */ import java.awt.Label;
/* */ import java.awt.Panel;
/* */ import java.awt.TextField;
/* */ import java.awt.Window;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class ChannelDialog
/* */ extends PolledDialog
/* */ {
/* */ private static final long serialVersionUID = -3677512952231237135L;
/* 37 */ private Label channelLabel = new Label(Console.message("New-channel"));
/* 38 */ private Button okButton = new Button(Console.message("OK"));
/* 39 */ private Button cancelButton = new Button(Console.message("Cancel"));
/* 40 */ private static Font font = new Font(Console.message("MenuFont"),
/* 41 */ 0, 12);
/* */
/* */
/* */
/* */ private TextField channelField;
/* */
/* */
/* */
/* */
/* */ public ChannelDialog(Window parent, DialogReceiver receiver, String title, String defChannel)
/* */ {
/* 52 */ super(parent, receiver, title, true);
/* */
/* 54 */ this.channelField = new TextField(defChannel);
/* */
/* 56 */ ready();
/* */ }
/* */
/* */ public String getChannel()
/* */ {
/* 61 */ return this.channelField.getText();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ protected void build()
/* */ {
/* 70 */ GridBagLayout gbag = new GridBagLayout();
/* 71 */ setLayout(gbag);
/* 72 */ GridBagConstraints c = new GridBagConstraints();
/* 73 */ c.weightx = 1.0D;
/* 74 */ c.weighty = 1.0D;
/* 75 */ c.gridheight = 1;
/* 76 */ c.fill = 0;
/* */
/* 78 */ c.gridwidth = 2;
/* 79 */ this.channelLabel.setFont(font);
/* 80 */ add(gbag, this.channelLabel, c);
/* 81 */ c.gridwidth = 0;
/* 82 */ c.fill = 2;
/* 83 */ this.channelField.setFont(font);
/* 84 */ add(gbag, this.channelField, c);
/* */
/* 86 */ Panel buttons = new Panel();
/* 87 */ buttons.add(this.okButton);
/* 88 */ buttons.add(this.cancelButton);
/* 89 */ this.okButton.setFont(font);
/* 90 */ this.cancelButton.setFont(font);
/* 91 */ c.gridwidth = 0;
/* 92 */ c.fill = 0;
/* 93 */ add(gbag, buttons, c);
/* */ }
/* */
/* */
/* */
/* */ public void setVisible(boolean visible)
/* */ {
/* 100 */ if (visible) {
/* 101 */ initialSize(320, 140);
/* 102 */ super.setVisible(visible);
/* 103 */ this.channelField.requestFocus();
/* */ } else {
/* 105 */ super.setVisible(visible);
/* */ }
/* */ }
/* */
/* */ @Deprecated
/* */ public boolean handleEvent(Event event)
/* */ {
/* 112 */ if (event.id == 201)
/* 113 */ return done(false);
/* 114 */ return super.handleEvent(event);
/* */ }
/* */
/* */ @Deprecated
/* */ public boolean action(Event event, Object what)
/* */ {
/* 120 */ Object target = event.target;
/* 121 */ if (target == this.cancelButton) {
/* 122 */ done(false);
/* 123 */ } else if (target == this.okButton)
/* 124 */ done(true);
/* 125 */ 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\console\ChannelDialog.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|