package eu.simstadt.regionchooser;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.paint.Color;
import javafx.stage.Stage;


public class RegionChooserFX extends Application
{
	public static final Image APP_ICON_48 = new Image(RegionChooserFX.class.getResourceAsStream("simstadt_48.png"));

	/**
	 * Starting point of RegionChooser application. Either "Run as Java" from Eclipse or run
	 * "RegionChooser.bat/.sh/.command" from deployed SimStadt folder.
	 *
	 * This application is basically just a scene and a browser for the RegionChooser website (HTML + Javascript frontend
	 * + Java backend). The Java part is written in RegionChooserBrowser.
	 */

	@Override
	public void start(Stage stage) {
		stage.setTitle("RegionChooser " + RegionChooserUtils.getApplicationVersion());
		Scene scene = new Scene(new RegionChooserBrowser(), 1024, 720, Color.web("#666970"));
		stage.getIcons().addAll(APP_ICON_48);
		stage.setScene(scene);
		stage.show();
	}

	public static void main(String[] args) {
		launch(args);
	}
}

