Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 619 → Rev 620

/sun/xmleditor/trunk/src/control/Controller.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* @version $Revision: 1.47 $
* @version $Revision: 1.48 $
*
* Last modification: $Date: 2003/07/18 14:36:04 $
* $Id: Controller.java,v 1.47 2003/07/18 14:36:04 hjokusch Exp $
* Last modification: $Date: 2003/07/18 15:55:07 $
* $Id: Controller.java,v 1.48 2003/07/18 15:55:07 hjokusch Exp $
*/
 
package src.control;
20,11 → 20,34
// TODO JavaDoc class description
public class Controller {
/* Instance variable for the program's GUI. */
private GUI myGui;
/* The document manager handles the program's documents. */
private DocumentManager docMaster;
/* Instance variable for one of the GUI listener. */
private OtherGUIActions gUIListener;
/* A parser that is needed to parse documents. */
private Parser parser;
/* The document factory creates new OurDocument instances. */
private DocumentFactory aDocumentFactory;
private UpdateView updateView;
/* The plugin manager is responsible for launching plugins and
* to handle program-to-plugin and plugin-to-program actions. */
private PluginManager pluginManager;
// private PopUpJTree popTree;
/**
* Makes a new instance of <code>Gui</code>,<code>Parser</code>,
* <code>DocumentFactory</code>,<code>OtherGUIActions<code/>
* ,<code>DocumentManager</code>,,<code>UpdateView</code>
* and link's them with Interfaces
* and links them with interfaces.
*
* @see src.control.OtherGUIActions
* @see src.document.DocumentFactory
31,29 → 54,21
* @see src.gui.Gui
* @see src.parser.Parser
* @see src.control.DocumentManager;
* @see src
*/
private GUI myGui = new GUI();
private DocumentManager docMaster = new DocumentManager();
private OtherGUIActions gUIListener = new OtherGUIActions();
private Parser parser = new Parser();
private DocumentFactory aDocumentFactory = new DocumentFactory(myGui.getLogInterface());
private UpdateView updateView = new UpdateView();
//modified 14.07.03 Sascha W. cause PluginManager needs a GuiInterface and a
// listener fo OurEvent-objects from beginning, getting it in the constructor
// of Controller is to late
private PluginManager pluginManager = new PluginManager(myGui, updateView);
// private PopUpJTree popTree;
// TODO JavaDoc-comments
public Controller () {
/* Create instances of the program's objects. */
myGui = new GUI();
docMaster = new DocumentManager();
gUIListener = new OtherGUIActions();
parser = new Parser();
aDocumentFactory = new DocumentFactory(myGui.getLogInterface());
updateView = new UpdateView();
pluginManager = new PluginManager(myGui, updateView);
 
gUIListener.setDocManagerInterface(docMaster);
pluginManager.setLogInterface(myGui.getLogInterface());
 
/* The plugin manager gives the plugin loader a reference to the document
* manager. */
62,9 → 77,6
/* Give udateView a reference of the GUI */
updateView.setGuiReference(myGui);
/* Give a reference a log panel to UpdateView. */
updateView.setLogInterface(myGui.getLogInterface());
 
/* Give updateView an instance of a document manager. */
updateView.setDocumentManagerInterface(docMaster);
 
75,10 → 87,9
myGui.setInterfaces(gUIListener,docMaster, updateView,docMaster,docMaster/*,validator*/);
//aDocumentFactory.makeDocument(false);
/* Give a log panel reference to the parser. */
/* Register the log panel to the different objects. */
parser.setLogInterface(myGui.getLogInterface());
/* Give a log panel reference to the document manager. */
updateView.setLogInterface(myGui.getLogInterface());
docMaster.setLogInterface(myGui.getLogInterface());
 
docMaster.setTabbedPane(myGui.getTabbedPane());
88,9 → 99,7
docMaster.setStatInterface(myGui.getStatusInterface());
docMaster.setRootFrame(myGui);
//added 14.07.03 Sascha W.
/* DocumentManager must inform the PluginLoader if a document has been closed */
docMaster.setPluginManagerInterface(pluginManager);
 
}
}