import java.awt.*;
import java.io.File;
import FrameWithImage;

/**
 * Provides images for the Gmail system.
 *
 * @version 1.0 of 10/25/99
 * @author Gail Bonath
 * @author Joe Pipkins
 * @author Minna Mahlab
 * @author Kate Ducey
 */

public class PhotoStub
    implements PhotoInt
{
    // +--------+--------------------------------------
    // | Fields |
    // +--------+
    
    /**
     * The username of the person in the picture
     */
    protected String username;
    
    /**
     * The jpeg file of the picture
     */
    protected Image picture;
    
    // +--------------+--------------------------------
    // | Constructors |
    // +--------------+
    
    public PhotoStub(String sender) {
    } // PhotoStub(String)
    
    public PhotoStub(String sender, Image picture) {
    } // PhotoStub(String, Image)
    
    // +---------+---------------------------------------
    // | Methods |
    // +---------+
    
    /**
     * Takes in the username and returns a predetermined image.
     *
     * Photo.java will return an Image from database folder. If there
     * is no associated Image file for the username, an
     * exception will be thrown.
     */
    
    public Image getPhoto()
        throws Exception {
        return Toolkit.getDefaultToolkit().getImage("/home/ducey/cs152/project/grin.jpg");
    } // stub
    
    /**
     * Takes in a username and an Image and returns true.
     *
     * Photo.java will save the
     * Image file in the database folder under the name
     * "username.jpeg". If there is already a
     * username.jpeg file in the folder, it will be
     * overwritten.
     */
    
    public boolean setPhoto(Image picture) {
        return true;
    } // stub
    
    /**
     * Creates a window which displays the picture field
     */
    
    public void displayPhoto() {
        Frame frame = new FrameWithImage("/home/ducey/cs152/project/grin.jpg", "Gates Tower");
        frame.show();
    } //stub
    
    
} // PhotoStub

