4,10 → 4,10 |
* Coded by: Group 5, software practice summer 2003 |
* University of Bielefeld, Germany |
* |
* @version $Revision: 1.59 $ |
* @version $Revision: 1.60 $ |
* |
* Last modification: $Date: 2003/07/22 18:27:48 $ |
* $Id: Controller.java,v 1.59 2003/07/22 18:27:48 smcsporr Exp $ |
* Last modification: $Date: 2003/07/23 13:12:42 $ |
* $Id: Controller.java,v 1.60 2003/07/23 13:12:42 swalkenh Exp $ |
*/ |
|
package src.control; |
19,41 → 19,61 |
|
/** |
* An instance of the <code>Controller</code> class creates objects of all main program |
* classes and transfer the necessary references to each object. |
* classes and transfers the necessary references to each object. |
* The class instances created are: |
* src.control.DocumentManger |
* src.control.OtherGUIActions |
* src.document.DocumentFactory |
* src.gui.GUI |
* src.gui.UpdateView |
* src.parser.Parser |
* src.plugins.PluginManager |
* |
* @author H. Jakusch |
* @author Group 5 |
* |
* @version $Revision: 1.59 $ Last modification: $Date: 2003/07/22 18:27:48 $ |
* @version $Revision: 1.60 $ Last modification: $Date: 2003/07/23 13:12:42 $ |
*/ |
public class Controller { |
|
/* Instance variable for the program's GUI. */ |
/** Instance variable for the program's GUI. */ |
private GUI myGui; |
|
/* The document manager handles the program's documents. */ |
/** The document manager handles the program's documents. */ |
private DocumentManager docMaster; |
|
/* Instance variable for one of the GUI listener. */ |
/** Instance variable for one of the GUI listener. */ |
private OtherGUIActions gUIListener; |
|
/* A parser that is needed to parse documents. */ |
/** A parser that is needed to parse documents. */ |
private Parser parser; |
|
/* The document factory creates new OurDocument instances. */ |
/** The document factory creates new OurDocument instances. */ |
private DocumentFactory aDocumentFactory; |
|
/* The updateView refreshes the view of of the tree if the document is changed. */ |
/** The updateView refreshes the view of of the tree if the document is changed. */ |
private UpdateView updateView; |
|
/* The plugin manager is responsible for launching plugins and |
* to handle program-to-plugin and plugin-to-program actions. */ |
/** |
* The plugin manager is responsible for launching plugins and |
* to handle program-to-plugin and plugin-to-program actions. |
*/ |
private PluginManager pluginManager; |
|
/** |
* Makes a new instance of <code>Gui</code>,<code>Parser</code>, |
* <code>DocumentFactory</code>,<code>OtherGUIActions<code/>, |
* <code>DocumentManager</code>,<code>UpdateView</code> |
* and links them with the needed interfaces. |
* 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. |
* |
* Class -> References |
* ----------------------------------------------------------------------------- |
* DocumentFactory -> |
* DocumentManager -> GUI, LogPanel, PluginManager, StatusPanel, UpdateView |
* GUI -> DocumentManager, OtherGUIActions, PluginManager, UpdateView |
* OtherGUIActions -> DocumentManager |
* Parser -> LogPanel |
* PluginManager -> DocumentManager, GUI, LogPanel, UpdateView |
* UpdateView -> DocumentManager, GUI, LogPanel, PluginManager |
* |
* @see src.gui.GUI |
* @see src.control.OtherGUIActions |
82,7 → 102,7 |
/* Gives the plugin manager a reference to updateView. */ |
pluginManager.setUpdateViewInterface(updateView); |
|
/* Give updateView a reference of the GUI */ |
/* Give updateView a reference to the GUI */ |
updateView.setGuiReference(myGui); |
|
/* Give updateView an instance of a document manager. */ |