1
// **********************************************************************
3
// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
5
// This copy of Ice-E is licensed to you under the terms described in the
6
// ICEE_LICENSE file included in this distribution.
8
// **********************************************************************
10
import javax.microedition.lcdui.*;
12
public class ClientMIDlet extends ClientBase
14
protected ConfigurationForm
15
initConfigurationForm(javax.microedition.midlet.MIDlet parent, Ice.Properties properties)
17
_properties = properties;
18
ConfigurationForm cf = new ConfigurationForm(parent, properties);
19
_addr = new TextField("Addr: ", properties.getPropertyWithDefault("Test.Host", "127.0.0.1"), 128,
21
_port = new TextField("Port: ", properties.getPropertyWithDefault("Test.FirstPort", "12010"), 128,
24
String count = properties.getPropertyWithDefault("Test.ServerCount", "13");
25
_serverCount = new TextField("Server count:", count.trim(), 128, TextField.NUMERIC);
29
cf.append(_serverCount);
32
// We enable the ok button here in this particular midlet
33
// instead of waiting for the IP address to be resolved. This
34
// works around a problem in the Nokia S40 2nd emulator where it
35
// doesn't seem to be possible to add commands to a Displayable
36
// once its been set. The workaround isn't needed on any other
37
// emulators or devices that were tested.
44
updateProperties(Ice.Properties properties)
46
properties.setProperty("Test.FirstPort", _port.getString());
47
properties.setProperty("Test.ServerCount", _serverCount.getString());
48
properties.setProperty("Test.Host", _addr.getString());
55
// Nothing to do here. See comment re: S40 emulator workaround
56
// in this MIDlet's initConfigurationForm method.
60
private TextField _serverCount;