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

// -*-Mode: Java-*- 
// WSimulateButton.java -- 
// Author: Christine Alvarado <calvarad@ai.mit.edu> 
// Maintainer: Christine Alvarado <calvarad@ai.mit.edu> 
// Version: 
// Created: <Wed Apr  7 18:08:03 1999> 
// Time-stamp: <1999-11-08 21:21:44 calvarad> 
// Keywords: 
package rec.simulate.widgets;

import rec.core.widgets.*;
import java.io.*;
import rec.sys.*;
import java.awt.*;
import rec.util.*;
import rec.simulate.*;

public class WSimulateButton extends WButton
{
  public WSimulateButton()
  {
    this( "button" );
  }
  
  public WSimulateButton( String name )
  {
    super( name );
  }

  // we need the surface which the button is associated with here.
  public void hit( Surface s )
  {
    Console.writeln( "I, " + name + ", was clicked on!" );
    // we want to do all the recognition of simulatable stuff here too.
    //((SimulateSurface)s).finish();
    ((SimulateSurface)s).simulate();
    
  }

  // undo and describe would do nothing with this button
}
  
