diff --git a/src/main/java/com/andrewlalis/perfin/control/AccountViewController.java b/src/main/java/com/andrewlalis/perfin/control/AccountViewController.java index 42860c7..31c77b3 100644 --- a/src/main/java/com/andrewlalis/perfin/control/AccountViewController.java +++ b/src/main/java/com/andrewlalis/perfin/control/AccountViewController.java @@ -8,8 +8,6 @@ import javafx.fxml.FXML; import javafx.scene.control.Label; import javafx.scene.control.TextField; -import java.time.format.DateTimeFormatter; - import static com.andrewlalis.perfin.PerfinApp.router; public class AccountViewController implements RouteSelectionListener { @@ -47,9 +45,7 @@ public class AccountViewController implements RouteSelectionListener { @FXML public void deleteAccount() { - Profile.getCurrent().getDataSource().useAccountRepository(repo -> { - repo.delete(account); - }); + Profile.getCurrent().getDataSource().useAccountRepository(repo -> repo.delete(account)); router.getHistory().clear(); router.navigate("accounts"); } diff --git a/src/main/java/com/andrewlalis/perfin/control/component/AccountTile.java b/src/main/java/com/andrewlalis/perfin/control/component/AccountTile.java index b53f6de..02d67da 100644 --- a/src/main/java/com/andrewlalis/perfin/control/component/AccountTile.java +++ b/src/main/java/com/andrewlalis/perfin/control/component/AccountTile.java @@ -1,6 +1,5 @@ package com.andrewlalis.perfin.control.component; -import com.andrewlalis.perfin.data.DateUtil; import com.andrewlalis.perfin.model.Account; import com.andrewlalis.perfin.model.AccountType; import com.andrewlalis.perfin.model.Profile; @@ -10,7 +9,6 @@ import javafx.scene.input.MouseEvent; import javafx.scene.layout.*; import javafx.scene.paint.Color; -import java.time.format.DateTimeFormatter; import java.util.Map; import static com.andrewlalis.perfin.PerfinApp.router; @@ -77,9 +75,7 @@ public class AccountTile extends BorderPane { accountBalanceLabel.setDisable(false); }); - this.addEventHandler(MouseEvent.MOUSE_CLICKED, event -> { - router.navigate("account", account); - }); + this.addEventHandler(MouseEvent.MOUSE_CLICKED, event -> router.navigate("account", account)); } private static Label newPropertyLabel(String text) { diff --git a/src/main/java/com/andrewlalis/perfin/data/DataSource.java b/src/main/java/com/andrewlalis/perfin/data/DataSource.java index 99f5414..0447835 100644 --- a/src/main/java/com/andrewlalis/perfin/data/DataSource.java +++ b/src/main/java/com/andrewlalis/perfin/data/DataSource.java @@ -5,8 +5,6 @@ import com.andrewlalis.perfin.model.Account; import javafx.application.Platform; import java.math.BigDecimal; -import java.math.MathContext; -import java.math.RoundingMode; import java.util.Currency; import java.util.HashMap; import java.util.List; diff --git a/src/main/java/com/andrewlalis/perfin/data/TransactionRepository.java b/src/main/java/com/andrewlalis/perfin/data/TransactionRepository.java index 8a6f171..efc9fca 100644 --- a/src/main/java/com/andrewlalis/perfin/data/TransactionRepository.java +++ b/src/main/java/com/andrewlalis/perfin/data/TransactionRepository.java @@ -6,7 +6,6 @@ import com.andrewlalis.perfin.model.Account; import com.andrewlalis.perfin.model.AccountEntry; import com.andrewlalis.perfin.model.Transaction; -import java.util.List; import java.util.Map; import java.util.Set; diff --git a/src/main/java/com/andrewlalis/perfin/data/impl/JdbcAccountRepository.java b/src/main/java/com/andrewlalis/perfin/data/impl/JdbcAccountRepository.java index 4cb9c9b..0d20381 100644 --- a/src/main/java/com/andrewlalis/perfin/data/impl/JdbcAccountRepository.java +++ b/src/main/java/com/andrewlalis/perfin/data/impl/JdbcAccountRepository.java @@ -14,7 +14,6 @@ import java.math.BigDecimal; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; -import java.sql.Timestamp; import java.time.Instant; import java.time.LocalDateTime; import java.util.*; diff --git a/src/main/resources/main-view.fxml b/src/main/resources/main-view.fxml index bf017b2..933d1c9 100644 --- a/src/main/resources/main-view.fxml +++ b/src/main/resources/main-view.fxml @@ -11,7 +11,7 @@ > - +