private void createForm( final Display display, String room, String server, String nick, final String password) { this.display = display; parentView = display.getCurrent(); Form formJoin = new Form(SR.MS_JOIN_CONFERENCE); roomField = new TextField(SR.MS_ROOM, room, 64, ConstMIDP.TEXTFIELD_URL); TextFieldCombo.setLowerCaseLatin(roomField); formJoin.append(roomField); hostField = new TextField(SR.MS_AT_HOST, server, 64, ConstMIDP.TEXTFIELD_URL); TextFieldCombo.setLowerCaseLatin(hostField); formJoin.append(hostField); if (nick == null) nick = sd.account.getNickName(); nickField = new TextFieldCombo(SR.MS_NICKNAME, nick, 32, TextField.ANY, "roomnick", display); formJoin.append(nickField); passField = new TextField(SR.MS_PASSWORD, password, 32, TextField.ANY | ConstMIDP.TEXTFIELD_SENSITIVE); formJoin.append(passField); msgLimitField = new NumberField(SR.MS_MSG_LIMIT, 20, 0, 20); formJoin.append(msgLimitField); formJoin.addCommand(cmdJoin); // formJoin.addCommand(cmdBookmarks); formJoin.addCommand(cmdAdd); formJoin.addCommand(cmdCancel); formJoin.setCommandListener(this); display.setCurrent(formJoin); }
/** Creates a new instance of PrivacyForm */ public PrivacyForm(Display display, PrivacyItem item, PrivacyList plist) { this.display = display; parentView = display.getCurrent(); this.item = item; targetList = plist; textValue = new TextField(null, item.value, 64, ConstMIDP.TEXTFIELD_URL); TextFieldCombo.setLowerCaseLatin(textValue); form.append(choiceAction); choiceAction.setSelectedIndex(item.action, true); form.append(choiseType); form.append(textValue); choiseType.setSelectedIndex(item.type, true); switchType(); form.append(choiseStanzas); choiseStanzas.setSelectedFlags(item.stanzasSet); // form.append("Order: "+item.order); form.setItemStateListener(this); form.setCommandListener(this); form.addCommand(cmdOk); form.addCommand(cmdCancel); display.setCurrent(form); }