36 |
|
private final int DEFAULT_HEIGHT = 600; |
37 |
|
|
38 |
|
/** |
39 |
< |
* The i-scream server port |
39 |
> |
* The default configuration fle |
40 |
> |
* This can be specified on the command line |
41 |
|
*/ |
42 |
< |
public static final int PORT = 4510; |
42 |
> |
public static final String DEFAULT_CONFIG_FILE = "./etc/default.conf"; |
43 |
|
|
44 |
|
//---STATIC METHODS--- |
45 |
|
|
52 |
|
public static void main(String[] args) { |
53 |
|
// get the host from the command line if they gave it |
54 |
|
String host = null; |
55 |
+ |
String configFile = DEFAULT_CONFIG_FILE; |
56 |
|
if (args.length == 1) { |
57 |
< |
host = args[0]; |
57 |
> |
configFile = args[0]; |
58 |
|
} |
59 |
+ |
|
60 |
+ |
// start the configuration system |
61 |
+ |
Configuration.initialise(configFile); |
62 |
|
|
63 |
|
// the data display panel |
64 |
|
DataPanel data = new DataPanel(); |
69 |
|
// the main frame (passed the two panels) |
70 |
|
Conient client = new Conient(data, control); |
71 |
|
Conient.addMessage("Conient {an i-scream Client} © 2001 University of Kent & Project i-scream"); |
72 |
+ |
|
73 |
|
Conient.addMessage("Conient ready."); |
74 |
|
} |
75 |
|
|
106 |
|
bottom.add(messagesPane, "Center"); |
107 |
|
JPanel statusPanel = new JPanel(); |
108 |
|
JPanel linkPanel = new JPanel(); |
109 |
< |
linkPanel.setLayout(new GridLayout(2,1)); |
109 |
> |
linkPanel.setLayout(new GridLayout(1,2)); |
110 |
|
linkPanel.add(_controlStatus); |
111 |
|
linkPanel.add(_dataStatus); |
112 |
< |
statusPanel.setLayout(new GridLayout(1,3)); |
112 |
> |
statusPanel.setLayout(new GridLayout(2,1)); |
113 |
|
statusPanel.add(linkPanel); |
114 |
|
statusPanel.add(_queueStatus); |
115 |
|
bottom.add(statusPanel, "South"); |
199 |
|
* The place where system messages are written. |
200 |
|
*/ |
201 |
|
static JTextArea _messages = new JTextArea(); |
202 |
+ |
{ |
203 |
+ |
_messages.setLineWrap(true); |
204 |
+ |
} |
205 |
|
} |