// (c) MIT 2003.  All rights reserved.

// $Id: Registerable.java,v 1.6 2003/03/06 00:40:39 moltmans Exp $
// Time-stamp: <2000-03-11 18:59:36 moltmans>
package rec.sys;


////////////////////////////////////////////////////////////////////////////////
//
// FILE:	Registerable.java
//
// AUTHOR:	Manoj D. Muzumdar
//		archon@ai.mit.edu
//
// DATE:	June, 1998
//
// COPYRIGHT:	Massachusetts Institute of Technology
//		All rights reserved.
//
// PURPOSE:	Drawing recognition system
//
///////////////////////////////////////////////////////////////////////////////


import rec.util.*;
import java.util.*;

/**
 * This is the interface for things which want to watch a given
 * widget through its life-cycle.
 */
public interface Registerable
{
  /**
   * Called when w is removed.
   */
  public void removed( Widget w );

  /**
   * Called when ow is replaced by nw.
   */
  public void replaced( Widget ow, Widget nw );

  /**
   * Called when ow is replaced by a set of new widgets.
   */
  public void replaced( Widget ow, Collection nws );

  /***
   * Called when w has been altered.
   *
   * @param w  The Widget after it has been altered.
   * @param t  The Transition that affected that Widget.
   */
  public void altered( Widget w, Transition t );
}

////////////////////////////////////////////////////////////////////////////////
