diff --git a/build.gradle b/build.gradle index 4637b25..0ef6c3d 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ plugins { } group 'com.codedead' -version '1.0.2' +version '1.0.3' def currentOS = DefaultNativePlatform.currentOperatingSystem @@ -112,13 +112,13 @@ if (currentOS.isWindows()) { } dependencies { - implementation "org.openjfx:javafx-base:18:${platform}" - implementation "org.openjfx:javafx-controls:18:${platform}" - implementation "org.openjfx:javafx-graphics:18:${platform}" - implementation "org.openjfx:javafx-fxml:18:${platform}" - implementation "org.openjfx:javafx-media:18:${platform}" + implementation "org.openjfx:javafx-base:18.0.1:${platform}" + implementation "org.openjfx:javafx-controls:18.0.1:${platform}" + implementation "org.openjfx:javafx-graphics:18.0.1:${platform}" + implementation "org.openjfx:javafx-fxml:18.0.1:${platform}" + implementation "org.openjfx:javafx-media:18.0.1:${platform}" implementation 'org.apache.logging.log4j:log4j-core:2.17.2' - implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.2.2' + implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.3' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2' } diff --git a/src/main/java/com/codedead/opal/OpalApplication.java b/src/main/java/com/codedead/opal/OpalApplication.java index 21024d7..77c98b3 100644 --- a/src/main/java/com/codedead/opal/OpalApplication.java +++ b/src/main/java/com/codedead/opal/OpalApplication.java @@ -3,6 +3,7 @@ import com.codedead.opal.controller.UpdateController; import com.codedead.opal.utils.FxUtils; import com.codedead.opal.utils.SharedVariables; +import javafx.application.Platform; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -69,6 +70,7 @@ public void start(final Stage primaryStage) { } catch (final IOException ex) { FxUtils.showErrorAlert("Exception occurred", ex.getMessage(), getClass().getResourceAsStream(SharedVariables.ICON_URL)); logger.error("Unable to initialize the SettingsController", ex); + Platform.exit(); return; } @@ -89,6 +91,7 @@ public void start(final Stage primaryStage) { root = loader.load(); } catch (final IOException ex) { logger.error("Unable to load FXML for MainWindow", ex); + Platform.exit(); return; } diff --git a/src/main/java/com/codedead/opal/controller/AboutWindowController.java b/src/main/java/com/codedead/opal/controller/AboutWindowController.java index 956b934..397c22a 100644 --- a/src/main/java/com/codedead/opal/controller/AboutWindowController.java +++ b/src/main/java/com/codedead/opal/controller/AboutWindowController.java @@ -3,16 +3,14 @@ import com.codedead.opal.interfaces.IRunnableHelper; import com.codedead.opal.utils.*; import javafx.application.Platform; +import javafx.event.ActionEvent; import javafx.fxml.FXML; -import javafx.scene.control.Label; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; +import javafx.scene.control.Button; import javafx.stage.Stage; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import java.io.IOException; -import java.io.InputStream; import java.util.Locale; import java.util.Properties; import java.util.ResourceBundle; @@ -21,14 +19,8 @@ public final class AboutWindowController { - @FXML - private Label aboutLabel; - @FXML - private ImageView aboutImageView; - private SettingsController settingsController; private ResourceBundle translationBundle; - private final HelpUtils helpUtils; private final Logger logger; @@ -77,27 +69,15 @@ public void setSettingsController(final SettingsController settingsController) { @FXML private void initialize() { logger.info("Initializing AboutWindow"); - - aboutImageView.setFitHeight(96); - aboutImageView.setFitWidth(96); - - final InputStream inputStream = getClass().getResourceAsStream("/images/opal.png"); - if (inputStream != null) { - aboutImageView.setImage(new Image(inputStream)); - } else { - aboutImageView.setImage(null); - } } /** * Method that is called when the close button is selected */ @FXML - private void closeAction() { + private void closeAction(final ActionEvent event) { logger.info("Closing AboutWindow"); - - final Stage stage = (Stage) aboutLabel.getScene().getWindow(); - stage.close(); + ((Stage) (((Button) event.getSource()).getScene().getWindow())).close(); } /** diff --git a/src/main/java/com/codedead/opal/controller/AudioController.java b/src/main/java/com/codedead/opal/controller/AudioController.java index dfaf024..90ffeae 100644 --- a/src/main/java/com/codedead/opal/controller/AudioController.java +++ b/src/main/java/com/codedead/opal/controller/AudioController.java @@ -40,7 +40,6 @@ public AudioController(final IAudioTimer audioTimer) throws URISyntaxException { logger = LogManager.getLogger(AudioController.class); logger.info("Initializing new AudioController object"); - logger.info("Initializing MediaPlayer objects"); mediaPlayers = new HashMap<>(); mediaPlayers.put("rain", new MediaPlayer(new Media(Objects.requireNonNull(getClass().getResource("/audio/rain.mp3")).toURI().toString()))); @@ -62,6 +61,12 @@ public AudioController(final IAudioTimer audioTimer) throws URISyntaxException { mediaPlayers.put("zen", new MediaPlayer(new Media(Objects.requireNonNull(getClass().getResource("/audio/zen.mp3")).toURI().toString()))); mediaPlayers.put("coffee", new MediaPlayer(new Media(Objects.requireNonNull(getClass().getResource("/audio/coffee.mp3")).toURI().toString()))); mediaPlayers.put("zoo", new MediaPlayer(new Media(Objects.requireNonNull(getClass().getResource("/audio/zoo.mp3")).toURI().toString()))); + mediaPlayers.put("networking", new MediaPlayer(new Media(Objects.requireNonNull(getClass().getResource("/audio/networking.mp3")).toURI().toString()))); + mediaPlayers.put("tribal", new MediaPlayer(new Media(Objects.requireNonNull(getClass().getResource("/audio/tribal.mp3")).toURI().toString()))); + mediaPlayers.put("drumtribal", new MediaPlayer(new Media(Objects.requireNonNull(getClass().getResource("/audio/tribal2.mp3")).toURI().toString()))); + mediaPlayers.put("football", new MediaPlayer(new Media(Objects.requireNonNull(getClass().getResource("/audio/football.mp3")).toURI().toString()))); + mediaPlayers.put("sleepy", new MediaPlayer(new Media(Objects.requireNonNull(getClass().getResource("/audio/sleepy.mp3")).toURI().toString()))); + mediaPlayers.put("gong", new MediaPlayer(new Media(Objects.requireNonNull(getClass().getResource("/audio/gong.mp3")).toURI().toString()))); mediaVolumes = new HashMap<>(); for (final Map.Entry entry : mediaPlayers.entrySet()) { @@ -93,7 +98,7 @@ public void playMedia(final String key) { throw new NullPointerException(String.format("MediaPlayer with key %s cannot be found!", key)); if (!player.getStatus().equals(MediaPlayer.Status.PLAYING)) { - logger.info("Playing media for MediaPlayer with key {}", key); + logger.info("Playing Media for MediaPlayer with key {}", key); player.play(); } } @@ -109,7 +114,7 @@ public void stopMedia(final String key) { if (key.isEmpty()) throw new IllegalArgumentException("Key cannot be empty!"); - logger.info("Stopping media for MediaPlayer with key {}", key); + logger.info("Stopping Media for MediaPlayer with key {}", key); final MediaPlayer player = mediaPlayers.get(key); @@ -138,7 +143,6 @@ public void setPlayerVolume(final String key, final double newVolume) { logger.debug("Setting volume for MediaPlayer with key {} to {}", key, newVolume); final MediaPlayer player = mediaPlayers.get(key); - if (player == null) throw new NullPointerException(String.format("MediaPlayer with key %s cannot be found!", key)); @@ -220,7 +224,7 @@ public void loadSoundPreset(final String path) throws IOException { mediaVolumes = objectMapper.readValue(actual, typeRef); - for (Map.Entry entry : mediaVolumes.entrySet()) { + for (final Map.Entry entry : mediaVolumes.entrySet()) { setPlayerVolume(entry.getKey(), entry.getValue()); } } @@ -274,8 +278,8 @@ public void cancelTimer() { * * @param delay The delay in milliseconds before the {@link Timer} object executes its function */ - public void scheduleTimer(long delay) { - if (delay <= 1) + public void scheduleTimer(final long delay) { + if (delay < 1) throw new IllegalArgumentException("Delay cannot be smaller than 1"); logger.info("Scheduling the Timer to stop all MediaPlayer objects after {} millisecond(s)", delay); diff --git a/src/main/java/com/codedead/opal/controller/MainWindowController.java b/src/main/java/com/codedead/opal/controller/MainWindowController.java index c7adaa5..7e638f6 100644 --- a/src/main/java/com/codedead/opal/controller/MainWindowController.java +++ b/src/main/java/com/codedead/opal/controller/MainWindowController.java @@ -1,5 +1,6 @@ package com.codedead.opal.controller; +import com.codedead.opal.domain.InvalidHttpResponseCodeException; import com.codedead.opal.domain.OsCheck; import com.codedead.opal.domain.PlatformUpdate; import com.codedead.opal.domain.SoundPane; @@ -12,8 +13,6 @@ import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.*; -import javafx.scene.control.Menu; -import javafx.scene.control.MenuItem; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.input.DragEvent; @@ -34,6 +33,18 @@ public final class MainWindowController implements IAudioTimer { + @FXML + private SoundPane snpGong; + @FXML + private SoundPane snpDrumTribal; + @FXML + private SoundPane snpSleepy; + @FXML + private SoundPane snpFootball; + @FXML + private SoundPane snpTribal; + @FXML + private SoundPane snpNetworkingEvent; @FXML private SoundPane snpZoo; @FXML @@ -207,11 +218,14 @@ private void checkForUpdates(final boolean showNoUpdates) { } else { logger.info("No updates available"); if (showNoUpdates) { - final Alert alert = new Alert(Alert.AlertType.INFORMATION, translationBundle.getString("NoUpdateAvailable"), ButtonType.OK); - alert.showAndWait(); + FxUtils.showInformationAlert(translationBundle.getString("NoUpdateAvailable"), null); } } - } catch (final Exception ex) { + } catch (final InterruptedException ex) { + logger.error("Unable to check for updates", ex); + FxUtils.showErrorAlert(translationBundle.getString("UpdateError"), ex.getMessage(), getClass().getResourceAsStream(SharedVariables.ICON_URL)); + Thread.currentThread().interrupt(); + } catch (final IOException | InvalidHttpResponseCodeException ex) { logger.error("Unable to check for updates", ex); FxUtils.showErrorAlert(translationBundle.getString("UpdateError"), ex.getMessage(), getClass().getResourceAsStream(SharedVariables.ICON_URL)); } @@ -300,6 +314,14 @@ private void initialize() { snpZen.getSlider().valueProperty().addListener((observableValue, oldValue, newValue) -> audioController.setPlayerVolume("zen", newValue.doubleValue() / 100)); snpCoffee.getSlider().valueProperty().addListener((observableValue, oldValue, newValue) -> audioController.setPlayerVolume("coffee", newValue.doubleValue() / 100)); snpZoo.getSlider().valueProperty().addListener((observableValue, oldValue, newValue) -> audioController.setPlayerVolume("zoo", newValue.doubleValue() / 100)); + snpSleepy.getSlider().valueProperty().addListener((observableValue, oldValue, newValue) -> audioController.setPlayerVolume("sleepy", newValue.doubleValue() / 100)); + snpGong.getSlider().valueProperty().addListener((observableValue, oldValue, newValue) -> audioController.setPlayerVolume("gong", newValue.doubleValue() / 100)); + + // Audiences + snpNetworkingEvent.getSlider().valueProperty().addListener((observableValue, oldValue, newValue) -> audioController.setPlayerVolume("networking", newValue.doubleValue() / 100)); + snpTribal.getSlider().valueProperty().addListener((observableValue, oldValue, newValue) -> audioController.setPlayerVolume("tribal", newValue.doubleValue() / 100)); + snpDrumTribal.getSlider().valueProperty().addListener((observableValue, oldValue, newValue) -> audioController.setPlayerVolume("drumtribal", newValue.doubleValue() / 100)); + snpFootball.getSlider().valueProperty().addListener((observableValue, oldValue, newValue) -> audioController.setPlayerVolume("football", newValue.doubleValue() / 100)); mniTimerEnabled.setOnAction(e -> { @@ -319,7 +341,7 @@ private void initialize() { */ @FXML private void openSoundPresetAction() { - logger.info("Attempting to open a sound preset"); + logger.info("Opening a sound preset"); final FileChooser chooser = new FileChooser(); final FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter("JSON (*.json)", "*.json"); @@ -329,8 +351,6 @@ private void openSoundPresetAction() { if (file != null && file.exists()) { openSoundPreset(file.getAbsolutePath()); - } else { - logger.info("Cancelled opening a sound preset"); } } @@ -363,6 +383,12 @@ private void openSoundPreset(final String filePath) { case "zen" -> snpZen.getSlider().setValue(entry.getValue() * 100); case "coffee" -> snpCoffee.getSlider().setValue(entry.getValue() * 100); case "zoo" -> snpZoo.getSlider().setValue(entry.getValue() * 100); + case "networking" -> snpNetworkingEvent.getSlider().setValue(entry.getValue() * 100); + case "tribal" -> snpTribal.getSlider().setValue(entry.getValue() * 100); + case "football" -> snpFootball.getSlider().setValue(entry.getValue() * 100); + case "sleepy" -> snpSleepy.getSlider().setValue(entry.getValue() * 100); + case "drumtribal" -> snpDrumTribal.getSlider().setValue(entry.getValue() * 100); + case "gong" -> snpGong.getSlider().setValue(entry.getValue() * 100); default -> logger.info("Unknown key found: {}", entry.getKey()); } } @@ -427,6 +453,12 @@ private void resetAction() { snpZen.getSlider().setValue(0); snpCoffee.getSlider().setValue(0); snpZoo.getSlider().setValue(0); + snpNetworkingEvent.getSlider().setValue(0); + snpTribal.getSlider().setValue(0); + snpFootball.getSlider().setValue(0); + snpSleepy.getSlider().setValue(0); + snpDrumTribal.getSlider().setValue(0); + snpGong.getSlider().setValue(0); } /** @@ -660,7 +692,7 @@ private void onDragOver(final DragEvent dragEvent) { * @param dragEvent The {@link DragEvent} object */ @FXML - public void onDragDropped(final DragEvent dragEvent) { + private void onDragDropped(final DragEvent dragEvent) { final Dragboard db = dragEvent.getDragboard(); boolean success = false; diff --git a/src/main/java/com/codedead/opal/controller/SettingsController.java b/src/main/java/com/codedead/opal/controller/SettingsController.java index 52ceaa7..27cd71e 100644 --- a/src/main/java/com/codedead/opal/controller/SettingsController.java +++ b/src/main/java/com/codedead/opal/controller/SettingsController.java @@ -59,7 +59,6 @@ public void createDefaultProperties() throws IOException { if (is != null) { logger.info("Creating default properties file at {}", getPropertiesFileLocation()); Files.copy(is, propertiesPath); - logger.info("Default properties file created"); } else { throw new IOException(String.format("Could not load default properties from application resources (%s)!", getPropertiesResourceLocation())); } @@ -132,11 +131,10 @@ public void setProperties(final Properties properties) { * @throws IOException When the Properties object could not be stored */ public void saveProperties() throws IOException { - logger.info("Attempting to store the Properties object"); + logger.info("Storing the Properties object"); try (final FileOutputStream fos = new FileOutputStream(getPropertiesFileLocation())) { properties.store(fos, null); } - logger.info("Properties object stored"); } /** @@ -146,13 +144,10 @@ public void saveProperties() throws IOException { * @throws IOException When the properties file could not be loaded */ public Properties readPropertiesFile() throws IOException { - logger.info("Attempting to load the Properties object"); + logger.info("Loading the Properties object"); try (final FileInputStream fis = new FileInputStream(getPropertiesFileLocation())) { final Properties prop = new Properties(); - prop.load(fis); - - logger.info("Properties object loaded"); return prop; } } diff --git a/src/main/java/com/codedead/opal/controller/SettingsWindowController.java b/src/main/java/com/codedead/opal/controller/SettingsWindowController.java index c817562..05022f4 100644 --- a/src/main/java/com/codedead/opal/controller/SettingsWindowController.java +++ b/src/main/java/com/codedead/opal/controller/SettingsWindowController.java @@ -59,9 +59,9 @@ private void initialize() { } /** - * Set the {@link com.codedead.opal.controller.SettingsController} object + * Set the {@link SettingsController} object * - * @param settingsController The {@link com.codedead.opal.controller.SettingsController} object + * @param settingsController The {@link SettingsController} object */ public void setSettingsController(final SettingsController settingsController) { if (settingsController == null) @@ -91,14 +91,19 @@ private void loadSettings() { long timerDelay = Long.parseLong(properties.getProperty("timerDelay", "3600000")); final int delayType = Integer.parseInt(properties.getProperty("timerDelayType", "0")); + if (timerDelay < 1) { + timerDelay = 1; + } + chbAutoUpdate.setSelected(autoUpdate); chbTimerApplicationShutdown.setSelected(Boolean.parseBoolean(properties.getProperty("timerApplicationShutdown", "false"))); switch (locale.toLowerCase()) { - case "es-es" -> cboLanguage.getSelectionModel().select(1); - case "fr-fr" -> cboLanguage.getSelectionModel().select(2); - case "nl-nl" -> cboLanguage.getSelectionModel().select(3); - case "ru-ru" -> cboLanguage.getSelectionModel().select(4); + case "de-de" -> cboLanguage.getSelectionModel().select(1); + case "es-es" -> cboLanguage.getSelectionModel().select(2); + case "fr-fr" -> cboLanguage.getSelectionModel().select(3); + case "nl-nl" -> cboLanguage.getSelectionModel().select(4); + case "ru-ru" -> cboLanguage.getSelectionModel().select(5); default -> cboLanguage.getSelectionModel().select(0); } @@ -166,10 +171,11 @@ private void saveSettingsAction() { showAlertIfLanguageMismatch(properties.getProperty("locale", DEFAULT_LOCALE)); switch (cboLanguage.getSelectionModel().getSelectedIndex()) { - case 1 -> properties.setProperty("locale", "es-es"); - case 2 -> properties.setProperty("locale", "fr-FR"); - case 3 -> properties.setProperty("locale", "nl-NL"); - case 4 -> properties.setProperty("locale", "ru-RU"); + case 1 -> properties.setProperty("locale", "de-DE"); + case 2 -> properties.setProperty("locale", "es-es"); + case 3 -> properties.setProperty("locale", "fr-FR"); + case 4 -> properties.setProperty("locale", "nl-NL"); + case 5 -> properties.setProperty("locale", "ru-RU"); default -> properties.setProperty("locale", DEFAULT_LOCALE); } diff --git a/src/main/java/com/codedead/opal/controller/UpdateController.java b/src/main/java/com/codedead/opal/controller/UpdateController.java index 7cb93b7..0ea8b67 100644 --- a/src/main/java/com/codedead/opal/controller/UpdateController.java +++ b/src/main/java/com/codedead/opal/controller/UpdateController.java @@ -88,7 +88,7 @@ public Optional checkForUpdates(final String currentPlatform, fi * @param v2 The second {@link String} object that contains a version * @return 1 if v1 is larger than v2, -1 if v2 is larger than v1 and 0 if both are equal */ - private int versionCompare(String v1, String v2) { + private int versionCompare(final String v1, final String v2) { int vnum1 = 0; int vnum2 = 0; diff --git a/src/main/java/com/codedead/opal/domain/NumberTextField.java b/src/main/java/com/codedead/opal/domain/NumberTextField.java index 0254645..6042f1e 100644 --- a/src/main/java/com/codedead/opal/domain/NumberTextField.java +++ b/src/main/java/com/codedead/opal/domain/NumberTextField.java @@ -1,10 +1,14 @@ package com.codedead.opal.domain; +import javafx.fxml.FXML; import javafx.scene.control.TextField; import javafx.scene.input.KeyCode; public final class NumberTextField extends TextField { + @FXML + private int min; + /** * Initialize a new NumberTextField */ @@ -22,8 +26,10 @@ public NumberTextField() { if (!this.getText().isEmpty()) { currentValue = Integer.parseInt(this.getText()); } - currentValue--; - this.setText(Integer.toString(currentValue)); + if (currentValue - 1 >= getMin()) { + currentValue--; + this.setText(Integer.toString(currentValue)); + } } }); } @@ -61,6 +67,26 @@ public void replaceSelection(final String text) { * @return True if the text is a number, otherwise false */ private boolean validate(final String text) { - return text.matches("[0-9]*"); + return text.matches("\\d*"); + } + + /** + * Get the minimum allowed value + * + * @return The mimium allowed value + */ + @FXML + public int getMin() { + return min; + } + + /** + * Set the minimum allowed value + * + * @param min The minimum allowed value + */ + @FXML + public void setMin(final int min) { + this.min = min; } } diff --git a/src/main/java/com/codedead/opal/domain/OSType.java b/src/main/java/com/codedead/opal/domain/OSType.java index 0ebbd34..6d4d26b 100644 --- a/src/main/java/com/codedead/opal/domain/OSType.java +++ b/src/main/java/com/codedead/opal/domain/OSType.java @@ -1,5 +1,5 @@ package com.codedead.opal.domain; public enum OSType { - Windows, MacOS, Linux, Other, + WINDOWS, MACOS, LINUX, OTHER, } diff --git a/src/main/java/com/codedead/opal/domain/OsCheck.java b/src/main/java/com/codedead/opal/domain/OsCheck.java index 7c8c6cd..a0edd74 100644 --- a/src/main/java/com/codedead/opal/domain/OsCheck.java +++ b/src/main/java/com/codedead/opal/domain/OsCheck.java @@ -22,13 +22,13 @@ public static OSType getOperatingSystemType() { if (detectedOS == null) { final String OS = System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH); if ((OS.contains("mac")) || (OS.contains("darwin"))) { - detectedOS = OSType.MacOS; + detectedOS = OSType.MACOS; } else if (OS.contains("win")) { - detectedOS = OSType.Windows; + detectedOS = OSType.WINDOWS; } else if (OS.contains("nux")) { - detectedOS = OSType.Linux; + detectedOS = OSType.LINUX; } else { - detectedOS = OSType.Other; + detectedOS = OSType.OTHER; } } return detectedOS; diff --git a/src/main/java/com/codedead/opal/domain/SoundPane.java b/src/main/java/com/codedead/opal/domain/SoundPane.java index 08a9302..1b18e1e 100644 --- a/src/main/java/com/codedead/opal/domain/SoundPane.java +++ b/src/main/java/com/codedead/opal/domain/SoundPane.java @@ -19,6 +19,8 @@ public final class SoundPane extends GridPane { private Label lblName; @FXML private Slider sldVolume; + @FXML + private String key; /** * Initialize a new SoundPane @@ -108,4 +110,24 @@ public void setVolume(final double volume) { public Slider getSlider() { return sldVolume; } + + /** + * Get the key + * + * @return The key + */ + @FXML + public String getKey() { + return key; + } + + /** + * Set the key + * + * @param key The key + */ + @FXML + public void setKey(final String key) { + this.key = key; + } } diff --git a/src/main/java/com/codedead/opal/utils/HelpUtils.java b/src/main/java/com/codedead/opal/utils/HelpUtils.java index c17b8c5..7fa0451 100644 --- a/src/main/java/com/codedead/opal/utils/HelpUtils.java +++ b/src/main/java/com/codedead/opal/utils/HelpUtils.java @@ -54,6 +54,10 @@ public void openFile(final RunnableFileOpener runnableFileOpener) throws FileNot public void openFileFromResources(final RunnableFileOpener runnableFileOpener, final String resource) throws IOException { if (runnableFileOpener == null) throw new NullPointerException("RunnableFileOpener cannot be null!"); + if (resource == null) + throw new NullPointerException("Resource cannot be null!"); + if (resource.isEmpty()) + throw new IllegalArgumentException("Resource cannot be empty!"); logger.info("Attempting to open file from resources {}", resource); diff --git a/src/main/java/com/codedead/opal/utils/SharedVariables.java b/src/main/java/com/codedead/opal/utils/SharedVariables.java index 7e86ca6..73127d0 100644 --- a/src/main/java/com/codedead/opal/utils/SharedVariables.java +++ b/src/main/java/com/codedead/opal/utils/SharedVariables.java @@ -3,7 +3,7 @@ public final class SharedVariables { public static final String ICON_URL = "/images/opal.png"; - public static final String CURRENT_VERSION = "1.0.2.0"; + public static final String CURRENT_VERSION = "1.0.3.0"; public static final boolean PORTABLE = false; public static final String DEFAULT_LOCALE = "en-US"; diff --git a/src/main/resources/audio/football.mp3 b/src/main/resources/audio/football.mp3 new file mode 100644 index 0000000..a595bd3 Binary files /dev/null and b/src/main/resources/audio/football.mp3 differ diff --git a/src/main/resources/audio/gong.mp3 b/src/main/resources/audio/gong.mp3 new file mode 100644 index 0000000..d6e6425 Binary files /dev/null and b/src/main/resources/audio/gong.mp3 differ diff --git a/src/main/resources/audio/networking.mp3 b/src/main/resources/audio/networking.mp3 new file mode 100644 index 0000000..6710d88 Binary files /dev/null and b/src/main/resources/audio/networking.mp3 differ diff --git a/src/main/resources/audio/sleepy.mp3 b/src/main/resources/audio/sleepy.mp3 new file mode 100644 index 0000000..00210aa Binary files /dev/null and b/src/main/resources/audio/sleepy.mp3 differ diff --git a/src/main/resources/audio/tribal.mp3 b/src/main/resources/audio/tribal.mp3 new file mode 100644 index 0000000..bbbe6c6 Binary files /dev/null and b/src/main/resources/audio/tribal.mp3 differ diff --git a/src/main/resources/audio/tribal2.mp3 b/src/main/resources/audio/tribal2.mp3 new file mode 100644 index 0000000..d161475 Binary files /dev/null and b/src/main/resources/audio/tribal2.mp3 differ diff --git a/src/main/resources/images/football.png b/src/main/resources/images/football.png new file mode 100644 index 0000000..f4f0efb Binary files /dev/null and b/src/main/resources/images/football.png differ diff --git a/src/main/resources/images/gong.png b/src/main/resources/images/gong.png new file mode 100644 index 0000000..108f0a6 Binary files /dev/null and b/src/main/resources/images/gong.png differ diff --git a/src/main/resources/images/networking.png b/src/main/resources/images/networking.png new file mode 100644 index 0000000..24e37f7 Binary files /dev/null and b/src/main/resources/images/networking.png differ diff --git a/src/main/resources/images/sleepy.png b/src/main/resources/images/sleepy.png new file mode 100644 index 0000000..51d51ac Binary files /dev/null and b/src/main/resources/images/sleepy.png differ diff --git a/src/main/resources/images/tribal.png b/src/main/resources/images/tribal.png new file mode 100644 index 0000000..08c0481 Binary files /dev/null and b/src/main/resources/images/tribal.png differ diff --git a/src/main/resources/images/tribal2.png b/src/main/resources/images/tribal2.png new file mode 100644 index 0000000..04032a8 Binary files /dev/null and b/src/main/resources/images/tribal2.png differ diff --git a/src/main/resources/translations/OpalApplication.properties b/src/main/resources/translations/OpalApplication.properties index 483866b..3e2d645 100644 --- a/src/main/resources/translations/OpalApplication.properties +++ b/src/main/resources/translations/OpalApplication.properties @@ -1,5 +1,5 @@ About=About -AboutText=Opal was created by DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nTheme: Modena\nVersion: 1.0.2\n\nCopyright © 2022 CodeDead +AboutText=Opal was created by DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nTheme: Modena\nVersion: 1.0.3\n\nCopyright © 2022 CodeDead AboutWindowError=Unable to open the About Window! AboutWindowTitle=Opal - About AutoUpdate=Automatically check for updates @@ -67,3 +67,10 @@ Frogs=Frogs Zen=Zen Coffee=Coffee Zoo=Zoo +Audiences=Audiences +NetworkingEvent=Networking event +TribalFestival=Tribal festival +Football=Football +Sleepy=Sleepy +DrumTribalFestival=Drum tribal festival +Gong=Gong diff --git a/src/main/resources/translations/OpalApplication_de_DE.properties b/src/main/resources/translations/OpalApplication_de_DE.properties new file mode 100644 index 0000000..87ff963 --- /dev/null +++ b/src/main/resources/translations/OpalApplication_de_DE.properties @@ -0,0 +1,76 @@ +About=Über +AboutText=Opal wurde erstellt von: DeadLine\n\nAudio: ZapSplat.com\nBilder: Remix Icon\nDesign: Modena\nÜbersetzung: github.com/uDEV2019\nVersion: 1.0.3\n\nCopyright © 2022 CodeDead +AboutWindowError=Über-Dialog konnte nicht geöffnet werden! +AboutWindowTitle=Opal - Über +AutoUpdate=Automatisch auf Aktualisierungen prüfen +Birds=Vögel +Chatter=Geschwätz +CheckForUpdates=Auf Aktualisierungen prüfen +Close=Schließen +ConfirmReset=Sind Sie sicher, dass Sie alle Einstellungen zurücksetzen möchten? +Donate=Spenden +Exit=Beenden +File=Datei +FileExecutionError=Datei konnte nicht geöffnet werden! +Fireplace=Kamin +General=Allgemein +Help=Hilfe +HelpFileError=Hilfedatei konnte nicht geöffnet werden! +HelpMenu=_Hilfe +Homepage=Webseite +Language=Sprache +License=Lizenz +LicenseFileError=Lizenzdatei konnte nicht geöffnet werden! +LogLevel=Protokollierung +MainWindowTitle=Opal +Nature=Natur +NewUpdateAvailable=Version {v} ist verfügbar. Möchten Sie diese Version herunterladen? +NoUpdateAvailable=Keine Aktualisierungen verfügbar! +Office=Büro +OpenSoundPreset=Ton-Voreinstellung öffnen +OpenSoundPresetError=Ton-Voreinstellung konnte nicht geöffnet werden! +Phone=Telefon +Rain=Regen +Reset=Zurücksetzen +ResetSettingsError=Einstellungen konnten nicht zurückgesetzt werden! +RestartRequired=Zur Änderung der Sprache muss das Programm neu gestartet werden! +Save=Speichern +SaveSettingsError=Einstellungen konnten nicht gespeichert werden! +SaveSoundPreset=Toneinstellungen speichern +SaveSoundPresetError=Toneinstellungen konnten nicht gespeichert werden! +Settings=Einstellungen +SettingsWindowError=Einstellungen-Dialog konnte nicht geöffnet werden! +SettingsWindowTitle=Opal - Einstellungen +Thunder=Donner +Tools=_Werkzeuge +Traffic=Verkehr +Typing=Tippen +UpdateError=Prüfung auf Aktualisierungen nicht möglich! +WebsiteError=Webseite konnte nicht geöffnet werden! +Wind=Wind +River=Fluss +Clock=Uhr +Static=Statisch +Other=Sonstige +Timer=Zeitsteuerung +Enabled=Aktiviert +Delay=Verzögerung +Seconds=Sekunde(n) +Minutes=Minute(n) +Hours=Stunde(n) +TimerDelayTooSmall=Verzögerung darf nicht kleiner als 1 sein! +Fantasy=Fantasie +Fan=Lüfter +TimerApplicationShutdown=Opal beenden +Cave=Höhle +Frogs=Frösche +Zen=Zen +Coffee=Kaffee +Zoo=Zoo +Audiences=Publikum +NetworkingEvent=Netzwerkveranstaltung +TribalFestival=Stammesfest +Football=Football +Sleepy=Schläfrig +DrumTribalFestival=Stammesfest der Trommeln +Gong=Klingel diff --git a/src/main/resources/translations/OpalApplication_en_US.properties b/src/main/resources/translations/OpalApplication_en_US.properties index 483866b..3e2d645 100644 --- a/src/main/resources/translations/OpalApplication_en_US.properties +++ b/src/main/resources/translations/OpalApplication_en_US.properties @@ -1,5 +1,5 @@ About=About -AboutText=Opal was created by DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nTheme: Modena\nVersion: 1.0.2\n\nCopyright © 2022 CodeDead +AboutText=Opal was created by DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nTheme: Modena\nVersion: 1.0.3\n\nCopyright © 2022 CodeDead AboutWindowError=Unable to open the About Window! AboutWindowTitle=Opal - About AutoUpdate=Automatically check for updates @@ -67,3 +67,10 @@ Frogs=Frogs Zen=Zen Coffee=Coffee Zoo=Zoo +Audiences=Audiences +NetworkingEvent=Networking event +TribalFestival=Tribal festival +Football=Football +Sleepy=Sleepy +DrumTribalFestival=Drum tribal festival +Gong=Gong diff --git a/src/main/resources/translations/OpalApplication_es_ES.properties b/src/main/resources/translations/OpalApplication_es_ES.properties index 84f95a9..af2d16d 100644 --- a/src/main/resources/translations/OpalApplication_es_ES.properties +++ b/src/main/resources/translations/OpalApplication_es_ES.properties @@ -1,5 +1,5 @@ About=Acerca de -AboutText=Opal fue creado por DeadLine\n\nAudio: ZapSplat.com\nImágenes: Remix Icon\nTema: Módena\nVersión: 1.0.2\n\nCopyright © 2022 CodeDead +AboutText=Opal fue creado por DeadLine\n\nAudio: ZapSplat.com\nImágenes: Remix Icon\nTema: Módena\nVersión: 1.0.3\n\nCopyright © 2022 CodeDead AboutWindowError=¡No se puede abrir la ventana Acerca de! AboutWindowTitle=Opal - Acerca de AutoUpdate=Buscar actualizaciones automáticamente @@ -67,3 +67,10 @@ Frogs=Ranas Zen=Zen Coffee=Café Zoo=Zoo +Audiences=Audiencias +NetworkingEvent=Evento de redes +TribalFestival=Fiesta tribal +Football=Fútbol +Sleepy=Somnoliento +DrumTribalFestival=Festival tribal de tambores +Gong=Gongo diff --git a/src/main/resources/translations/OpalApplication_fr_FR.properties b/src/main/resources/translations/OpalApplication_fr_FR.properties index 4718e78..a18fa0a 100644 --- a/src/main/resources/translations/OpalApplication_fr_FR.properties +++ b/src/main/resources/translations/OpalApplication_fr_FR.properties @@ -1,5 +1,5 @@ About=À propos -AboutText=Opal a été créé par DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nThème: Modena\nVersion: 1.0.2\n\nCopyright © 2022 CodeDead +AboutText=Opal a été créé par DeadLine\n\nAudio: ZapSplat.com\nImages: Remix Icon\nThème: Modena\nVersion: 1.0.3\n\nCopyright © 2022 CodeDead AboutWindowError=Impossible d'ouvrir la fenêtre À propos! AboutWindowTitle=Opal - À propos AutoUpdate=Rechercher automatiquement les mises à jour @@ -67,3 +67,10 @@ Frogs=Crapauds Zen=Zen Coffee=Café Zoo=Zoo +Audiences=Publics +NetworkingEvent=Événement de réseautage +TribalFestival=Fête tribale +Football=Football +Sleepy=Somnolent +DrumTribalFestival=Fête tribale du tambour +Gong=Gong diff --git a/src/main/resources/translations/OpalApplication_nl_NL.properties b/src/main/resources/translations/OpalApplication_nl_NL.properties index 7d9a580..caf776f 100644 --- a/src/main/resources/translations/OpalApplication_nl_NL.properties +++ b/src/main/resources/translations/OpalApplication_nl_NL.properties @@ -1,5 +1,5 @@ About=Over -AboutText=Opal is gemaakt door DeadLine\n\nAudio: ZapSplat.com\nAfbeeldingen: Remix Icon\nThema: Modena\nVersie: 1.0.2\n\nCopyright © 2022 CodeDead +AboutText=Opal is gemaakt door DeadLine\n\nAudio: ZapSplat.com\nAfbeeldingen: Remix Icon\nThema: Modena\nVersie: 1.0.3\n\nCopyright © 2022 CodeDead AboutWindowError=Kan het Over venster niet openen! AboutWindowTitle=Opal - Over AutoUpdate=Automatisch controleren op updates @@ -67,3 +67,10 @@ Frogs=Kikkers Zen=Zen Coffee=Koffie Zoo=Zoo +Audiences=Publiek +NetworkingEvent=Netwerkbijeenkomst +TribalFestival=Stammenfestival +Football=Voetbal +Sleepy=Slaperig +DrumTribalFestival=Drumstammenfestival +Gong=Gong diff --git a/src/main/resources/translations/OpalApplication_ru_RU.properties b/src/main/resources/translations/OpalApplication_ru_RU.properties index fb8e1ae..14bb821 100644 --- a/src/main/resources/translations/OpalApplication_ru_RU.properties +++ b/src/main/resources/translations/OpalApplication_ru_RU.properties @@ -1,5 +1,5 @@ About=О -AboutText=Opal был создан DeadLine\n\nАудио: ZapSplat.com\nИзображения: Remix Icon\nТема: Modena\nВерсия: 1.0.2\n\nАвторские права © 2022 CodeDead +AboutText=Opal был создан DeadLine\n\nАудио: ZapSplat.com\nИзображения: Remix Icon\nТема: Modena\nВерсия: 1.0.3\n\nАвторские права © 2022 CodeDead AboutWindowError=Не удается открыть окно «О программе»! AboutWindowTitle=Opal - О компании AutoUpdate=Автоматически проверять наличие обновлений @@ -67,3 +67,10 @@ Frogs=Лягушки Zen=дзен Coffee=Кофе Zoo=Зоопарк +Audiences=Аудитории +NetworkingEvent=Сетевое мероприятие +TribalFestival=Племенной фестиваль +Football=Футбол +Sleepy=Сонный +DrumTribalFestival=Племенной фестиваль барабанов +Gong=Гонг diff --git a/src/main/resources/windows/AboutWindow.fxml b/src/main/resources/windows/AboutWindow.fxml index 1749f60..bd1deb0 100644 --- a/src/main/resources/windows/AboutWindow.fxml +++ b/src/main/resources/windows/AboutWindow.fxml @@ -5,6 +5,7 @@ + - + @@ -38,7 +40,7 @@ - -