MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / createForm

Method createForm

src/main/java/Conference/ConferenceForm.java:144–180  ·  view source on GitHub ↗
(String name, String room, String server, String nick, final String password, boolean autojoin)

Source from the content-addressed store, hash-verified

142 }
143
144 private void createForm(String name, String room, String server, String nick, final String password, boolean autojoin) {
145 roomField = new TextInput(SR.MS_ROOM, room, null);
146 itemsList.addElement(roomField);
147
148 hostField = new TextInput(SR.MS_AT_HOST, server, "muc-host");
149 itemsList.addElement(hostField);
150
151 if (nick == null) {
152 nick = sd.account.getNickName();
153 }
154 nickField = new TextInput(SR.MS_NICKNAME, nick, "roomnick");
155 itemsList.addElement(nickField);
156
157 msgLimitField = new NumberInput(SR.MS_MSG_LIMIT, Integer.toString(cf.confMessageCount), 0, 100);
158 itemsList.addElement(msgLimitField);
159
160 nameField = new TextInput(SR.MS_DESCRIPTION, name, null);
161 itemsList.addElement(nameField);
162
163 passField = new PasswordInput(SR.MS_PASSWORD, password);
164 itemsList.addElement(passField);
165
166 autoJoin = new CheckBox(SR.MS_AUTOLOGIN, autojoin);
167 itemsList.addElement(autoJoin);
168
169 linkJoin = new LinkString(SR.MS_JOIN) {
170 public void doAction() {
171 Conference.join(nameField.getValue(),
172 roomField.getValue().trim() + "@" + hostField.getValue().trim()
173 + "/" + nickField.getValue(), passField.getValue(),
174 nickField.getValue(), Integer.parseInt(msgLimitField.getValue()));
175 sd.roster.show();
176 }
177 };
178 itemsList.addElement(linkJoin);
179 moveCursorTo(getNextSelectableRef(-1));
180 }
181
182 public void menuAction(MenuCommand c, VirtualList d) {
183 super.menuAction(c, d);

Callers 1

ConferenceFormMethod · 0.95

Calls 5

addElementMethod · 0.80
moveCursorToMethod · 0.80
getNextSelectableRefMethod · 0.80
getNickNameMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected