package application.simulator;

import javax.swing.JFrame;
import javax.swing.JPanel;

import simulator.Simulator;
import simulator.interfaces.db.DatabasePresenter;
import simulator.interfaces.rest.RestPresenter;
import simulator.interfaces.sql.SQLPresenter;
import simulator.interfaces.swing.SwingPresenter;
import simulator.interfaces.timers.TimerService;

public class UISimulatorWindow extends JFrame {

	private static final long serialVersionUID = 1770206525826167136L;
	private SwingPresenter presenter;
	private Simulator simulator;
	private JPanel mainPanel;
	private TimerService timerService;
	
	private RestPresenter rest;
	private SQLPresenter sql;
	private DatabasePresenter db;
	
	public UISimulatorWindow(Simulator simulator) {
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		this.simulator = simulator;
		mainPanel = new JPanel();
		presenter = new SwingPresenter(mainPanel, simulator);
		rest = new RestPresenter(simulator);
		sql = new SQLPresenter(simulator);
		db = new DatabasePresenter(simulator);
		
		this.add(mainPanel);
		timerService = new TimerService(simulator);
		
	    setSize(870,640);
	    setVisible(true);
	}
}
