Add icon to window
This commit is contained in:
parent
c480239636
commit
af555112b2
@ -25,6 +25,7 @@ import java.util.Optional;
|
||||
import javafx.application.Application;
|
||||
import javafx.application.Platform;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
@ -69,6 +70,7 @@ public class Main extends Application {
|
||||
controller.setNotification(startParams.notification().get());
|
||||
|
||||
primaryStage.setTitle("Numbers Station");
|
||||
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png")));
|
||||
primaryStage.setScene(new Scene(root));
|
||||
primaryStage.show();
|
||||
} else {
|
||||
@ -86,6 +88,7 @@ public class Main extends Application {
|
||||
});
|
||||
|
||||
primaryStage.setTitle("Numbers Station");
|
||||
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png")));
|
||||
primaryStage.setScene(new Scene(root));
|
||||
primaryStage.titleProperty().bindBidirectional(controller.windowTitle);
|
||||
primaryStage.show();
|
||||
|
@ -28,6 +28,7 @@ import javafx.scene.control.ButtonType;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextArea;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.Parent;
|
||||
@ -84,6 +85,7 @@ public class MainController implements Initializable {
|
||||
settingsStage = new Stage();
|
||||
settingsStage.initModality(Modality.APPLICATION_MODAL);
|
||||
settingsStage.setTitle("Numbers Station Settings");
|
||||
settingsStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png")));
|
||||
settingsStage.setScene(new Scene(root));
|
||||
settingsStage.show();
|
||||
settingsStage.setOnHiding(event -> {
|
||||
@ -111,6 +113,7 @@ public class MainController implements Initializable {
|
||||
selectStationStage.initModality(Modality.APPLICATION_MODAL);
|
||||
selectStationStage.setUserData(null);
|
||||
selectStationStage.setTitle("Numbers Station Selection");
|
||||
selectStationStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png")));
|
||||
|
||||
Scene scene = new Scene(root);
|
||||
scene.addEventFilter(KeyEvent.KEY_PRESSED, (e) -> controller.handleKeyPressed(e));
|
||||
|
@ -47,6 +47,7 @@ import javafx.scene.control.SpinnerValueFactory;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.control.TextInputDialog;
|
||||
import javafx.scene.control.ToggleGroup;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.Node;
|
||||
@ -366,6 +367,7 @@ public class StationSettingsController {
|
||||
|
||||
Stage stage = new Stage();
|
||||
stage.setTitle("New prefix");
|
||||
stage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png")));
|
||||
stage.setScene(new Scene(root));
|
||||
stage.initModality(Modality.APPLICATION_MODAL);
|
||||
stage.showAndWait();
|
||||
|
BIN
src/main/resources/icon.png
Normal file
BIN
src/main/resources/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 102 KiB |
Loading…
x
Reference in New Issue
Block a user