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

Method cmdOk

src/main/java/PrivacyLists/PrivacyForm.java:155–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153 }
154
155 public void cmdOk() {
156 try {
157 int type=choiceType.getSelectedIndex();
158 String value=textValue.getValue();
159 if (type==2) value=PrivacyItem.subscrs[choiceSubscr.getSelectedIndex()];
160 if (type!=PrivacyItem.ITEM_ANY)
161 if (value.length()==0) return;
162
163 item.action=choiceAction.getSelectedIndex();
164 item.type=type;
165 item.value=value;
166
167 item.messageStz=messageStz.getValue();
168 item.presenceInStz=presenceInStz.getValue();
169 item.presenceOutStz=presenceOutStz.getValue();
170 item.iqStz=iqStz.getValue();
171
172 if (targetList!=null) {
173 if (!targetList.rules.contains(item)) {
174 targetList.addRule(item);
175 item.order=targetList.rules.indexOf(item)*10;
176 }
177 }
178 } catch (Exception e) { }
179 destroyView();
180 }
181}
182
183//#endif

Callers

nothing calls this directly

Calls 5

getSelectedIndexMethod · 0.80
addRuleMethod · 0.80
getValueMethod · 0.45
containsMethod · 0.45
destroyViewMethod · 0.45

Tested by

no test coverage detected