Renamed txtfldBankCode to txtfldBank

This commit is contained in:
dankito 2020-06-25 00:26:47 +02:00
parent 187bf80967
commit f9f9ad8c06
1 changed files with 7 additions and 7 deletions

View File

@ -12,11 +12,11 @@ import javafx.scene.paint.Color
import javafx.scene.text.Font import javafx.scene.text.Font
import javafx.scene.text.FontWeight import javafx.scene.text.FontWeight
import kotlinx.coroutines.* import kotlinx.coroutines.*
import net.dankito.banking.ui.model.responses.AddAccountResponse
import net.dankito.banking.ui.presenter.BankingPresenter
import net.dankito.banking.bankfinder.BankInfo import net.dankito.banking.bankfinder.BankInfo
import net.dankito.banking.ui.javafx.dialogs.addaccount.BankInfoListCellFragment import net.dankito.banking.ui.javafx.dialogs.addaccount.BankInfoListCellFragment
import net.dankito.banking.ui.javafx.extensions.focusNextControl import net.dankito.banking.ui.javafx.extensions.focusNextControl
import net.dankito.banking.ui.model.responses.AddAccountResponse
import net.dankito.banking.ui.presenter.BankingPresenter
import net.dankito.utils.javafx.ui.controls.AutoCompletionSearchTextField import net.dankito.utils.javafx.ui.controls.AutoCompletionSearchTextField
import net.dankito.utils.javafx.ui.controls.ProcessingIndicatorButton import net.dankito.utils.javafx.ui.controls.ProcessingIndicatorButton
import net.dankito.utils.javafx.ui.controls.autocompletionsearchtextfield import net.dankito.utils.javafx.ui.controls.autocompletionsearchtextfield
@ -45,7 +45,7 @@ open class AddAccountDialog(protected val presenter: BankingPresenter) : Window(
protected val bankName = SimpleStringProperty("") protected val bankName = SimpleStringProperty("")
protected var txtfldBankCode: AutoCompletionSearchTextField<BankInfo> by singleAssign() protected var txtfldBank: AutoCompletionSearchTextField<BankInfo> by singleAssign()
protected var selectedBank: BankInfo? = null protected var selectedBank: BankInfo? = null
@ -84,7 +84,7 @@ open class AddAccountDialog(protected val presenter: BankingPresenter) : Window(
} }
} }
txtfldBankCode = autocompletionsearchtextfield(bankName) { txtfldBank = autocompletionsearchtextfield(bankName) {
prefHeight = TextFieldHeight prefHeight = TextFieldHeight
onAutoCompletion = { bankSelected(it) } onAutoCompletion = { bankSelected(it) }
@ -200,10 +200,10 @@ open class AddAccountDialog(protected val presenter: BankingPresenter) : Window(
lastSearchBanksJob?.cancel() lastSearchBanksJob?.cancel()
lastSearchBanksJob = GlobalScope.launch(Dispatchers.IO) { lastSearchBanksJob = GlobalScope.launch(Dispatchers.IO) {
val filteredBanks = presenter.searchBanksByNameBankCodeOrCity(query?.toString()) val filteredBanks = presenter.searchBanksByNameBankCodeOrCity(query)
withContext(Dispatchers.Main) { withContext(Dispatchers.Main) {
txtfldBankCode.setAutoCompleteList(filteredBanks) txtfldBank.setAutoCompleteList(filteredBanks)
checkIfRequiredDataHasBeenEntered() checkIfRequiredDataHasBeenEntered()
} }
@ -211,7 +211,7 @@ open class AddAccountDialog(protected val presenter: BankingPresenter) : Window(
} }
protected open fun bankSelected(bank: BankInfo) { protected open fun bankSelected(bank: BankInfo) {
txtfldBankCode.focusNextControl() txtfldBank.focusNextControl()
selectedBank = bank selectedBank = bank