import java.io.*;


/**
  * control the wedgi application, i.e., serve as a mediator
  * between GUI controls, Command objects, and application-specific
  * data.  In the <EM>Wedgi</EM> application prototype this class
  * is minimal, but would likely be expanded in a future version
  * 
  * @author Owen Astrachan
  */

public class Controller
{
    public Controller()
    {
	
    }

    /**
      * add the gui for which this controller is a mediator
      * @param the GUI being mediated
      */
    public void addGui(WedgiGui wg)
    {
	myGui = wg;
    }

    /**
      * load a file/URL/other resource.
      * @param sourceName is the name of the file, URL, source
      */
    
    public void load(String sourceName)
    {
	myGui.addWedgi(sourceName);
    }

    /**
      * show a message to the user
      * @param s is the message to show
      */
    
    public void showMessage(String s)
    {
	myGui.showMessage(s);
    }

    private WedgiGui myGui;
}
