289 |
|
JLabel commandLabel = new JLabel("Firewall command:"); |
290 |
|
commandLabel.setHorizontalAlignment(JLabel.RIGHT); |
291 |
|
firewallCommand = new JTextField(20); |
292 |
– |
firewallCommand.setSize(new Dimension(1,10)); |
292 |
|
JPanel commandBox = new JPanel(); |
293 |
|
commandBox.setLayout(new GridLayout(1,2)); |
294 |
|
commandBox.add(commandLabel); |
348 |
|
c.gridy = 2; |
349 |
|
gridbag.setConstraints(packetDump, c); |
350 |
|
dataPanel.add(packetDump); |
351 |
+ |
|
352 |
+ |
JLabel queueLimitLabel = new JLabel("Maximum data queue size:"); |
353 |
+ |
queueLimitLabel.setHorizontalAlignment(JLabel.RIGHT); |
354 |
+ |
queueLimit = new JTextField(4); |
355 |
+ |
JPanel queueBox = new JPanel(); |
356 |
+ |
queueBox.setLayout(new GridLayout(1,2)); |
357 |
+ |
queueBox.add(queueLimitLabel); |
358 |
+ |
queueBox.add(queueLimit); |
359 |
+ |
c.gridy = 3; |
360 |
+ |
gridbag.setConstraints(queueBox, c); |
361 |
+ |
dataPanel.add(queueBox); |
362 |
|
return dataPanel; |
363 |
|
} |
364 |
|
|
381 |
|
useFirewall.setSelected(config.getProperty("useFirewall").equals("1")); |
382 |
|
hostDiscoveryMode.setSelected(config.getProperty("hostDiscoveryMode").equals("1")); |
383 |
|
useHostList.setSelected(config.getProperty("useHostList").equals("1")); |
384 |
+ |
queueLimit.setText(config.getProperty("dataQueueSize")); |
385 |
|
prepareLists(); |
386 |
|
} |
387 |
|
|
420 |
|
config.setProperty("firewall.command", firewallCommand.getText().trim()); |
421 |
|
config.setProperty("firewall.commandwait", firewallWait.getText().trim()); |
422 |
|
config.setProperty("firewall.server", firewallServer.getText().trim()); |
423 |
+ |
config.setProperty("dataQueueSize", queueLimit.getText().trim()); |
424 |
|
if (useFirewall.isSelected()) { |
425 |
|
config.setProperty("useFirewall", "1"); |
426 |
|
} else { |
578 |
|
* Whether to dump raw packet data to the console |
579 |
|
*/ |
580 |
|
private JCheckBox packetDump; |
581 |
+ |
|
582 |
+ |
/** |
583 |
+ |
* The limit on the data queue size |
584 |
+ |
*/ |
585 |
+ |
private JTextField queueLimit; |
586 |
|
|
587 |
|
/** |
588 |
|
* holds the known hosts |