Search in sources :

Example 46 with TradeCurrency

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

the class ClearXchangeForm method addFormForDisplayAccount.

@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    FormBuilder.addLabelTextField(gridPane, gridRow, Res.get("payment.account.name"), clearXchangeAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"), Res.get(clearXchangeAccount.getPaymentMethod().getId()));
    FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("payment.account.owner"), clearXchangeAccount.getHolderName());
    TextField field = FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.get("payment.email.mobile"), clearXchangeAccount.getEmailOrMobileNr()).second;
    field.setMouseTransparent(false);
    final TradeCurrency singleTradeCurrency = clearXchangeAccount.getSingleTradeCurrency();
    final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
    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 47 with TradeCurrency

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

the class CryptoCurrencyForm method updateAllInputsValid.

@Override
public void updateAllInputsValid() {
    TradeCurrency selectedTradeCurrency = cryptoCurrencyAccount.getSelectedTradeCurrency();
    if (selectedTradeCurrency != null) {
        altCoinAddressValidator.setCurrencyCode(selectedTradeCurrency.getCode());
        allInputsValid.set(isAccountNameValid() && altCoinAddressValidator.validate(cryptoCurrencyAccount.getAddress()).isValid && cryptoCurrencyAccount.getSingleTradeCurrency() != null);
    }
}
Also used : TradeCurrency(bisq.core.locale.TradeCurrency)

Example 48 with TradeCurrency

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

the class FasterPaymentsForm method addFormForAddAccount.

@Override
public void addFormForAddAccount() {
    gridRowFrom = gridRow + 1;
    // do not translate as it is used in english only
    sortCodeInputTextField = addLabelInputTextField(gridPane, ++gridRow, "UK sort code:").second;
    sortCodeInputTextField.setValidator(inputValidator);
    sortCodeInputTextField.setValidator(new BranchIdValidator("GB"));
    sortCodeInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
        fasterPaymentsAccount.setSortCode(newValue);
        updateFromInputs();
    });
    accountNrInputTextField = addLabelInputTextField(gridPane, ++gridRow, Res.get("payment.accountNr")).second;
    accountNrInputTextField.setValidator(new AccountNrValidator("GB"));
    accountNrInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
        fasterPaymentsAccount.setAccountNr(newValue);
        updateFromInputs();
    });
    TradeCurrency singleTradeCurrency = fasterPaymentsAccount.getSingleTradeCurrency();
    String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
    addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
    addLimitations();
    addAccountNameTextFieldWithAutoFillCheckBox();
}
Also used : TradeCurrency(bisq.core.locale.TradeCurrency) BranchIdValidator(bisq.desktop.util.validation.BranchIdValidator) AccountNrValidator(bisq.desktop.util.validation.AccountNrValidator)

Example 49 with TradeCurrency

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

the class InteracETransferForm 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) -> {
        interacETransferAccount.setHolderName(newValue);
        updateFromInputs();
    });
    mobileNrInputTextField = FormBuilder.addLabelInputTextField(gridPane, ++gridRow, Res.get("payment.emailOrMobile")).second;
    mobileNrInputTextField.setValidator(interacETransferValidator);
    mobileNrInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
        interacETransferAccount.setEmail(newValue);
        updateFromInputs();
    });
    InputTextField questionInputTextField = FormBuilder.addLabelInputTextField(gridPane, ++gridRow, Res.get("payment.secret")).second;
    questionInputTextField.setValidator(inputValidator);
    questionInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
        interacETransferAccount.setQuestion(newValue);
        updateFromInputs();
    });
    InputTextField answerInputTextField = FormBuilder.addLabelInputTextField(gridPane, ++gridRow, Res.get("payment.answer")).second;
    answerInputTextField.setValidator(inputValidator);
    answerInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
        interacETransferAccount.setAnswer(newValue);
        updateFromInputs();
    });
    TradeCurrency singleTradeCurrency = interacETransferAccount.getSingleTradeCurrency();
    String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
    FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
    addLimitations();
    addAccountNameTextFieldWithAutoFillCheckBox();
}
Also used : TradeCurrency(bisq.core.locale.TradeCurrency) InputTextField(bisq.desktop.components.InputTextField)

Example 50 with TradeCurrency

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

the class MoneyBeamForm method addFormForAddAccount.

@Override
public void addFormForAddAccount() {
    gridRowFrom = gridRow + 1;
    accountIdInputTextField = addLabelInputTextField(gridPane, ++gridRow, Res.get("payment.moneyBeam.accountId")).second;
    accountIdInputTextField.setValidator(validator);
    accountIdInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
        account.setAccountId(newValue);
        updateFromInputs();
    });
    final TradeCurrency singleTradeCurrency = account.getSingleTradeCurrency();
    final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
    addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
    addLimitations();
    addAccountNameTextFieldWithAutoFillCheckBox();
}
Also used : TradeCurrency(bisq.core.locale.TradeCurrency)

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