1
2 package org.catacomb.druid.blocks;
3
4
5 import org.catacomb.druid.build.Context;
6 import org.catacomb.druid.build.GUIPath;
7 import org.catacomb.druid.gui.base.DruPanel;
8 import org.catacomb.druid.gui.edit.DruTextField;
9 import org.catacomb.report.E;
10
11
12 public class TextField extends Panel {
13
14
15 public String label;
16
17 public String store;
18
19 public String action;
20
21 public int width;
22
23 public String report;
24
25 public boolean able = true;
26
27
28 public TextField() {
29 }
30
31
32 public TextField(String slab) {
33 label = slab;
34 action = label;
35 }
36
37
38 public DruPanel instantiatePanel() {
39 return new DruTextField(action, width);
40 }
41
42 public void populatePanel(DruPanel dp, Context ctx, GUIPath gpath) {
43
44 DruTextField dtf = (DruTextField)dp;
45
46
47
48 if (report != null) {
49 E.deprecate();
50 }
51
52 if (action != null) {
53 dtf.setReturnAction(action);
54 }
55
56 if (!able) {
57 dtf.able(false);
58 }
59
60
61 }
62
63 }