From e6f1a506226705439c7e3738e1dc980dee9431c3 Mon Sep 17 00:00:00 2001 From: Dmitry Isaenko Date: Sat, 19 Oct 2019 09:34:42 +0300 Subject: [PATCH] Configuration files support --- README.md | 8 +- pom.xml | 23 +- .../java/logiled/Config/HexDeserializer.java | 28 + .../java/logiled/Config/HexSerializer.java | 23 + .../logiled/Config/LoRuleDeSerializer.java | 57 ++ .../java/logiled/Config/LoRuleSerializer.java | 32 + .../logiled/Config/SettingsFileFormat.java | 49 ++ .../Controllers/EffectsController.java | 90 ++- .../Controllers/GameModeController.java | 20 +- .../Controllers/{ => Helpers}/LoCodepage.java | 2 +- .../Controllers/{ => Helpers}/LoEffects.java | 2 +- .../Controllers/KeysLedsController.java | 151 ++++- .../logiled/Controllers/MainController.java | 154 ++++- .../logiled/Controllers/Model/LoRule.java | 34 + .../Controllers/{ => Model}/RuleBox.java | 71 +- src/main/java/logiled/MainFx.java | 4 +- src/main/java/logiled/ServiceWindow.java | 18 + src/main/java/logiled/USB/EffectsThread.java | 2 +- src/main/resources/GameModePane.fxml | 9 +- src/main/resources/KeysLedsPane.fxml | 626 +++++++++--------- src/main/resources/Main.fxml | 31 +- src/main/resources/ico/appIcon_24.png | Bin 0 -> 6934 bytes src/main/resources/locale.properties | 8 + src/main/resources/locale_rus.properties | 8 + 24 files changed, 1108 insertions(+), 342 deletions(-) create mode 100644 src/main/java/logiled/Config/HexDeserializer.java create mode 100644 src/main/java/logiled/Config/HexSerializer.java create mode 100644 src/main/java/logiled/Config/LoRuleDeSerializer.java create mode 100644 src/main/java/logiled/Config/LoRuleSerializer.java create mode 100644 src/main/java/logiled/Config/SettingsFileFormat.java rename src/main/java/logiled/Controllers/{ => Helpers}/LoCodepage.java (98%) rename src/main/java/logiled/Controllers/{ => Helpers}/LoEffects.java (93%) create mode 100644 src/main/java/logiled/Controllers/Model/LoRule.java rename src/main/java/logiled/Controllers/{ => Model}/RuleBox.java (70%) create mode 100644 src/main/java/logiled/ServiceWindow.java create mode 100644 src/main/resources/ico/appIcon_24.png diff --git a/README.md b/README.md index a26114f..5d01dcd 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ LogiLed is a Logitech G513 Carbon GUI driver for adjusting backlight and effects #### Used libraries & resources * [OpenJFX](https://wiki.openjdk.java.net/display/OpenJFX/Main) * [usb4java](https://mvnrepository.com/artifact/org.usb4java/usb4java) +* [Jackson](https://github.com/FasterXML/jackson) * Few icons taken from: [materialdesignicons.com](http://materialdesignicons.com/) * Special thanks to pioneers and superstars who created, contributed and maintaining [g810-led](https://github.com/MatMoul/g810-led) project! @@ -55,7 +56,12 @@ Want to support development? Make a donation* (see below): #### TODO * [x] Tray support -* [ ] Configuration files support + * [ ] tray icon size checks +* [x] Configuration files support * [ ] Settings + * [ ] Tray icon settings + * [ ] Autoload * [ ] Headless mode (CLI) +* [ ] Fix UI + * [ ] Add opened file name to info pane * [ ] Dark theme \ No newline at end of file diff --git a/pom.xml b/pom.xml index 6fa8e6f..596e6ad 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ loper LogiLed - 0.3-SNAPSHOT + 0.4-SNAPSHOT @@ -143,6 +143,27 @@ 1.3.0 compile + + + com.fasterxml.jackson.core + jackson-core + 2.10.0 + compile + + + + com.fasterxml.jackson.core + jackson-annotations + 2.10.0 + compile + + + + com.fasterxml.jackson.core + jackson-databind + 2.10.0 + compile +