) c -> c.setAccount(account)
+ );
+ accountsPane.getChildren().add(node);
+ }
}
}
diff --git a/src/main/java/com/andrewlalis/perfin/control/StartupSplashScreenController.java b/src/main/java/com/andrewlalis/perfin/control/StartupSplashScreenController.java
index a998601..4c908a5 100644
--- a/src/main/java/com/andrewlalis/perfin/control/StartupSplashScreenController.java
+++ b/src/main/java/com/andrewlalis/perfin/control/StartupSplashScreenController.java
@@ -34,7 +34,7 @@ public class StartupSplashScreenController {
}
printlnLater("Perfin initialized. Starting the app now.");
- Thread.sleep(50000);
+ Thread.sleep(500);
Platform.runLater(() -> getSplashStage().setDone());
} catch (Exception e) {
diff --git a/src/main/java/com/andrewlalis/perfin/model/Account.java b/src/main/java/com/andrewlalis/perfin/model/Account.java
new file mode 100644
index 0000000..bd3654e
--- /dev/null
+++ b/src/main/java/com/andrewlalis/perfin/model/Account.java
@@ -0,0 +1,48 @@
+package com.andrewlalis.perfin.model;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.Currency;
+
+/**
+ * The representation of a physical account of some sort (checking, savings,
+ * credit-card, etc.).
+ */
+public class Account {
+ private long id;
+ private LocalDateTime createdAt;
+
+ private AccountType type;
+ private String accountNumber;
+ private BigDecimal currentBalance;
+ private String name;
+ private Currency currency;
+
+ public Account(AccountType type, String accountNumber, BigDecimal currentBalance, String name, Currency currency) {
+ this.type = type;
+ this.accountNumber = accountNumber;
+ this.currentBalance = currentBalance;
+ this.name = name;
+ this.currency = currency;
+ }
+
+ public AccountType getType() {
+ return type;
+ }
+
+ public String getAccountNumber() {
+ return accountNumber;
+ }
+
+ public BigDecimal getCurrentBalance() {
+ return currentBalance;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public Currency getCurrency() {
+ return currency;
+ }
+}
diff --git a/src/main/java/com/andrewlalis/perfin/model/AccountEntry.java b/src/main/java/com/andrewlalis/perfin/model/AccountEntry.java
new file mode 100644
index 0000000..50eba0c
--- /dev/null
+++ b/src/main/java/com/andrewlalis/perfin/model/AccountEntry.java
@@ -0,0 +1,45 @@
+package com.andrewlalis.perfin.model;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.Currency;
+
+/**
+ * A single entry depicting a credit or debit to an account.
+ *
+ * The following rules apply in determining the type of an entry:
+ *
+ *
+ * - A debit indicates an increase in assets or decrease in liability.
+ * - A credit indicates a decrease in assets or increase in liability.
+ *
+ */
+public class AccountEntry {
+ public enum Type {
+ CREDIT,
+ DEBIT
+ }
+
+ private long id;
+ private LocalDateTime timestamp;
+ private long accountId;
+ private BigDecimal amount;
+ private Type type;
+ private Currency currency;
+
+ public AccountEntry(long id, LocalDateTime timestamp, long accountId, BigDecimal amount, Type type, Currency currency) {
+ this.id = id;
+ this.timestamp = timestamp;
+ this.accountId = accountId;
+ this.amount = amount;
+ this.type = type;
+ this.currency = currency;
+ }
+
+ public AccountEntry(long accountId, BigDecimal amount, Type type, Currency currency) {
+ this.accountId = accountId;
+ this.amount = amount;
+ this.type = type;
+ this.currency = currency;
+ }
+}
diff --git a/src/main/java/com/andrewlalis/perfin/model/AccountType.java b/src/main/java/com/andrewlalis/perfin/model/AccountType.java
new file mode 100644
index 0000000..827912e
--- /dev/null
+++ b/src/main/java/com/andrewlalis/perfin/model/AccountType.java
@@ -0,0 +1,7 @@
+package com.andrewlalis.perfin.model;
+
+public enum AccountType {
+ CHECKING,
+ SAVINGS,
+ CREDIT_CARD
+}
diff --git a/src/main/java/com/andrewlalis/perfin/model/Profile.java b/src/main/java/com/andrewlalis/perfin/model/Profile.java
new file mode 100644
index 0000000..1a39e47
--- /dev/null
+++ b/src/main/java/com/andrewlalis/perfin/model/Profile.java
@@ -0,0 +1,16 @@
+package com.andrewlalis.perfin.model;
+
+/**
+ * A profile is essentially a complete set of data that the application can
+ * operate on, sort of like a save file or user account. The profile contains
+ * a set of accounts, transaction records, attached documents, historical data,
+ * and more. A profile can be imported or exported easily from the application,
+ * and can be encrypted for additional security. Each profile also has its own
+ * settings.
+ * Practically, each profile is stored as its own isolated database file, with
+ * a name corresponding to the profile's name.
+ */
+public class Profile {
+ private String name;
+
+}
diff --git a/src/main/java/com/andrewlalis/perfin/view/SplashScreenStage.java b/src/main/java/com/andrewlalis/perfin/view/SplashScreenStage.java
index f5fcb90..159b0c7 100644
--- a/src/main/java/com/andrewlalis/perfin/view/SplashScreenStage.java
+++ b/src/main/java/com/andrewlalis/perfin/view/SplashScreenStage.java
@@ -3,9 +3,6 @@ package com.andrewlalis.perfin.view;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.value.ObservableValue;
import javafx.scene.Scene;
-import javafx.scene.paint.Color;
-import javafx.scene.shape.Rectangle;
-import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java
index b4b18d2..ea1442c 100644
--- a/src/main/java/module-info.java
+++ b/src/main/java/module-info.java
@@ -4,7 +4,7 @@ module com.andrewlalis.perfin {
requires javafx.fxml;
requires javafx.graphics;
- requires org.xerial.sqlitejdbc;
+ requires com.fasterxml.jackson.databind;
exports com.andrewlalis.perfin to javafx.graphics;
opens com.andrewlalis.perfin.control to javafx.fxml;
diff --git a/src/main/resources/account-tile.fxml b/src/main/resources/account-tile.fxml
new file mode 100644
index 0000000..8988e68
--- /dev/null
+++ b/src/main/resources/account-tile.fxml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/main.fxml b/src/main/resources/main.fxml
index 7776e5a..b88c606 100644
--- a/src/main/resources/main.fxml
+++ b/src/main/resources/main.fxml
@@ -1,24 +1,31 @@
-
-
-
-
+
+
+
+
+
+
diff --git a/src/main/resources/startup-splash-screen.fxml b/src/main/resources/startup-splash-screen.fxml
index 1b66411..ff47cdf 100644
--- a/src/main/resources/startup-splash-screen.fxml
+++ b/src/main/resources/startup-splash-screen.fxml
@@ -8,7 +8,7 @@
xmlns="http://javafx.com/javafx/17.0.2-ea"
xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.andrewlalis.perfin.control.StartupSplashScreenController"
- stylesheets="/startup-splash-screen.css"
+ stylesheets="@style/startup-splash-screen.css"
>
diff --git a/src/main/resources/style/account-tile.css b/src/main/resources/style/account-tile.css
new file mode 100644
index 0000000..6e00d2e
--- /dev/null
+++ b/src/main/resources/style/account-tile.css
@@ -0,0 +1,24 @@
+.account-tile-container {
+ -fx-border-color: lightgray;
+ -fx-border-width: 1px;
+ -fx-border-style: solid;
+ -fx-padding: 5px;
+}
+
+.account-tile-container:hover {
+ -fx-cursor: hand;
+}
+
+.main-label {
+ -fx-font-weight: bold;
+ -fx-font-size: large;
+}
+
+.property-label {
+ -fx-font-weight: bold;
+}
+
+.property-value {
+ -fx-font-family: monospace;
+ -fx-font-size: large;
+}
diff --git a/src/main/resources/style/main.css b/src/main/resources/style/main.css
new file mode 100644
index 0000000..471e3a4
--- /dev/null
+++ b/src/main/resources/style/main.css
@@ -0,0 +1,3 @@
+#accountsPane {
+ -fx-padding: 5px;
+}
\ No newline at end of file
diff --git a/src/main/resources/startup-splash-screen.css b/src/main/resources/style/startup-splash-screen.css
similarity index 91%
rename from src/main/resources/startup-splash-screen.css
rename to src/main/resources/style/startup-splash-screen.css
index 39cfecf..410e1e2 100644
--- a/src/main/resources/startup-splash-screen.css
+++ b/src/main/resources/style/startup-splash-screen.css
@@ -1,5 +1,5 @@
#sceneRoot {
- -fx-background-image: url("images/splash-screen.png");
+ -fx-background-image: url("../images/splash-screen.png");
-fx-background-repeat: stretch;
-fx-background-size: 400 200;
-fx-background-color: transparent;