From f1494d485af9b258619c4cebf0929750dd536067 Mon Sep 17 00:00:00 2001 From: dankl Date: Sun, 26 Jan 2020 13:03:32 +0100 Subject: [PATCH] Renamed MainWindowPresenter to BankingPresenter --- .../banking/ui/javafx/dialogs/mainwindow/MainWindow.kt | 4 ++-- .../ui/javafx/dialogs/mainwindow/controls/MainMenuBar.kt | 4 ++-- .../kotlin/net/dankito/banking/ui/javafx/RouterJavaFx.kt | 8 ++++---- .../ui/javafx/controls/AccountTransactionsControlView.kt | 4 ++-- .../ui/javafx/controls/AccountTransactionsTable.kt | 5 ++--- .../banking/ui/javafx/controls/AccountTransactionsView.kt | 4 ++-- .../dankito/banking/ui/javafx/controls/AccountsView.kt | 4 ++-- .../dankito/banking/ui/javafx/dialogs/AddAccountDialog.kt | 6 +++--- .../ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt | 4 ++-- .../banking/ui/javafx/dialogs/tan/EnterTanDialog.kt | 4 ++-- .../src/main/java/net/dankito/banking/ui/IRouter.kt | 8 ++++---- .../{MainWindowPresenter.kt => BankingPresenter.kt} | 6 +++--- .../dankito/banking/fints4java/android/MainActivity.kt | 6 +++--- .../dankito/banking/fints4java/android/RouterAndroid.kt | 8 ++++---- .../fints4java/android/ui/adapter/BankListAdapter.kt | 4 ++-- .../android/ui/adapter/filter/BankInfoFilter.kt | 4 ++-- .../fints4java/android/ui/dialogs/AddAccountDialog.kt | 6 +++--- .../fints4java/android/ui/dialogs/EnterTanDialog.kt | 6 +++--- .../fints4java/android/ui/dialogs/TransferMoneyDialog.kt | 8 ++++---- .../banking/fints4java/android/ui/home/HomeFragment.kt | 4 ++-- .../ui/views/MainActivityFloatingActionMenuButton.kt | 4 ++-- 21 files changed, 55 insertions(+), 56 deletions(-) rename BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/{MainWindowPresenter.kt => BankingPresenter.kt} (99%) diff --git a/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/MainWindow.kt b/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/MainWindow.kt index f44170a9..b92adcb4 100755 --- a/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/MainWindow.kt +++ b/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/MainWindow.kt @@ -7,7 +7,7 @@ import net.dankito.banking.ui.javafx.RouterJavaFx import net.dankito.banking.ui.javafx.controls.AccountTransactionsView import net.dankito.banking.ui.javafx.controls.AccountsView import net.dankito.banking.ui.javafx.dialogs.mainwindow.controls.MainMenuBar -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import tornadofx.* import tornadofx.FX.Companion.messages import java.io.File @@ -18,7 +18,7 @@ class MainWindow : View(messages["application.title"]) { private val dataFolder = File("data", "accounts") // private val presenter = MainWindowPresenter(fints4javaBankingClientCreator(OkHttpWebClient(), Base64ServiceJava8()), dataFolder, BankingPersistenceJson(File(dataFolder, "accounts.json")), RouterJavaFx()) - private val presenter = MainWindowPresenter(hbci4jBankingClientCreator(), dataFolder, BankingPersistenceJson(File(dataFolder, "accounts.json")), RouterJavaFx()) + private val presenter = BankingPresenter(hbci4jBankingClientCreator(), dataFolder, BankingPersistenceJson(File(dataFolder, "accounts.json")), RouterJavaFx()) diff --git a/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/controls/MainMenuBar.kt b/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/controls/MainMenuBar.kt index b596e8e1..ddbcd4a7 100644 --- a/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/controls/MainMenuBar.kt +++ b/BankingJavaFxApp/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/mainwindow/controls/MainMenuBar.kt @@ -4,12 +4,12 @@ import javafx.beans.property.SimpleBooleanProperty import javafx.scene.input.KeyCode import javafx.scene.input.KeyCodeCombination import javafx.scene.input.KeyCombination -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import net.dankito.utils.javafx.ui.extensions.fixedHeight import tornadofx.* -open class MainMenuBar(protected val presenter: MainWindowPresenter) : View() { +open class MainMenuBar(protected val presenter: BankingPresenter) : View() { protected val areAccountsThatCanTransferMoneyAdded = SimpleBooleanProperty() diff --git a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/RouterJavaFx.kt b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/RouterJavaFx.kt index ab3f050a..147fb8a1 100644 --- a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/RouterJavaFx.kt +++ b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/RouterJavaFx.kt @@ -11,7 +11,7 @@ import net.dankito.banking.ui.model.tan.EnterTanGeneratorAtcResult import net.dankito.banking.ui.model.tan.EnterTanResult import net.dankito.banking.ui.model.tan.TanChallenge import net.dankito.banking.ui.model.tan.TanGeneratorTanMedium -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import tornadofx.FX import tornadofx.FX.Companion.messages import tornadofx.get @@ -21,11 +21,11 @@ import java.util.concurrent.atomic.AtomicReference open class RouterJavaFx : IRouter { - override fun showAddAccountDialog(presenter: MainWindowPresenter) { + override fun showAddAccountDialog(presenter: BankingPresenter) { AddAccountDialog(presenter).show(messages["add.account.dialog.title"]) } - override fun getTanFromUserFromNonUiThread(account: Account, tanChallenge: TanChallenge, presenter: MainWindowPresenter): EnterTanResult { + override fun getTanFromUserFromNonUiThread(account: Account, tanChallenge: TanChallenge, presenter: BankingPresenter): EnterTanResult { val enteredTan = AtomicReference(null) val tanEnteredLatch = CountDownLatch(1) @@ -45,7 +45,7 @@ open class RouterJavaFx : IRouter { return EnterTanGeneratorAtcResult.userDidNotEnterTan() } - override fun showTransferMoneyDialog(presenter: MainWindowPresenter, preselectedBankAccount: BankAccount?, preselectedValues: TransferMoneyData?) { + override fun showTransferMoneyDialog(presenter: BankingPresenter, preselectedBankAccount: BankAccount?, preselectedValues: TransferMoneyData?) { TransferMoneyDialog(presenter, preselectedBankAccount, preselectedValues).show(messages["transfer.money.dialog.title"]) } diff --git a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsControlView.kt b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsControlView.kt index fd9682cc..e459b258 100644 --- a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsControlView.kt +++ b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsControlView.kt @@ -4,7 +4,7 @@ import javafx.beans.property.SimpleBooleanProperty import javafx.beans.property.SimpleStringProperty import javafx.geometry.Insets import javafx.geometry.Pos -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import net.dankito.utils.javafx.ui.controls.UpdateButton import net.dankito.utils.javafx.ui.controls.addButton import net.dankito.utils.javafx.ui.controls.searchtextfield @@ -14,7 +14,7 @@ import tornadofx.* open class AccountTransactionsControlView( - protected val presenter: MainWindowPresenter, + protected val presenter: BankingPresenter, protected val transactionsFilter: SimpleStringProperty, protected val balance: SimpleStringProperty ) : View() { diff --git a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsTable.kt b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsTable.kt index e79221ef..5a9bdea0 100644 --- a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsTable.kt +++ b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsTable.kt @@ -6,14 +6,13 @@ import javafx.collections.ObservableList import javafx.geometry.Insets import javafx.geometry.Pos import javafx.scene.control.ContentDisplay -import javafx.scene.control.ContextMenu import javafx.scene.control.TableColumn import javafx.scene.control.TableView import javafx.scene.layout.Priority import javafx.scene.paint.Color import javafx.util.Callback import net.dankito.banking.ui.model.AccountTransaction -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import net.dankito.utils.javafx.ui.extensions.ensureOnlyUsesSpaceIfVisible import tornadofx.* import tornadofx.FX.Companion.messages @@ -21,7 +20,7 @@ import java.text.DateFormat open class AccountTransactionsTable @JvmOverloads constructor( - protected val presenter: MainWindowPresenter, + protected val presenter: BankingPresenter, transactions: ObservableList = FXCollections.emptyObservableList() ) : TableView(transactions) { diff --git a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsView.kt b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsView.kt index 8a2c2fc2..6908f895 100644 --- a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsView.kt +++ b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsView.kt @@ -11,11 +11,11 @@ import net.dankito.banking.ui.model.AccountTransaction import net.dankito.banking.ui.model.BankAccount import net.dankito.banking.ui.model.parameters.TransferMoneyData import net.dankito.banking.ui.model.responses.GetTransactionsResponse -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import tornadofx.* -open class AccountTransactionsView(private val presenter: MainWindowPresenter) : View() { +open class AccountTransactionsView(private val presenter: BankingPresenter) : View() { protected val isAccountSelected = SimpleBooleanProperty(false) diff --git a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountsView.kt b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountsView.kt index b95e143f..fecb176f 100644 --- a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountsView.kt +++ b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountsView.kt @@ -8,14 +8,14 @@ import javafx.scene.layout.Priority import net.dankito.banking.ui.javafx.model.AccountsAccountTreeItem import net.dankito.banking.ui.javafx.model.AccountsBankAccountTreeItem import net.dankito.banking.ui.javafx.model.AccountsRootTreeItem -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import net.dankito.utils.javafx.ui.controls.addButton import net.dankito.utils.javafx.ui.extensions.fixedHeight import net.dankito.utils.javafx.ui.extensions.fixedWidth import tornadofx.* -open class AccountsView(protected val presenter: MainWindowPresenter) : View() { +open class AccountsView(protected val presenter: BankingPresenter) : View() { protected val accounts = FXCollections.observableArrayList(presenter.accounts) diff --git a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/AddAccountDialog.kt b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/AddAccountDialog.kt index 0616daf6..c72e2942 100755 --- a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/AddAccountDialog.kt +++ b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/AddAccountDialog.kt @@ -12,7 +12,7 @@ import javafx.scene.paint.Color import javafx.scene.text.Font import javafx.scene.text.FontWeight import net.dankito.banking.ui.model.responses.AddAccountResponse -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import net.dankito.fints.model.BankInfo import net.dankito.utils.javafx.ui.controls.UpdateButton import net.dankito.utils.javafx.ui.dialogs.Window @@ -22,7 +22,7 @@ import net.dankito.utils.javafx.ui.extensions.setBackgroundToColor import tornadofx.* -open class AddAccountDialog(protected val presenter: MainWindowPresenter) : Window() { +open class AddAccountDialog(protected val presenter: BankingPresenter) : Window() { companion object { private val LabelMargins = Insets(6.0, 4.0, 6.0, 4.0) @@ -237,7 +237,7 @@ open class AddAccountDialog(protected val presenter: MainWindowPresenter) : Wind val userSelection = dialogService.showDialog(Alert.AlertType.CONFIRMATION, message, null, currentStage, ButtonType.YES, ButtonType.NO) when (userSelection) { - ButtonType.YES -> { presenter.getAccountTransactionsAsync(response.account) { } } + ButtonType.YES -> presenter.getAccountTransactionsAsync(response.account) { } else -> { } // nothing to do then, simply close dialog } diff --git a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt index 1380421a..5b65efac 100644 --- a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt +++ b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt @@ -11,7 +11,7 @@ import net.dankito.banking.ui.javafx.dialogs.JavaFxDialogService import net.dankito.banking.ui.model.BankAccount import net.dankito.banking.ui.model.parameters.TransferMoneyData import net.dankito.banking.ui.model.responses.BankingClientResponse -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import net.dankito.fints.messages.segmente.implementierte.sepa.ISepaMessageCreator import net.dankito.fints.messages.segmente.implementierte.sepa.SepaMessageCreator import net.dankito.fints.model.BankInfo @@ -23,7 +23,7 @@ import tornadofx.* open class TransferMoneyDialog @JvmOverloads constructor( - protected val presenter: MainWindowPresenter, + protected val presenter: BankingPresenter, preselectedBankAccount: BankAccount? = null, preselectedValues: TransferMoneyData? = null ) : Window() { diff --git a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/tan/EnterTanDialog.kt b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/tan/EnterTanDialog.kt index d9d68059..40edd3e3 100644 --- a/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/tan/EnterTanDialog.kt +++ b/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/tan/EnterTanDialog.kt @@ -10,7 +10,7 @@ import net.dankito.banking.ui.javafx.dialogs.tan.controls.TanImageView import net.dankito.banking.ui.model.Account import net.dankito.banking.ui.model.responses.BankingClientResponse import net.dankito.banking.ui.model.tan.* -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import net.dankito.utils.javafx.ui.dialogs.Window import tornadofx.* @@ -18,7 +18,7 @@ import tornadofx.* open class EnterTanDialog( protected val account: Account, protected val challenge: TanChallenge, - protected val presenter: MainWindowPresenter, + protected val presenter: BankingPresenter, protected val tanEnteredCallback: (EnterTanResult) -> Unit ) : Window() { diff --git a/BankingUiCommon/src/main/java/net/dankito/banking/ui/IRouter.kt b/BankingUiCommon/src/main/java/net/dankito/banking/ui/IRouter.kt index c3dd6c57..38b125fc 100644 --- a/BankingUiCommon/src/main/java/net/dankito/banking/ui/IRouter.kt +++ b/BankingUiCommon/src/main/java/net/dankito/banking/ui/IRouter.kt @@ -7,17 +7,17 @@ import net.dankito.banking.ui.model.tan.EnterTanGeneratorAtcResult import net.dankito.banking.ui.model.tan.EnterTanResult import net.dankito.banking.ui.model.tan.TanChallenge import net.dankito.banking.ui.model.tan.TanGeneratorTanMedium -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter interface IRouter { - fun showAddAccountDialog(presenter: MainWindowPresenter) + fun showAddAccountDialog(presenter: BankingPresenter) - fun getTanFromUserFromNonUiThread(account: Account, tanChallenge: TanChallenge, presenter: MainWindowPresenter): EnterTanResult + fun getTanFromUserFromNonUiThread(account: Account, tanChallenge: TanChallenge, presenter: BankingPresenter): EnterTanResult fun getAtcFromUserFromNonUiThread(tanMedium: TanGeneratorTanMedium): EnterTanGeneratorAtcResult - fun showTransferMoneyDialog(presenter: MainWindowPresenter, preselectedBankAccount: BankAccount?, preselectedValues: TransferMoneyData?) + fun showTransferMoneyDialog(presenter: BankingPresenter, preselectedBankAccount: BankAccount?, preselectedValues: TransferMoneyData?) } \ No newline at end of file diff --git a/BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/MainWindowPresenter.kt b/BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/BankingPresenter.kt similarity index 99% rename from BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/MainWindowPresenter.kt rename to BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/BankingPresenter.kt index 3e84917b..44de1399 100644 --- a/BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/MainWindowPresenter.kt +++ b/BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/BankingPresenter.kt @@ -28,7 +28,7 @@ import java.util.* import kotlin.collections.ArrayList -open class MainWindowPresenter( +open class BankingPresenter( protected val bankingClientCreator: IBankingClientCreator, protected val dataFolder: File, protected val persister: IBankingPersistence, @@ -39,7 +39,7 @@ open class MainWindowPresenter( companion object { protected const val OneDayMillis = 24 * 60 * 60 * 1000 - private val log = LoggerFactory.getLogger(MainWindowPresenter::class.java) + private val log = LoggerFactory.getLogger(BankingPresenter::class.java) } @@ -68,7 +68,7 @@ open class MainWindowPresenter( saveAccountOnNextEnterTanInvocation = false } - val result = router.getTanFromUserFromNonUiThread(account, tanChallenge, this@MainWindowPresenter) + val result = router.getTanFromUserFromNonUiThread(account, tanChallenge, this@BankingPresenter) if (result.changeTanProcedureTo != null || result.changeTanMediumTo != null) { // then either selected TAN medium or procedure will change -> save account on next call to enterTan() as then changes will be visible saveAccountOnNextEnterTanInvocation = true diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/MainActivity.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/MainActivity.kt index 11fc2588..f718902c 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/MainActivity.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/MainActivity.kt @@ -20,7 +20,7 @@ import net.dankito.banking.fints4java.android.util.Base64ServiceAndroid import net.dankito.banking.fints4javaBankingClientCreator import net.dankito.banking.persistence.BankingPersistenceJson import net.dankito.banking.ui.model.Account -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import net.dankito.utils.web.client.OkHttpWebClient import org.slf4j.LoggerFactory import java.io.File @@ -40,7 +40,7 @@ class MainActivity : AppCompatActivity() { private lateinit var floatingActionMenuButton: MainActivityFloatingActionMenuButton - lateinit var presenter: MainWindowPresenter + lateinit var presenter: BankingPresenter override fun onCreate(savedInstanceState: Bundle?) { @@ -48,7 +48,7 @@ class MainActivity : AppCompatActivity() { val dataFolder = File(this.filesDir, "data/accounts") - presenter = MainWindowPresenter(fints4javaBankingClientCreator(OkHttpWebClient(), Base64ServiceAndroid()), dataFolder, + presenter = BankingPresenter(fints4javaBankingClientCreator(OkHttpWebClient(), Base64ServiceAndroid()), dataFolder, BankingPersistenceJson(File(dataFolder, "accounts.json")), RouterAndroid(this)) initUi() diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/RouterAndroid.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/RouterAndroid.kt index 66d29dc7..4d478724 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/RouterAndroid.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/RouterAndroid.kt @@ -13,18 +13,18 @@ import net.dankito.banking.ui.model.tan.EnterTanGeneratorAtcResult import net.dankito.banking.ui.model.tan.EnterTanResult import net.dankito.banking.ui.model.tan.TanChallenge import net.dankito.banking.ui.model.tan.TanGeneratorTanMedium -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import java.util.concurrent.CountDownLatch import java.util.concurrent.atomic.AtomicReference open class RouterAndroid(protected val activity: AppCompatActivity) : IRouter { - override fun showAddAccountDialog(presenter: MainWindowPresenter) { + override fun showAddAccountDialog(presenter: BankingPresenter) { AddAccountDialog().show(activity, presenter) } - override fun getTanFromUserFromNonUiThread(account: Account, tanChallenge: TanChallenge, presenter: MainWindowPresenter): EnterTanResult { + override fun getTanFromUserFromNonUiThread(account: Account, tanChallenge: TanChallenge, presenter: BankingPresenter): EnterTanResult { val enteredTan = AtomicReference(null) val tanEnteredLatch = CountDownLatch(1) @@ -56,7 +56,7 @@ open class RouterAndroid(protected val activity: AppCompatActivity) : IRouter { return result.get() } - override fun showTransferMoneyDialog(presenter: MainWindowPresenter, preselectedBankAccount: BankAccount?, preselectedValues: TransferMoneyData?) { + override fun showTransferMoneyDialog(presenter: BankingPresenter, preselectedBankAccount: BankAccount?, preselectedValues: TransferMoneyData?) { TransferMoneyDialog().show(activity, presenter, preselectedBankAccount, preselectedValues) } diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/BankListAdapter.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/BankListAdapter.kt index 795cc170..72c3541e 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/BankListAdapter.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/BankListAdapter.kt @@ -8,14 +8,14 @@ import android.widget.Filter import android.widget.Filterable import kotlinx.android.synthetic.main.list_item_bank_info.view.* import net.dankito.banking.fints4java.android.R -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import net.dankito.banking.fints4java.android.ui.adapter.filter.BankInfoFilter import net.dankito.fints.model.BankInfo import net.dankito.utils.android.extensions.setTintColor import net.dankito.utils.android.ui.adapter.ListAdapter -open class BankListAdapter(protected val presenter: MainWindowPresenter) : ListAdapter(), Filterable { +open class BankListAdapter(protected val presenter: BankingPresenter) : ListAdapter(), Filterable { override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View? { diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/filter/BankInfoFilter.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/filter/BankInfoFilter.kt index 67fe874d..b4493285 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/filter/BankInfoFilter.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/adapter/filter/BankInfoFilter.kt @@ -1,11 +1,11 @@ package net.dankito.banking.fints4java.android.ui.adapter.filter import android.widget.Filter -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import net.dankito.fints.model.BankInfo -open class BankInfoFilter(protected val presenter: MainWindowPresenter, +open class BankInfoFilter(protected val presenter: BankingPresenter, protected val publishResultsCallback: (List) -> Unit) : Filter() { diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/AddAccountDialog.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/AddAccountDialog.kt index 8437ab61..45a508b0 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/AddAccountDialog.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/AddAccountDialog.kt @@ -17,7 +17,7 @@ import kotlinx.android.synthetic.main.dialog_add_account.view.* import net.dankito.banking.fints4java.android.R import net.dankito.banking.fints4java.android.ui.adapter.BankListAdapter import net.dankito.banking.ui.model.responses.AddAccountResponse -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import net.dankito.fints.model.BankInfo import net.dankito.utils.android.extensions.asActivity @@ -29,14 +29,14 @@ open class AddAccountDialog : DialogFragment() { } - protected lateinit var presenter: MainWindowPresenter + protected lateinit var presenter: BankingPresenter protected lateinit var adapter: BankListAdapter protected var selectedBank: BankInfo? = null - fun show(activity: AppCompatActivity, presenter: MainWindowPresenter, fullscreen: Boolean = false) { + fun show(activity: AppCompatActivity, presenter: BankingPresenter, fullscreen: Boolean = false) { this.presenter = presenter presenter.preloadBanksAsync() diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/EnterTanDialog.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/EnterTanDialog.kt index f08de959..0b6f7b9a 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/EnterTanDialog.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/EnterTanDialog.kt @@ -21,7 +21,7 @@ import net.dankito.banking.fints4java.android.ui.listener.ListItemSelectedListen import net.dankito.banking.ui.model.Account import net.dankito.banking.ui.model.responses.BankingClientResponse import net.dankito.banking.ui.model.tan.* -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter open class EnterTanDialog : DialogFragment() { @@ -37,14 +37,14 @@ open class EnterTanDialog : DialogFragment() { protected lateinit var tanChallenge: TanChallenge - protected lateinit var presenter: MainWindowPresenter + protected lateinit var presenter: BankingPresenter protected lateinit var tanEnteredCallback: (EnterTanResult) -> Unit protected val tanMediumAdapter = TanMediumAdapter() - open fun show(account: Account, tanChallenge: TanChallenge, presenter: MainWindowPresenter, activity: AppCompatActivity, + open fun show(account: Account, tanChallenge: TanChallenge, presenter: BankingPresenter, activity: AppCompatActivity, fullscreen: Boolean = false, tanEnteredCallback: (EnterTanResult) -> Unit) { this.account = account diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt index 8203b902..7a986885 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt @@ -17,7 +17,7 @@ import net.dankito.banking.fints4java.android.ui.listener.ListItemSelectedListen import net.dankito.banking.ui.model.BankAccount import net.dankito.banking.ui.model.parameters.TransferMoneyData import net.dankito.banking.ui.model.responses.BankingClientResponse -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import net.dankito.fints.messages.segmente.implementierte.sepa.ISepaMessageCreator import net.dankito.fints.messages.segmente.implementierte.sepa.SepaMessageCreator import net.dankito.fints.model.BankInfo @@ -32,7 +32,7 @@ open class TransferMoneyDialog : DialogFragment() { } - protected lateinit var presenter: MainWindowPresenter + protected lateinit var presenter: BankingPresenter protected var preselectedBankAccount: BankAccount? = null @@ -43,11 +43,11 @@ open class TransferMoneyDialog : DialogFragment() { protected val sepaMessageCreator: ISepaMessageCreator = SepaMessageCreator() - open fun show(activity: AppCompatActivity, presenter: MainWindowPresenter, preselectedBankAccount: BankAccount?, fullscreen: Boolean = false) { + open fun show(activity: AppCompatActivity, presenter: BankingPresenter, preselectedBankAccount: BankAccount?, fullscreen: Boolean = false) { show(activity, presenter, preselectedBankAccount, null, fullscreen) } - open fun show(activity: AppCompatActivity, presenter: MainWindowPresenter, preselectedBankAccount: BankAccount?, preselectedValues: TransferMoneyData?, fullscreen: Boolean = false) { + open fun show(activity: AppCompatActivity, presenter: BankingPresenter, preselectedBankAccount: BankAccount?, preselectedValues: TransferMoneyData?, fullscreen: Boolean = false) { this.presenter = presenter this.preselectedBankAccount = preselectedBankAccount this.preselectedValues = preselectedValues diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/home/HomeFragment.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/home/HomeFragment.kt index 2aa41f95..a2a7ff65 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/home/HomeFragment.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/home/HomeFragment.kt @@ -18,7 +18,7 @@ import net.dankito.banking.fints4java.android.ui.adapter.AccountTransactionAdapt import net.dankito.banking.ui.model.AccountTransaction import net.dankito.banking.ui.model.parameters.TransferMoneyData import net.dankito.banking.ui.model.responses.GetTransactionsResponse -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter import net.dankito.utils.android.extensions.asActivity @@ -38,7 +38,7 @@ class HomeFragment : Fragment() { protected var appliedTransactionsFilter = "" - private lateinit var presenter: MainWindowPresenter + private lateinit var presenter: BankingPresenter override fun onCreate(savedInstanceState: Bundle?) { diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/MainActivityFloatingActionMenuButton.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/MainActivityFloatingActionMenuButton.kt index 67c2f6c7..d0581acb 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/MainActivityFloatingActionMenuButton.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/MainActivityFloatingActionMenuButton.kt @@ -4,10 +4,10 @@ import android.support.v7.app.AppCompatActivity import com.github.clans.fab.FloatingActionButton import com.github.clans.fab.FloatingActionMenu import kotlinx.android.synthetic.main.view_floating_action_button_main.view.* -import net.dankito.banking.ui.presenter.MainWindowPresenter +import net.dankito.banking.ui.presenter.BankingPresenter -open class MainActivityFloatingActionMenuButton(floatingActionMenu: FloatingActionMenu, protected val presenter: MainWindowPresenter) +open class MainActivityFloatingActionMenuButton(floatingActionMenu: FloatingActionMenu, protected val presenter: BankingPresenter) : FloatingActionMenuButton(floatingActionMenu) { protected lateinit var fabTransferMoney: FloatingActionButton