Commit c7cc6053 authored by Eric Duminil's avatar Eric Duminil
Browse files

Add Icon to RegionChooser.

No related merge requests found
Showing with 5 additions and 0 deletions
+5 -0
...@@ -4,12 +4,15 @@ ...@@ -4,12 +4,15 @@
import java.util.Objects; import java.util.Objects;
import javafx.application.Application; import javafx.application.Application;
import javafx.scene.Scene; import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
import javafx.stage.Stage; import javafx.stage.Stage;
public class RegionChooserFX extends Application 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 * Starting point of RegionChooser application. Either "Run as Java" from Eclipse or run
* "RegionChooser.bat/.sh/.command" from deployed SimStadt folder. * "RegionChooser.bat/.sh/.command" from deployed SimStadt folder.
...@@ -17,10 +20,12 @@ public class RegionChooserFX extends Application ...@@ -17,10 +20,12 @@ public class RegionChooserFX extends Application
* This application is basically just a scene and a browser for the RegionChooser website (HTML + Javascript frontend * 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. * + Java backend). The Java part is written in RegionChooserBrowser.
*/ */
@Override @Override
public void start(Stage stage) { public void start(Stage stage) {
stage.setTitle("RegionChooser " + getApplicationVersion()); stage.setTitle("RegionChooser " + getApplicationVersion());
Scene scene = new Scene(new RegionChooserBrowser(), 1024, 720, Color.web("#666970")); Scene scene = new Scene(new RegionChooserBrowser(), 1024, 720, Color.web("#666970"));
stage.getIcons().addAll(APP_ICON_48);
stage.setScene(scene); stage.setScene(scene);
stage.show(); stage.show();
} }
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment