blob: 29d9e7e4a902deadd797fbf503d8b3cfab4c7e94 (
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
69
|
/* */ package NET.worlds.scape;
/* */
/* */ import NET.worlds.console.Console;
/* */ import NET.worlds.console.OkCancelDialog;
/* */ import java.awt.Font;
/* */ import java.awt.GridBagConstraints;
/* */ import java.awt.TextField;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public abstract class FieldEditorDialog
/* */ extends OkCancelDialog
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* 23 */ private TextField strField = new TextField(40);
/* */
/* */ protected EditTile parent;
/* 26 */ private static Font font = new Font(Console.message("GammaTextFont"), 0, 12);
/* */
/* */ protected FieldEditorDialog(EditTile parent, String title) {
/* 29 */ super(Console.getFrame(), parent, title);
/* 30 */ this.parent = parent;
/* */ }
/* */
/* */ protected void build() {
/* 34 */ GridBagConstraints c = new GridBagConstraints();
/* 35 */ c.fill = 2;
/* 36 */ c.weightx = 1.0D;
/* 37 */ c.weighty = 1.0D;
/* 38 */ c.gridwidth = 0;
/* 39 */ this.strField.setFont(font);
/* 40 */ add(this.gbag, this.strField, c);
/* 41 */ super.build();
/* */ }
/* */
/* */ protected abstract String getValue();
/* */
/* */ protected abstract boolean setValue(String paramString);
/* */
/* */ protected boolean setValue() {
/* 49 */ return setValue(this.strField.getText().trim());
/* */ }
/* */
/* */
/* */
/* */ public void setVisible(boolean visible)
/* */ {
/* 56 */ super.setVisible(visible);
/* 57 */ if (visible) {
/* 58 */ this.strField.setText(getValue());
/* 59 */ this.strField.requestFocus();
/* 60 */ this.strField.selectAll();
/* */ }
/* */ }
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FieldEditorDialog.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|