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

Comparing projects/cms/source/conient/uk/org/iscream/cms/conient/Conient.java (file contents):
Revision 1.17 by ajm, Wed Jan 24 03:35:14 2001 UTC vs.
Revision 1.21 by ajm, Mon Feb 5 01:26:04 2001 UTC

# Line 36 | Line 36 | public class Conient extends JFrame {
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  
# Line 51 | Line 52 | public class Conient extends JFrame {
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();
# Line 64 | Line 69 | public class Conient extends JFrame {
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  
# Line 100 | Line 106 | public class Conient extends JFrame {
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");
# Line 111 | Line 117 | public class Conient extends JFrame {
117          // add the status panel to the bottom border
118          getContentPane().add(bottom, "South");
119          
120 +        // a nice icon for the window
121 +        setIconImage((new ImageIcon("./uk/ac/ukc/iscream/conient/server.gif")).getImage());
122          // show the window
123          show();
124      }
# Line 193 | Line 201 | public class Conient extends JFrame {
201       * The place where system messages are written.
202       */
203      static JTextArea _messages = new JTextArea();
204 +    {
205 +        _messages.setLineWrap(true);
206 +    }
207   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines