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

package rec.fsm;





///////////////////////////////////////////////////////////////////////////////
//
// FILE:	Eraser.java
//
// AUTHOR:      Luke Weisman
//              luke@ai.mit.edu
//
// DATE:	June, 1998
//
// COPYRIGHT:	Massachusetts Institute of Technology
//		All rights reserved.
//
//
///////////////////////////////////////////////////////////////////////////////


import java.util.*;
import rec.util.*;
import rec.core.*;
import rec.sys.*;

public class Eraser extends Aligner
{

  public Eraser()
  {
  }


  public boolean recognize( Surface s, Widget w )
  {
    Node n = null;

    // somehow get the node to remove
    Widget ta = ( (WSelection)w ).getWidget();
    
    s.removeWidget( w );

    s.removeWidget( ta );

    return true;
  }


  public Iterator getInputTypes()
  {
    Vector v = new Vector();

    v.addElement( "rec.core.WSelection" );

    return( v.iterator() );
  }

  public Iterator getOutputTypes()
  {
    return getInputTypes();
  }
  
}


