ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/conient/uk/org/iscream/cms/conient/ConfigurationDialog.java
(Generate patch)

Comparing projects/cms/source/conient/uk/org/iscream/cms/conient/ConfigurationDialog.java (file contents):
Revision 1.11 by ajm, Fri Mar 23 03:27:07 2001 UTC vs.
Revision 1.14 by tdb, Tue May 29 17:41:32 2001 UTC

# Line 1 | Line 1
1   //---PACKAGE DECLARATION---
2 < package uk.org.iscream.conient;
2 > package uk.org.iscream.cms.conient;
3  
4   //---IMPORTS---
5   import java.awt.*;
# Line 74 | Line 74 | public class ConfigurationDialog extends JDialog {
74          center.addTab("Client Options", createClientOptions());
75          
76          // _server options
77 <        center.addTab("Server Options", create_serverOptions());
77 >        center.addTab("Server Options", createServerOptions());
78  
79          // firewall options
80          center.addTab("Firewall Options", createFirewallOptions());
# Line 111 | Line 111 | public class ConfigurationDialog extends JDialog {
111          
112          JPanel clientPanel = new JPanel();
113          clientPanel.setLayout(gridbag);
114 <        JLabel _nameLabel = new JLabel("Client name:");
115 <        _nameLabel.setHorizontalAlignment(JLabel.RIGHT);
114 >        JLabel nameLabel = new JLabel("Client name:");
115 >        nameLabel.setHorizontalAlignment(JLabel.RIGHT);
116          _name = new JTextField(20);
117 <        JPanel _nameBox = new JPanel();
118 <        _nameBox.setLayout(new GridLayout(1,2));
119 <        _nameBox.add(_nameLabel);
120 <        _nameBox.add(_name);
117 >        JPanel nameBox = new JPanel();
118 >        nameBox.setLayout(new GridLayout(1,2));
119 >        nameBox.add(nameLabel);
120 >        nameBox.add(_name);
121          
122          c.gridy = 0;
123 <        gridbag.setConstraints(_nameBox, c);
124 <        clientPanel.add(_nameBox);
123 >        gridbag.setConstraints(nameBox, c);
124 >        clientPanel.add(nameBox);
125                
126          JPanel lists = new JPanel();
127          lists.setLayout(gridbag2);
128          
129 <        JPanel _knownHostsPanel = new JPanel();
130 <        _knownHostsPanel.setLayout(new BoxLayout(_knownHostsPanel, BoxLayout.Y_AXIS));
129 >        JPanel knownHostsPanel = new JPanel();
130 >        knownHostsPanel.setLayout(new BoxLayout(knownHostsPanel, BoxLayout.Y_AXIS));
131          _hostDiscoveryMode = new JCheckBox("Discover new hosts from the server");
132 <        _knownHostsPanel.add(_hostDiscoveryMode);
133 <        _knownHostsPanel.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 102)), " Known Hosts "));
132 >        knownHostsPanel.add(_hostDiscoveryMode);
133 >        knownHostsPanel.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 102)), " Known Hosts "));
134          _knownHosts = new JList();
135          _knownHosts.setVisibleRowCount(10);
136 <        JScrollPane _knownHostsScrollPane = new JScrollPane(_knownHosts);
137 <        _knownHostsPanel.add(_knownHostsScrollPane);
138 <        JLabel _newHostLabel = new JLabel("New host:");
139 <        _newHostLabel.setHorizontalAlignment(JLabel.RIGHT);
136 >        JScrollPane knownHostsScrollPane = new JScrollPane(_knownHosts);
137 >        knownHostsPanel.add(knownHostsScrollPane);
138 >        JLabel newHostLabel = new JLabel("New host:");
139 >        newHostLabel.setHorizontalAlignment(JLabel.RIGHT);
140          _newHost = new JTextField(20);
141  
142 <        JButton _newHostButton = new JButton("Add Host");
143 <        _newHostButton.addActionListener(new ActionListener() {
142 >        JButton newHostButton = new JButton("Add Host");
143 >        newHostButton.addActionListener(new ActionListener() {
144              public void actionPerformed(ActionEvent e) {
145                  _knownHostsData.add(_newHost.getText());
146                  _newHost.setText("");
# Line 157 | Line 157 | public class ConfigurationDialog extends JDialog {
157                  }
158              }
159          });
160 <        JPanel _newHostBox = new JPanel();
161 <        _newHostBox.setLayout(new GridLayout(1,3));
162 <        _newHostBox.add(_newHostLabel);
163 <        _newHostBox.add(_newHost);
160 >        JPanel newHostBox = new JPanel();
161 >        newHostBox.setLayout(new GridLayout(1,3));
162 >        newHostBox.add(newHostLabel);
163 >        newHostBox.add(_newHost);
164  
165          JPanel buttonPanel = new JPanel();
166 <        buttonPanel.add(_newHostButton);
166 >        buttonPanel.add(newHostButton);
167          buttonPanel.add(removeHostButton);
168 <        _knownHostsPanel.add(buttonPanel);        
169 <        _knownHostsPanel.add(_newHostBox);
168 >        knownHostsPanel.add(buttonPanel);        
169 >        knownHostsPanel.add(newHostBox);
170          
171  
172          c.gridy = 0;
173          c.gridx = 0;
174 <        gridbag.setConstraints(_knownHostsPanel, c);
175 <        lists.add(_knownHostsPanel);
174 >        gridbag.setConstraints(knownHostsPanel, c);
175 >        lists.add(knownHostsPanel);
176                  
177          
178          JPanel addRemoveBox = new JPanel();
# Line 211 | Line 211 | public class ConfigurationDialog extends JDialog {
211          gridbag.setConstraints(addRemoveBox, c);
212          lists.add(addRemoveBox);
213  
214 <        JPanel _hostListPanel = new JPanel();
215 <        _hostListPanel.setLayout(new BoxLayout(_hostListPanel, BoxLayout.Y_AXIS));
214 >        JPanel hostListPanel = new JPanel();
215 >        hostListPanel.setLayout(new BoxLayout(hostListPanel, BoxLayout.Y_AXIS));
216          _useHostList = new JCheckBox("Only monitor hosts in this list");
217 <        _hostListPanel.add(_useHostList);
218 <        _hostListPanel.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 102)), " Hosts To Monitor "));
217 >        hostListPanel.add(_useHostList);
218 >        hostListPanel.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 102)), " Hosts To Monitor "));
219          _hostList = new JList();
220          _hostList.setVisibleRowCount(10);
221 <        JScrollPane _hostListScrollPane = new JScrollPane(_hostList);
222 <        _hostListPanel.add(_hostListScrollPane);
221 >        JScrollPane hostListScrollPane = new JScrollPane(_hostList);
222 >        hostListPanel.add(hostListScrollPane);
223          
224          c.gridy = 0;
225          c.gridx = 2;
226 <        gridbag.setConstraints(_hostListPanel, c);
227 <        lists.add(_hostListPanel);
226 >        gridbag.setConstraints(hostListPanel, c);
227 >        lists.add(hostListPanel);
228          
229          c.gridy = 1;
230          c.gridx = 0;
# Line 238 | Line 238 | public class ConfigurationDialog extends JDialog {
238       *
239       * @return the build panel with the options
240       */
241 <    private JPanel create_serverOptions() {
241 >    private JPanel createServerOptions() {
242          GridBagLayout gridbag = new GridBagLayout();
243          GridBagConstraints c = new GridBagConstraints();
244          c.fill = GridBagConstraints.HORIZONTAL;
245 <        JPanel _serverPanel = new JPanel();
246 <        _serverPanel.setLayout(gridbag);
245 >        JPanel serverPanel = new JPanel();
246 >        serverPanel.setLayout(gridbag);
247          _connectControl = new JCheckBox("Automatically connect the control channel");
248          c.gridy = 0;
249          gridbag.setConstraints(_connectControl, c);
250 <        _serverPanel.add(_connectControl);
250 >        serverPanel.add(_connectControl);
251          _connectData = new JCheckBox("Automatically connect the data channel");
252          c.gridy = 1;
253          gridbag.setConstraints(_connectData, c);
254 <        _serverPanel.add(_connectData);
255 <        JLabel _serverLabel = new JLabel("i-scream server:");
256 <        _serverLabel.setHorizontalAlignment(JLabel.RIGHT);
254 >        serverPanel.add(_connectData);
255 >        JLabel serverLabel = new JLabel("i-scream server:");
256 >        serverLabel.setHorizontalAlignment(JLabel.RIGHT);
257          _server = new JTextField(20);
258 <        JPanel _serverBox = new JPanel();
259 <        _serverBox.setLayout(new GridLayout(1,2));
260 <        _serverBox.add(_serverLabel);
261 <        _serverBox.add(_server);
258 >        JPanel serverBox = new JPanel();
259 >        serverBox.setLayout(new GridLayout(1,2));
260 >        serverBox.add(serverLabel);
261 >        serverBox.add(_server);
262          c.gridy = 2;
263 <        gridbag.setConstraints(_serverBox, c);
264 <        _serverPanel.add(_serverBox);
265 <        JLabel _portLabel = new JLabel("Client interface port:");
266 <        _portLabel.setHorizontalAlignment(JLabel.RIGHT);
263 >        gridbag.setConstraints(serverBox, c);
264 >        serverPanel.add(serverBox);
265 >        JLabel portLabel = new JLabel("Client interface port:");
266 >        portLabel.setHorizontalAlignment(JLabel.RIGHT);
267          _port = new JTextField(4);
268 <        JPanel _portBox = new JPanel();
269 <        _portBox.setLayout(new GridLayout(1,2));
270 <        _portBox.add(_portLabel);
271 <        _portBox.add(_port);
268 >        JPanel portBox = new JPanel();
269 >        portBox.setLayout(new GridLayout(1,2));
270 >        portBox.add(portLabel);
271 >        portBox.add(_port);
272          c.gridy = 3;
273 <        gridbag.setConstraints(_portBox, c);
274 <        _serverPanel.add(_portBox);
275 <        return _serverPanel;
273 >        gridbag.setConstraints(portBox, c);
274 >        serverPanel.add(portBox);
275 >        return serverPanel;
276      }
277  
278      /**
# Line 286 | Line 286 | public class ConfigurationDialog extends JDialog {
286          c.fill = GridBagConstraints.HORIZONTAL;
287          JPanel firewallPanel = new JPanel();
288          firewallPanel.setLayout(gridbag);
289                
289          
290          _useFirewall = new JCheckBox("Use firewall command to connect through to server");
291          c.gridy = 0;
# Line 356 | Line 355 | public class ConfigurationDialog extends JDialog {
355          gridbag.setConstraints(_packetDump, c);
356          dataPanel.add(_packetDump);
357          
358 <        JLabel _queueLimitLabel = new JLabel("Maximum data queue size:");
359 <        _queueLimitLabel.setHorizontalAlignment(JLabel.RIGHT);
358 >        JLabel queueLimitLabel = new JLabel("Maximum data queue size:");
359 >        queueLimitLabel.setHorizontalAlignment(JLabel.RIGHT);
360          _queueLimit = new JTextField(4);
361          JPanel queueBox = new JPanel();
362          queueBox.setLayout(new GridLayout(1,2));
363 <        queueBox.add(_queueLimitLabel);
363 >        queueBox.add(queueLimitLabel);
364          queueBox.add(_queueLimit);
365          c.gridy = 3;
366          gridbag.setConstraints(queueBox, c);
# Line 533 | Line 532 | public class ConfigurationDialog extends JDialog {
532      private JList _hostList;
533      
534      /**
535 <     * If we are making a note of the hosts the _server
535 >     * If we are making a note of the hosts the server
536       * sends us.
537       */
538      private JCheckBox _hostDiscoveryMode;
# Line 545 | Line 544 | public class ConfigurationDialog extends JDialog {
544      private JCheckBox _useHostList;
545      
546      /**
547 <     * The _name to identify this client to the _server
547 >     * The name to identify this client to the server
548       */
549      private JTextField _name;
550      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines