MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / EditBox

Method EditBox

src/main/java/ui/controls/form/EditBox.java:66–84  ·  view source on GitHub ↗
(VirtualList parentList, String caption, String text, TextInput ti, int boxType)

Source from the content-addressed store, hash-verified

64 private String caption;
65
66 public EditBox(VirtualList parentList, String caption, String text, TextInput ti, int boxType) {
67 this.ti = ti;
68 this.caption = caption;
69 this.parentList = parentList;
70 t = new ExTextBox(parentList, text, caption, false);
71 t.textbox.setConstraints(boxType);
72 t.textbox.addCommand(cmdOk);
73 if (ti.id != null) {
74 loadRecentList();
75 if (recentList.size() > 0) {
76 t.textbox.addCommand(cmdRecent);
77 }
78 }
79 t.textbox.addCommand(cmdCancel);
80 if (Config.getInstance().capsState) {
81 t.textbox.setConstraints(TextField.INITIAL_CAPS_SENTENCE | boxType);
82 }
83 t.show(this);
84 }
85
86 public void commandAction(Command c, Displayable d){
87 if (t.executeCommand(c, d)) {

Callers

nothing calls this directly

Calls 6

loadRecentListMethod · 0.95
getInstanceMethod · 0.95
setConstraintsMethod · 0.65
addCommandMethod · 0.45
sizeMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected