package Basicsource;

import static Support.Resources.*;

import javafx.application.Application;
import javafx.application.Platform;
import javafx.scene.Scene;
import javafx.scene.control.TabPane;
import javafx.stage.Stage;

/**
 * @author Yu Sangzhuoyang
 * @version 6.23
 */
public class ControlPanel extends Application
{
	private Scene scene;
	private TabPane tabPane;
	
	public ControlPanel()
	{
		tabPane = new TabPane();
		scene = new Scene(tabPane, CONTROLPANEL_WIDTH, CONTROLPANEL_HEIGHT);
		
		//launch user interface
		Platform.runLater(() -> 
		{
			try
			{
				start(new Stage());
			}
			catch (Exception e)
			{
				e.printStackTrace();
		    }
		});
	}
	
	public void start(Stage pStage) throws Exception
	{
		pStage.setTitle(TITLE);
		pStage.setScene(scene);
		pStage.setX(CONTROLPANEL_LOCATION_X);
		pStage.setY(CONTROLPANEL_LOCATION_Y);
		pStage.show();
	}
}