From 8270c5a273fb7457e70c36814e231d749b5d4215 Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Mon, 8 Jan 2024 22:43:41 -0500 Subject: [PATCH] Added basic side-panel help info, soon will add router implementation for pages. --- .../perfin/control/MainViewController.java | 21 +++++++++++++++++++ src/main/resources/account-view.fxml | 2 +- src/main/resources/create-balance-record.fxml | 2 +- src/main/resources/edit-account.fxml | 2 +- src/main/resources/main-view.fxml | 16 ++++++++++++++ src/main/resources/style/base.css | 4 ---- src/main/resources/transaction-view.fxml | 2 +- 7 files changed, 41 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/andrewlalis/perfin/control/MainViewController.java b/src/main/java/com/andrewlalis/perfin/control/MainViewController.java index 3347df1..6e9c27b 100644 --- a/src/main/java/com/andrewlalis/perfin/control/MainViewController.java +++ b/src/main/java/com/andrewlalis/perfin/control/MainViewController.java @@ -4,9 +4,11 @@ import com.andrewlalis.javafx_scene_router.AnchorPaneRouterView; import com.andrewlalis.perfin.view.BindingUtil; import com.andrewlalis.perfin.view.ProfilesStage; import javafx.fxml.FXML; +import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; +import javafx.scene.layout.VBox; import static com.andrewlalis.perfin.PerfinApp.router; @@ -14,6 +16,10 @@ public class MainViewController { @FXML public BorderPane mainContainer; @FXML public HBox breadcrumbHBox; + @FXML public Button showManualButton; + @FXML public Button hideManualButton; + @FXML public VBox manualVBox; + @FXML public void initialize() { AnchorPaneRouterView routerView = (AnchorPaneRouterView) router.getView(); mainContainer.setCenter(routerView.getAnchorPane()); @@ -31,6 +37,13 @@ public class MainViewController { } ); + manualVBox.managedProperty().bind(manualVBox.visibleProperty()); + manualVBox.setVisible(false); + showManualButton.managedProperty().bind(showManualButton.visibleProperty()); + showManualButton.visibleProperty().bind(manualVBox.visibleProperty().not()); + hideManualButton.managedProperty().bind(hideManualButton.visibleProperty()); + hideManualButton.visibleProperty().bind(manualVBox.visibleProperty()); + router.navigate("accounts"); } @@ -55,4 +68,12 @@ public class MainViewController { @FXML public void viewProfiles() { ProfilesStage.open(mainContainer.getScene().getWindow()); } + + @FXML public void showManual() { + manualVBox.setVisible(true); + } + + @FXML public void hideManual() { + manualVBox.setVisible(false); + } } diff --git a/src/main/resources/account-view.fxml b/src/main/resources/account-view.fxml index 1529d47..3005798 100644 --- a/src/main/resources/account-view.fxml +++ b/src/main/resources/account-view.fxml @@ -10,7 +10,7 @@ fx:controller="com.andrewlalis.perfin.control.AccountViewController" > -
diff --git a/src/main/resources/create-balance-record.fxml b/src/main/resources/create-balance-record.fxml index 0a9482a..ce35fec 100644 --- a/src/main/resources/create-balance-record.fxml +++ b/src/main/resources/create-balance-record.fxml @@ -10,7 +10,7 @@ fx:controller="com.andrewlalis.perfin.control.CreateBalanceRecordController" > -
diff --git a/src/main/resources/edit-account.fxml b/src/main/resources/edit-account.fxml index 89aeb6c..8428946 100644 --- a/src/main/resources/edit-account.fxml +++ b/src/main/resources/edit-account.fxml @@ -10,7 +10,7 @@ > -
diff --git a/src/main/resources/main-view.fxml b/src/main/resources/main-view.fxml index e91f01b..90d1a3e 100644 --- a/src/main/resources/main-view.fxml +++ b/src/main/resources/main-view.fxml @@ -2,6 +2,8 @@ + +