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.24 by ajm, Tue Feb 27 03:09:58 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 225 | Line 238 | public class Conient extends JFrame {
238      {
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines