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 c97e3daa..daf1931a 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 @@ -5,10 +5,10 @@ import javafx.beans.property.SimpleStringProperty import javafx.geometry.Insets import javafx.geometry.Pos import net.dankito.banking.ui.presenter.BankingPresenter -import net.dankito.utils.javafx.ui.controls.UpdateButton +import net.dankito.utils.javafx.ui.controls.ProcessingIndicatorButton import net.dankito.utils.javafx.ui.controls.addButton +import net.dankito.utils.javafx.ui.controls.processingIndicatorButton import net.dankito.utils.javafx.ui.controls.searchtextfield -import net.dankito.utils.javafx.ui.controls.updateButton import net.dankito.utils.javafx.ui.extensions.fixedHeight import tornadofx.* @@ -71,9 +71,7 @@ open class AccountTransactionsControlView( } } - updateButton { - fixedHeight = PanelHeight - + processingIndicatorButton(fixedHeight = PanelHeight) { enableWhen(supportsRetrievingAccountTransactions) action { updateAccountTransactions(this) } @@ -129,10 +127,10 @@ open class AccountTransactionsControlView( supportsRetrievingAccountTransactions.value = presenter.doSelectedBankAccountsSupportRetrievingAccountTransactions } - protected open fun updateAccountTransactions(updateButton: UpdateButton) { + protected open fun updateAccountTransactions(processingIndicatorButton: ProcessingIndicatorButton) { presenter.updateAccountsTransactionsAsync { transactions -> runLater { - updateButton.resetIsUpdating() + processingIndicatorButton.resetIsProcessing() } } } 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 c72e2942..d743498a 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 @@ -14,7 +14,7 @@ import javafx.scene.text.FontWeight import net.dankito.banking.ui.model.responses.AddAccountResponse 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.controls.ProcessingIndicatorButton import net.dankito.utils.javafx.ui.dialogs.Window import net.dankito.utils.javafx.ui.extensions.ensureOnlyUsesSpaceIfVisible import net.dankito.utils.javafx.ui.extensions.fixedHeight @@ -54,7 +54,7 @@ open class AddAccountDialog(protected val presenter: BankingPresenter) : Window( protected val isEnteredCredentialsResultVisible = SimpleBooleanProperty(false) - protected val checkCredentialsButton = UpdateButton(messages["check"]) + protected val checkCredentialsButton = ProcessingIndicatorButton(messages["check"], ButtonHeight) init { @@ -166,7 +166,6 @@ open class AddAccountDialog(protected val presenter: BankingPresenter) : Window( } add(checkCredentialsButton.apply { - fixedHeight = ButtonHeight prefWidth = ButtonWidth isDefaultButton = true @@ -215,7 +214,7 @@ open class AddAccountDialog(protected val presenter: BankingPresenter) : Window( } protected open fun handleAddAccountResultOnUiThread(response: AddAccountResponse) { - checkCredentialsButton.resetIsUpdating() + checkCredentialsButton.resetIsProcessing() if (response.isSuccessful) { handleSuccessfullyAddedAccountResultOnUiThread(response)