import java.applet.*;
import java.awt.*;

public class YesApplet extends Applet {
	private Thread _thread;

	public void init() {
		String longitude = getParameter("longitude");
		String latitude = getParameter("latitude");
		String edt = getParameter("edt_on");

		YesClock clock = new YesClock();
		setLayout( new BorderLayout() );
		add( clock, BorderLayout.CENTER );
		//clock.setBounds(0,0,getSize().width, getSize().height);
		float lon = Float.valueOf( longitude ).floatValue();
		float lat = Float.valueOf( latitude ).floatValue();
		clock.setLongitude( lon );
		clock.setLatitude( lat );
		if (edt != null) {
			boolean edt_on = Boolean.valueOf(edt).booleanValue();
			clock.setEDT( edt_on );
		}
		_thread = new Thread( clock );
	}

	public void start() {
		_thread.start();
	}

	public void stop() {
		_thread.interrupt();
	}
}
