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.15 by ajm, Wed Jan 24 03:09:43 2001 UTC vs.
Revision 1.19 by ajm, Tue Jan 30 02:15:11 2001 UTC

# Line 16 | Line 16 | import java.awt.event.*;
16   * @author  $Author$
17   * @version $Id$
18   */
19 < public class SwingClient extends JFrame {
19 > public class Conient extends JFrame {
20  
21   //---FINAL ATTRIBUTES---
22  
# Line 36 | Line 36 | public class SwingClient 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 SwingClient 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 62 | Line 67 | public class SwingClient extends JFrame {
67          ControlPanel control = new ControlPanel(data);
68          
69          // the main frame (passed the two panels)
70 <        SwingClient client = new SwingClient(data, control);
71 <        SwingClient.addMessage("Conient {an I-scream Client} © 2001 University of Kent & Project I-Scream");
72 <        SwingClient.addMessage("Conient ready.");
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  
76      
# Line 73 | Line 79 | public class SwingClient extends JFrame {
79      /**
80       * Creates a new Swing Client Frame
81       */
82 <    private SwingClient(JPanel data, JPanel control) {
82 >    private Conient(JPanel data, JPanel control) {
83          // set up the Frame
84 <        super("Conient {an I-scream Client}");
84 >        super("Conient {an i-scream Client}");
85          setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
86  
87          // set what happens when the X in the corner is clicked        
# Line 193 | Line 199 | public class SwingClient extends JFrame {
199       * The place where system messages are written.
200       */
201      static JTextArea _messages = new JTextArea();
202 +    {
203 +        _messages.setLineWrap(true);
204 +    }
205   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines