package caltool.view.file;

import caltool.model.file.*;
import caltool.view.file.*;
import mvp.*;
import java.awt.*;

/****
 *
 * Class FileUI is the companion view for the <a href= "File.html"> File </a>
 * model class.  FileUI constructs and composes the File pulldown menu.
 * Standard JFC file and input dialogs used for the File.open, File.saveAs, and
 * File.print commands.  Standard JFC error dialogs are used to report any
 * file-related errors.  Hence, FileUI does not need to define any additional
 * views other than the pulldown menu.
 *
 * @author Gene Fisher (gfisher@calpoly.edu)
 * @version 13apr15
 *
 */
public class FileUI extends View {

    /**
     * Construct this with the given screen and companion File model.
     */
    public FileUI(Screen screen, File file) {
	super(screen, file);
	fileMenu = new FileMenu(screen, file, this);
    }

    /**
     * Compose this by composing the File pulldown menu.
     */
    public Component compose() {
	return fileMenu.compose();
    }

    /** The companion model */
    protected FileMenu fileMenu;

}