//
// Scan3DField class was created to offload the execution of the function
//  NewGuide_State.scan3Dfield() from the main thread.  The purpose of this
//  is to make the GUI seem more responsive, so that the main thread doesn't
//  have to wait for scan3Dfield() to finish.  This function takes 2-3 seconds
//  when running in Cheerpj (javascript in browser), which is enough to make
//  the GUI seem unresponsive.
//
//  May 7, 2020
//  Janice Richards
//
import java.lang.*;

public class Scan3DField extends Thread {

    private  NewGuide_State state;

    public Scan3DField(NewGuide_State state) {
	super();
	this.state = state;
    }
    
    public void run() {
	System.out.println("thread started");
	state.scan3Dfield();
	System.out.println(" thread DONE");
    }
}
