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.22 by ajm, Wed Feb 21 23:45:16 2001 UTC vs.
Revision 1.25 by ajm, Tue Feb 27 15:11:44 2001 UTC

# Line 74 | Line 74 | public class Conient extends JFrame {
74          
75          // the main frame (passed the two panels)
76          Conient client = new Conient(data, control);
77 +        conientFrame = (Frame) client;
78          Conient.addMessage("Conient {an i-scream Client} © 2001 University of Kent & Project i-scream");
79  
80          Conient.addMessage("Conient ready.");
81          
82      }
82
83      
84 +    /**
85 +     * A static accessor, allowing components of the system
86 +     * to get hold of the root frame of the system.
87 +     *
88 +     * see conientFrame attribute for details.
89 +     *
90 +     * @return the root Conient frame
91 +     */
92 +    public static Frame getFrame() {
93 +        return conientFrame;
94 +    }
95 +    
96   //---CONSTRUCTORS---
97  
98      /**
99       * Creates a new Swing Client Frame
100       */
101 <    private Conient(JPanel data, JPanel control) {
101 >    private Conient(JPanel data, ControlPanel control) {
102          // set up the Frame
103          super("Conient {an i-scream Client}");
104          setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
105 <
105 >        setJMenuBar(control.getMenuBar());
106 >        
107          // set what happens when the X in the corner is clicked        
108          addWindowListener(new WindowAdapter() {
109              public void windowClosing(WindowEvent e) {System.exit(0);}
# Line 125 | Line 138 | public class Conient extends JFrame {
138          getContentPane().add(bottom, "South");
139          
140          // a nice icon for the window
141 <        setIconImage((new ImageIcon("./uk/ac/ukc/iscream/conient/server.gif")).getImage());
141 >        setIconImage((new ImageIcon("./resources/server.gif")).getImage());
142  
143          // and just because we can, a silly splash screen
144          // of the dudes that did this funky gibble
# Line 226 | Line 239 | public class Conient extends JFrame {
239          _messages.setLineWrap(true);
240      }
241      
242 +    /**
243 +     * Holds a reference to the root frame for Conient
244 +     * This is only used by dialogs (specifically the configurationn
245 +     * dialog) so that it can be modal, please use the accessor.
246 +     */
247 +    private static Frame conientFrame;
248 +    
249   //---INNER CLASSES----
250  
251      /**
# Line 240 | Line 260 | public class Conient extends JFrame {
260              setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
261              JPanel splash = new JPanel();
262              splash.setBackground(Color.black);
263 <            JLabel image = new JLabel((new ImageIcon("./uk/ac/ukc/iscream/conient/i-scream-splash.gif")));
263 >            JLabel image = new JLabel((new ImageIcon("./resources/i-scream-splash.gif")));
264              splash.add(image);
265              setContentPane(splash);
266              Dimension screen = getToolkit().getScreenSize();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines