Search in sources :

Example 11 with TradeCurrency

use of bisq.core.locale.TradeCurrency in project bisq-desktop by bisq-network.

the class BankForm method addFormForDisplayAccount.

@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    String countryCode = bankAccountPayload.getCountryCode();
    addLabelTextField(gridPane, gridRow, Res.get("payment.account.name"), paymentAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(paymentAccount.getPaymentMethod().getId()));
    addLabelTextField(gridPane, ++gridRow, Res.get("payment.country"), getCountryBasedPaymentAccount().getCountry() != null ? getCountryBasedPaymentAccount().getCountry().name : "");
    TradeCurrency singleTradeCurrency = paymentAccount.getSingleTradeCurrency();
    String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
    addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
    addAcceptedBanksForDisplayAccount();
    addHolderNameAndIdForDisplayAccount();
    if (BankUtil.isBankNameRequired(countryCode))
        addLabelTextField(gridPane, ++gridRow, Res.get("payment.bank.name"), bankAccountPayload.getBankName()).second.setMouseTransparent(false);
    if (BankUtil.isBankIdRequired(countryCode))
        addLabelTextField(gridPane, ++gridRow, BankUtil.getBankIdLabel(countryCode), bankAccountPayload.getBankId()).second.setMouseTransparent(false);
    if (BankUtil.isBranchIdRequired(countryCode))
        addLabelTextField(gridPane, ++gridRow, BankUtil.getBranchIdLabel(countryCode), bankAccountPayload.getBranchId()).second.setMouseTransparent(false);
    if (BankUtil.isAccountNrRequired(countryCode))
        addLabelTextField(gridPane, ++gridRow, BankUtil.getAccountNrLabel(countryCode), bankAccountPayload.getAccountNr()).second.setMouseTransparent(false);
    if (BankUtil.isAccountTypeRequired(countryCode))
        addLabelTextField(gridPane, ++gridRow, BankUtil.getAccountTypeLabel(countryCode), bankAccountPayload.getAccountType()).second.setMouseTransparent(false);
    addLimitations();
}
Also used : TradeCurrency(bisq.core.locale.TradeCurrency)

Example 12 with TradeCurrency

use of bisq.core.locale.TradeCurrency in project bisq-desktop by bisq-network.

the class CashAppForm method addFormForDisplayAccount.

@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addLabelTextField(gridPane, gridRow, Res.get("payment.account.name"), account.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(account.getPaymentMethod().getId()));
    TextField field = addLabelTextField(gridPane, ++gridRow, Res.get("payment.cashApp.cashTag"), account.getCashTag()).second;
    field.setMouseTransparent(false);
    final TradeCurrency singleTradeCurrency = account.getSingleTradeCurrency();
    final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
    addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
    addLimitations();
}
Also used : TradeCurrency(bisq.core.locale.TradeCurrency) TextField(javafx.scene.control.TextField) FormBuilder.addLabelInputTextField(bisq.desktop.util.FormBuilder.addLabelInputTextField) FormBuilder.addLabelTextField(bisq.desktop.util.FormBuilder.addLabelTextField) InputTextField(bisq.desktop.components.InputTextField)

Example 13 with TradeCurrency

use of bisq.core.locale.TradeCurrency in project bisq-desktop by bisq-network.

the class CashDepositForm method addFormForDisplayAccount.

@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    String countryCode = cashDepositAccountPayload.getCountryCode();
    FormBuilder.addLabelTextField(gridPane, gridRow, Res.get("payment.account.name"), paymentAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(paymentAccount.getPaymentMethod().getId()));
    FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.get("payment.country"), getCountryBasedPaymentAccount().getCountry() != null ? getCountryBasedPaymentAccount().getCountry().name : "");
    TradeCurrency singleTradeCurrency = paymentAccount.getSingleTradeCurrency();
    String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
    FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
    addAcceptedBanksForDisplayAccount();
    addHolderNameAndIdForDisplayAccount();
    FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.get("payment.email"), cashDepositAccountPayload.getHolderEmail());
    if (BankUtil.isBankNameRequired(countryCode))
        FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.get("payment.bank.name"), cashDepositAccountPayload.getBankName()).second.setMouseTransparent(false);
    if (BankUtil.isBankIdRequired(countryCode))
        FormBuilder.addLabelTextField(gridPane, ++gridRow, BankUtil.getBankIdLabel(countryCode), cashDepositAccountPayload.getBankId()).second.setMouseTransparent(false);
    if (BankUtil.isBranchIdRequired(countryCode))
        FormBuilder.addLabelTextField(gridPane, ++gridRow, BankUtil.getBranchIdLabel(countryCode), cashDepositAccountPayload.getBranchId()).second.setMouseTransparent(false);
    if (BankUtil.isAccountNrRequired(countryCode))
        FormBuilder.addLabelTextField(gridPane, ++gridRow, BankUtil.getAccountNrLabel(countryCode), cashDepositAccountPayload.getAccountNr()).second.setMouseTransparent(false);
    if (BankUtil.isAccountTypeRequired(countryCode))
        FormBuilder.addLabelTextField(gridPane, ++gridRow, BankUtil.getAccountTypeLabel(countryCode), cashDepositAccountPayload.getAccountType()).second.setMouseTransparent(false);
    String requirements = cashDepositAccountPayload.getRequirements();
    boolean showRequirements = requirements != null && !requirements.isEmpty();
    if (showRequirements) {
        TextArea textArea = FormBuilder.addLabelTextArea(gridPane, ++gridRow, Res.get("payment.extras"), "").second;
        textArea.setMinHeight(30);
        textArea.setMaxHeight(30);
        textArea.setEditable(false);
        textArea.setId("text-area-disabled");
        textArea.setText(requirements);
    }
    addLimitations();
}
Also used : TradeCurrency(bisq.core.locale.TradeCurrency) TextArea(javafx.scene.control.TextArea)

Example 14 with TradeCurrency

use of bisq.core.locale.TradeCurrency in project bisq-desktop by bisq-network.

the class ChaseQuickPayForm method addFormForDisplayAccount.

@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    FormBuilder.addLabelTextField(gridPane, gridRow, Res.get("payment.account.name"), chaseQuickPayAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(chaseQuickPayAccount.getPaymentMethod().getId()));
    FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("payment.account.owner"), chaseQuickPayAccount.getHolderName());
    TextField field = FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.get("payment.email"), chaseQuickPayAccount.getEmail()).second;
    field.setMouseTransparent(false);
    TradeCurrency singleTradeCurrency = chaseQuickPayAccount.getSingleTradeCurrency();
    String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
    FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
    addLimitations();
}
Also used : TradeCurrency(bisq.core.locale.TradeCurrency) TextField(javafx.scene.control.TextField) InputTextField(bisq.desktop.components.InputTextField)

Example 15 with TradeCurrency

use of bisq.core.locale.TradeCurrency in project bisq-desktop by bisq-network.

the class ClearXchangeForm method addFormForAddAccount.

@Override
public void addFormForAddAccount() {
    gridRowFrom = gridRow + 1;
    InputTextField holderNameInputTextField = FormBuilder.addLabelInputTextField(gridPane, ++gridRow, Res.getWithCol("payment.account.owner")).second;
    holderNameInputTextField.setValidator(inputValidator);
    holderNameInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
        clearXchangeAccount.setHolderName(newValue);
        updateFromInputs();
    });
    mobileNrInputTextField = FormBuilder.addLabelInputTextField(gridPane, ++gridRow, Res.get("payment.email.mobile")).second;
    mobileNrInputTextField.setValidator(clearXchangeValidator);
    mobileNrInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
        clearXchangeAccount.setEmailOrMobileNr(newValue);
        updateFromInputs();
    });
    final TradeCurrency singleTradeCurrency = clearXchangeAccount.getSingleTradeCurrency();
    final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
    FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
    addLimitations();
    addAccountNameTextFieldWithAutoFillCheckBox();
}
Also used : TradeCurrency(bisq.core.locale.TradeCurrency) InputTextField(bisq.desktop.components.InputTextField)

Aggregations

TradeCurrency (bisq.core.locale.TradeCurrency)57 InputTextField (bisq.desktop.components.InputTextField)26 TextField (javafx.scene.control.TextField)16 FormBuilder.addLabelInputTextField (bisq.desktop.util.FormBuilder.addLabelInputTextField)13 FiatCurrency (bisq.core.locale.FiatCurrency)11 Country (bisq.core.locale.Country)10 FormBuilder.addLabelTextField (bisq.desktop.util.FormBuilder.addLabelTextField)9 CryptoCurrency (bisq.core.locale.CryptoCurrency)8 PaymentAccount (bisq.core.payment.PaymentAccount)7 ComboBox (javafx.scene.control.ComboBox)6 Label (javafx.scene.control.Label)6 CryptoCurrencyAccount (bisq.core.payment.CryptoCurrencyAccount)5 Popup (bisq.desktop.main.overlays.popups.Popup)5 List (java.util.List)5 Tuple2 (bisq.common.util.Tuple2)4 CurrencyUtil (bisq.core.locale.CurrencyUtil)4 OpenOfferManager (bisq.core.offer.OpenOfferManager)4 AccountAgeWitnessService (bisq.core.payment.AccountAgeWitnessService)4 TradeManager (bisq.core.trade.TradeManager)4 User (bisq.core.user.User)4