/* * Filename: WizardController.java * * Author: Raf Van de Plas * * Contact: * Snail-mail: K.U.Leuven * ESAT-SCD * Kasteelpark Arenberg 10 * B-3001 Leuven-Heverlee * Belgium * Tel: +32 16 327927 * Fax: +32 16 321970 * Gsm: +32 474 243046 * E-mail: raf.vandeplas@esat.kuleuven.ac.be * WWW: http://www.esat.kuleuven.ac.be/~dna/BioI/ * * * Created on: Dec 5, 2003 * * Changed on: Dec 5, 2003 * * Version: 0.1 * * Description: * none * */ /** * @author rvdplas * * To change the template for this generated type comment go to * Window - Preferences - Java - Code Generation - Code and Comments */ public class WizardController { //This class sends the messages to the model and acts on the objects it returns private WizardModel wizModel = null; private WizardViewer wizViewer = null; public WizardController(WizardModel wizModel, WizardViewer wizViewer) { this.wizModel = wizModel; this.wizViewer = wizViewer; } public void actOn(String controllerMessage) { //Get the object corresponding to the given controllerMessage //and send it to an implementor of the WizardViewer interface //to do something usefull with it. try{ this.wizViewer.actOnTheGivenObject(this.wizModel.actOnControllerMessage(controllerMessage)); } catch(WizardModelException e) { System.err.println("A WizardModelException occured!"); } } }