/*
 * COPYRIGHT (c) 1998-1999 Jan-Henrik Haukeland, http://www.tildeslash.com/
 */

package ts.biff;

import java.util.*;
import javax.swing.table.*;

import ts.event.MailEvent;
import ts.event.MailListener;
import ts.ui.TsTableModel;


/**
 * A Table model that also listens for mail events
 *
 * @author  Jan-Henrik Haukeland
 * @version $Id: Model.java,v 1.4 1999/02/21 08:47:04 hauk Exp $
 *
 * @see View
 * @see Controller
 */
public class Model extends TsTableModel implements MailListener
{

  /** 
   * Called when a Mail event occurs.  Acquire a list of mail 
   * messages from the event source, and update this model 
   * with the new mail list.
   *
   * @param e The mail event 
   */
  public void mailEvent(MailEvent e)
  { 
    Controller c= (Controller)e.getSource();
    setData(c.getMail());
  }

}
 
