From 3a734b84705ccb8174e9cf24b74d7a3c3b2c1beb Mon Sep 17 00:00:00 2001 From: Kostya Date: Sun, 11 Oct 2026 19:28:04 +0300 Subject: ui-fx: move the JavaFX UI into a module that sees only the api Exercise 3 asks for a new desktop client that reuses the Exercise 2 screens, and the course asks that clients depend on the DTO contract, never on the engine. ui-desktop mixed both: its views and controllers only talk to the api interfaces, but AppView and AppState each had a convenience constructor that built a ServiceEngine, which tied every UI class to the service module. Move the screens, controllers, components, FXML, skins and fonts into a new ui-fx module that depends on api alone. Packages are unchanged, so FXML controller names and resource paths keep working as they are. ui-desktop keeps only the Exercise 2 app: Launcher, App, which now builds the ServiceEngine and passes its contexts in, and ServiceEngine itself. The Exercise 3 client can then reuse ui-fx with remote contexts and never put the engine on its classpath. The build proves the split: ui-fx compiles with nothing but api visible. Tests move with the code they cover. AppStateTest drives the real engine, so it stays in ui-desktop. --- .../market/guess/ui/desktop/app_view.fxml | 158 ++++ .../desktop/controllers/dialog_create_event.fxml | 137 +++ .../guess/ui/desktop/controllers/dialog_load.fxml | 32 + .../ui/desktop/controllers/dialog_resolve.fxml | 54 ++ .../guess/ui/desktop/controllers/empty_state.fxml | 19 + .../guess/ui/desktop/controllers/events_tab.fxml | 448 ++++++++++ .../guess/ui/desktop/controllers/users_tab.fxml | 240 ++++++ .../market/guess/ui/desktop/event_list_item.fxml | 30 + .../desktop/fonts/CaskaydiaCoveNerdFont-Bold.ttf | Bin 0 -> 2959748 bytes .../fonts/CaskaydiaCoveNerdFont-Regular.ttf | Bin 0 -> 2959676 bytes .../ui/desktop/fonts/FiraCodeNerdFont-Bold.ttf | Bin 0 -> 2782540 bytes .../ui/desktop/fonts/FiraCodeNerdFont-Regular.ttf | Bin 0 -> 2752724 bytes .../desktop/fonts/JetBrainsMonoNerdFont-Bold.ttf | Bin 0 -> 2472872 bytes .../fonts/JetBrainsMonoNerdFont-Regular.ttf | Bin 0 -> 2469104 bytes .../market/guess/ui/desktop/ladder_item.fxml | 18 + .../market/guess/ui/desktop/participant_item.fxml | 19 + .../resources/market/guess/ui/desktop/theme.css | 926 +++++++++++++++++++++ .../guess/ui/desktop/trade_history_item.fxml | 19 + .../market/guess/ui/desktop/user_event_item.fxml | 21 + .../market/guess/ui/desktop/user_list_item.fxml | 22 + 20 files changed, 2143 insertions(+) create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/app_view.fxml create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/controllers/dialog_create_event.fxml create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/controllers/dialog_load.fxml create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/controllers/dialog_resolve.fxml create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/controllers/empty_state.fxml create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/controllers/events_tab.fxml create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/controllers/users_tab.fxml create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/event_list_item.fxml create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/fonts/CaskaydiaCoveNerdFont-Bold.ttf create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/fonts/CaskaydiaCoveNerdFont-Regular.ttf create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/fonts/FiraCodeNerdFont-Bold.ttf create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/fonts/FiraCodeNerdFont-Regular.ttf create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/fonts/JetBrainsMonoNerdFont-Bold.ttf create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/fonts/JetBrainsMonoNerdFont-Regular.ttf create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/ladder_item.fxml create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/participant_item.fxml create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/theme.css create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/trade_history_item.fxml create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/user_event_item.fxml create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/user_list_item.fxml (limited to 'ui-fx/src/main/resources/market') diff --git a/ui-fx/src/main/resources/market/guess/ui/desktop/app_view.fxml b/ui-fx/src/main/resources/market/guess/ui/desktop/app_view.fxml new file mode 100644 index 0000000..855b787 --- /dev/null +++ b/ui-fx/src/main/resources/market/guess/ui/desktop/app_view.fxml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +