client.framework.views
Class StartupWindow
java.lang.Object
Form
client.framework.views.StartupWindow
public class StartupWindow
- extends Form
This method is called when the MIDlet is started.
It only contains a form where the user can type his
name. After selecting "OK", the user is taken to the
LobbyView
screen, and the framework is
intialised.
- Author:
- Eivind Sorteberg, Martin Jarrett
Field Summary |
static java.lang.String |
COMM
|
static java.lang.String |
IP
|
static java.lang.String |
NAME
|
static java.lang.String |
PORT
|
static java.lang.String |
SIZE
|
static java.lang.String |
TCP
|
static java.lang.String |
UDP
|
Constructor Summary |
StartupWindow(AbstractGame model)
The constructor creates text fields for typing the player name
(10 characters), the server address, and the server port. |
Method Summary |
void |
commandAction(Command command,
Displayable displayable)
Called when the user selects the "OK" command. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UDP
public static final java.lang.String UDP
- See Also:
- Constant Field Values
TCP
public static final java.lang.String TCP
- See Also:
- Constant Field Values
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
IP
public static final java.lang.String IP
- See Also:
- Constant Field Values
PORT
public static final java.lang.String PORT
- See Also:
- Constant Field Values
COMM
public static final java.lang.String COMM
- See Also:
- Constant Field Values
SIZE
public static final java.lang.String SIZE
- See Also:
- Constant Field Values
StartupWindow
public StartupWindow(AbstractGame model)
- The constructor creates text fields for typing the player name
(10 characters), the server address, and the server port. In addition,
the user has a choice between using UDP or TCP for the communication.
- Parameters:
model
- The underlying game model
commandAction
public void commandAction(Command command,
Displayable displayable)
- Called when the user selects the "OK" command. This
method initialises the framework, and takes the user
to the lobby view.
- Parameters:
command
- Can only be the "OK" command.displayable
- This Form
.- See Also:
AbstractGame.startFramework(String, String[], int)