//AppletLogic.java

import java.util.*;
import java.awt.*;

class AppletLogic implements IAppletLogic {

	protected static Algorithm algorithm;

	public static void setAlgorithm(Algorithm alg){
		algorithm = alg;
	}
	
	public static void init(){}
	
/*
	protected Vector componentList;
	Thread mainThread;
	Algorithm alg;
	AppletMode aMode;
	
	//the applet three modes.
	Demonstration demo;
	Simulation simulation;
	Gateway gateway;
	
	//constructor
	public AppletLogic(){
	
		this.componentList = new Vector();
		
		demo = new Demonstration();
		simulation = new Simulation();
		gateway = new Gateway();
	}
	
	//operation method
	public void drawApplet(Graphics g){
		Enumeration enum = componentList.elements();
	
		while(enum.hasMoreElements())
			((GraphicComponent)enum.nextElement()).draw(g);
	}
	
	public void addComponent(GraphicComponent gc){
		componentList.addElement(gc);
	}
	
	public void removeComponent(GraphicComponent gc){
		componentList.removeElement(gc);
	}
	
	public void clearComponents(){
		componentList.removeAllElements();
	}
	
	public void setAlgorithm(Algorithm alg){
		this.alg = alg;
	}
	
	public void setAppletMode(int modeIndex){
		if(modeIndex==1) {
			aMode = demo;
			mainThread = demo;
		}
		else if(modeIndex==2) {
			aMode = simulation;
			mainThread = simulation;
		}
		else if(modeIndex==3)
			aMode = gateway;
	}
*/
}

