4,10 → 4,10 |
* Coded by: Group 5, software practice summer 2003 |
* University of Bielefeld, Germany |
* |
* @version $Revision: 1.63 $ |
* @version $Revision: 1.64 $ |
* |
* Last modification: $Date: 2003/07/26 11:42:56 $ |
* $Id: Controller.java,v 1.63 2003/07/26 11:42:56 swalkenh Exp $ |
* Last modification: $Date: 2003/07/28 14:26:16 $ |
* $Id: Controller.java,v 1.64 2003/07/28 14:26:16 smcsporr Exp $ |
*/ |
|
package src.control; |
20,6 → 20,7 |
/** |
* An instance of the <code>Controller</code> class creates objects of all main program |
* classes and transfers the necessary references to each object. |
* |
* The class instances created are: |
* src.control.DocumentManger |
* src.control.OtherGUIActions |
31,7 → 32,7 |
* |
* @author Group 5 |
* |
* @version $Revision: 1.63 $ Last modification: $Date: 2003/07/26 11:42:56 $ |
* @version $Revision: 1.64 $ Last modification: $Date: 2003/07/28 14:26:16 $ |
*/ |
public class Controller { |
|
64,26 → 65,27 |
|
/** |
* Makes a new instance of <code>DocumentFactory</code>,<code>DocumentManager</code>, <code>GUI</code>, |
* <code>OtherGUIActions<code/>, <code>Parser</code>,<code>PluginManager</code> and <code>UpdateView</code> |
* and transfers the required object references to them. This following list shows the references |
* that each created object gets. |
* <code>OtherGUIActions<code/>, <code>Parser</code>,<code>PluginManager</code>, <code>UpdateView</code> |
* and <code>Validator</code> and transfers the required object references to them. |
* The following list shows the references that each created object gets. |
* |
* Class -> References |
* ----------------------------------------------------------------------------- |
* DocumentFactory -> |
* DocumentManager -> GUI, LogPanel, PluginManager, StatusPanel, UpdateView |
* DocumentManager -> GUI, LogPanel, PluginManager, StatusPanel, UpdateView, Validator |
* GUI -> DocumentManager, OtherGUIActions, PluginManager, UpdateView, Validator |
* OtherGUIActions -> DocumentManager |
* Parser -> LogPanel |
* PluginManager -> DocumentManager, GUI, LogPanel, UpdateView |
* UpdateView -> DocumentManager, GUI, LogPanel, PluginManager |
* UpdateView -> DocumentManager, GUI, LogPanel, PluginManager, Validator |
* |
* @see src.control.DocumentManager |
* @see src.control.OtherGUIActions |
* @see src.document.DocumentFactory |
* @see src.gui.GUI |
* @see src.control.OtherGUIActions |
* @see src.document.DocumentFactory |
* @see src.parser.Parser |
* @see src.control.DocumentManager |
* @see src.gui.UpdateView |
* @see src.parser.Parser |
* @see src.parser.Validator |
*/ |
public Controller () { |
|
112,31 → 114,25 |
|
/* Give updateView a reference to the GUI */ |
updateView.setGuiReference(myGui); |
|
/* Give updateView an instance of a document manager. */ |
updateView.setDocumentManagerInterface(docMaster); |
|
/* Give updateView an instance of a plugin manager. */ |
updateView.setLogInterface(myGui.getLogPanelImpl()); |
updateView.setPluginManagerInterface(pluginManager); |
updateView.setValidationReference(vali); |
|
/* Give Interfaces to gui. */ |
myGui.setInterfaces(gUIListener,docMaster, updateView, pluginManager, docMaster,docMaster, vali); |
myGui.setInterfaces(gUIListener,docMaster, updateView, pluginManager, docMaster, docMaster, vali); |
|
/* Register the log panel to the different objects. */ |
parser.setLogInterface(myGui.getLogPanelImpl()); |
updateView.setLogInterface(myGui.getLogPanelImpl()); |
docMaster.setLogInterface(myGui.getLogPanelImpl()); |
|
/* Register the tabbed pane and the UpdateViewInterface to the |
* document manager. */ |
docMaster.setPluginManagerInterface(pluginManager); |
docMaster.setRootFrame(myGui); |
docMaster.setStatInterface(myGui.getStatusInterface()); |
docMaster.setTabbedPane(myGui.getTabbedPane()); |
docMaster.setUpdateViewInterface(updateView); |
|
/* Give a status panel reference to the document manager. */ |
docMaster.setStatInterface(myGui.getStatusInterface()); |
docMaster.setRootFrame(myGui); |
|
/* DocumentManager must inform the PluginLoader if a document has been closed. */ |
docMaster.setPluginManagerInterface(pluginManager); |
docMaster.setValidationReference(vali); |
} |
} |