Implemented that UpdateButton has been renamed to ProcessingIndicatorButton
This commit is contained in:
parent
eafebd6a10
commit
393e892ff8
|
@ -5,10 +5,10 @@ import javafx.beans.property.SimpleStringProperty
|
||||||
import javafx.geometry.Insets
|
import javafx.geometry.Insets
|
||||||
import javafx.geometry.Pos
|
import javafx.geometry.Pos
|
||||||
import net.dankito.banking.ui.presenter.BankingPresenter
|
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.addButton
|
||||||
|
import net.dankito.utils.javafx.ui.controls.processingIndicatorButton
|
||||||
import net.dankito.utils.javafx.ui.controls.searchtextfield
|
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 net.dankito.utils.javafx.ui.extensions.fixedHeight
|
||||||
import tornadofx.*
|
import tornadofx.*
|
||||||
|
|
||||||
|
@ -71,9 +71,7 @@ open class AccountTransactionsControlView(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateButton {
|
processingIndicatorButton(fixedHeight = PanelHeight) {
|
||||||
fixedHeight = PanelHeight
|
|
||||||
|
|
||||||
enableWhen(supportsRetrievingAccountTransactions)
|
enableWhen(supportsRetrievingAccountTransactions)
|
||||||
|
|
||||||
action { updateAccountTransactions(this) }
|
action { updateAccountTransactions(this) }
|
||||||
|
@ -129,10 +127,10 @@ open class AccountTransactionsControlView(
|
||||||
supportsRetrievingAccountTransactions.value = presenter.doSelectedBankAccountsSupportRetrievingAccountTransactions
|
supportsRetrievingAccountTransactions.value = presenter.doSelectedBankAccountsSupportRetrievingAccountTransactions
|
||||||
}
|
}
|
||||||
|
|
||||||
protected open fun updateAccountTransactions(updateButton: UpdateButton) {
|
protected open fun updateAccountTransactions(processingIndicatorButton: ProcessingIndicatorButton) {
|
||||||
presenter.updateAccountsTransactionsAsync { transactions ->
|
presenter.updateAccountsTransactionsAsync { transactions ->
|
||||||
runLater {
|
runLater {
|
||||||
updateButton.resetIsUpdating()
|
processingIndicatorButton.resetIsProcessing()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ import javafx.scene.text.FontWeight
|
||||||
import net.dankito.banking.ui.model.responses.AddAccountResponse
|
import net.dankito.banking.ui.model.responses.AddAccountResponse
|
||||||
import net.dankito.banking.ui.presenter.BankingPresenter
|
import net.dankito.banking.ui.presenter.BankingPresenter
|
||||||
import net.dankito.fints.model.BankInfo
|
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.dialogs.Window
|
||||||
import net.dankito.utils.javafx.ui.extensions.ensureOnlyUsesSpaceIfVisible
|
import net.dankito.utils.javafx.ui.extensions.ensureOnlyUsesSpaceIfVisible
|
||||||
import net.dankito.utils.javafx.ui.extensions.fixedHeight
|
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 isEnteredCredentialsResultVisible = SimpleBooleanProperty(false)
|
||||||
|
|
||||||
|
|
||||||
protected val checkCredentialsButton = UpdateButton(messages["check"])
|
protected val checkCredentialsButton = ProcessingIndicatorButton(messages["check"], ButtonHeight)
|
||||||
|
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
@ -166,7 +166,6 @@ open class AddAccountDialog(protected val presenter: BankingPresenter) : Window(
|
||||||
}
|
}
|
||||||
|
|
||||||
add(checkCredentialsButton.apply {
|
add(checkCredentialsButton.apply {
|
||||||
fixedHeight = ButtonHeight
|
|
||||||
prefWidth = ButtonWidth
|
prefWidth = ButtonWidth
|
||||||
|
|
||||||
isDefaultButton = true
|
isDefaultButton = true
|
||||||
|
@ -215,7 +214,7 @@ open class AddAccountDialog(protected val presenter: BankingPresenter) : Window(
|
||||||
}
|
}
|
||||||
|
|
||||||
protected open fun handleAddAccountResultOnUiThread(response: AddAccountResponse) {
|
protected open fun handleAddAccountResultOnUiThread(response: AddAccountResponse) {
|
||||||
checkCredentialsButton.resetIsUpdating()
|
checkCredentialsButton.resetIsProcessing()
|
||||||
|
|
||||||
if (response.isSuccessful) {
|
if (response.isSuccessful) {
|
||||||
handleSuccessfullyAddedAccountResultOnUiThread(response)
|
handleSuccessfullyAddedAccountResultOnUiThread(response)
|
||||||
|
|
Loading…
Reference in New Issue