mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-25 07:27:18 +01:00
Use 'delegate' naming consistently
This commit is contained in:
parent
b755b3fad3
commit
16c9539597
8 changed files with 36 additions and 36 deletions
|
@ -60,26 +60,26 @@ class FiatAccountViewModel extends ActivatableWithDelegate<FiatAccountDataModel>
|
|||
|
||||
|
||||
@Inject
|
||||
public FiatAccountViewModel(FiatAccountDataModel model, BankAccountNumberValidator bankAccountNumberValidator) {
|
||||
super(model);
|
||||
public FiatAccountViewModel(FiatAccountDataModel delegate, BankAccountNumberValidator bankAccountNumberValidator) {
|
||||
super(delegate);
|
||||
this.bankAccountNumberValidator = bankAccountNumberValidator;
|
||||
|
||||
// input
|
||||
title.bindBidirectional(model.title);
|
||||
holderName.bindBidirectional(model.holderName);
|
||||
primaryID.bindBidirectional(model.primaryID);
|
||||
secondaryID.bindBidirectional(model.secondaryID);
|
||||
type.bindBidirectional(model.type);
|
||||
country.bindBidirectional(model.country);
|
||||
currency.bindBidirectional(model.currency);
|
||||
title.bindBidirectional(delegate.title);
|
||||
holderName.bindBidirectional(delegate.holderName);
|
||||
primaryID.bindBidirectional(delegate.primaryID);
|
||||
secondaryID.bindBidirectional(delegate.secondaryID);
|
||||
type.bindBidirectional(delegate.type);
|
||||
country.bindBidirectional(delegate.country);
|
||||
currency.bindBidirectional(delegate.currency);
|
||||
|
||||
primaryIDPrompt.bind(model.primaryIDPrompt);
|
||||
secondaryIDPrompt.bind(model.secondaryIDPrompt);
|
||||
primaryIDPrompt.bind(delegate.primaryIDPrompt);
|
||||
secondaryIDPrompt.bind(delegate.secondaryIDPrompt);
|
||||
|
||||
selectionPrompt.set("No bank account available");
|
||||
selectionDisable.set(true);
|
||||
|
||||
model.title.addListener((ov, oldValue, newValue) -> validateInput());
|
||||
delegate.title.addListener((ov, oldValue, newValue) -> validateInput());
|
||||
holderName.addListener((ov, oldValue, newValue) -> validateInput());
|
||||
primaryID.addListener((ov, oldValue, newValue) -> validateInput());
|
||||
secondaryID.addListener((ov, oldValue, newValue) -> validateInput());
|
||||
|
|
|
@ -49,16 +49,16 @@ class IrcAccountViewModel extends ActivatableWithDelegate<IrcAccountDataModel> i
|
|||
|
||||
|
||||
@Inject
|
||||
public IrcAccountViewModel(IrcAccountDataModel model, BankAccountNumberValidator nickNameValidator) {
|
||||
super(model);
|
||||
public IrcAccountViewModel(IrcAccountDataModel delegate, BankAccountNumberValidator nickNameValidator) {
|
||||
super(delegate);
|
||||
this.nickNameValidator = nickNameValidator;
|
||||
|
||||
// input
|
||||
ircNickName.bindBidirectional(model.nickName);
|
||||
type.bindBidirectional(model.type);
|
||||
currency.bindBidirectional(model.currency);
|
||||
ircNickName.bindBidirectional(delegate.nickName);
|
||||
type.bindBidirectional(delegate.type);
|
||||
currency.bindBidirectional(delegate.currency);
|
||||
|
||||
model.nickName.addListener((ov, oldValue, newValue) -> validateInput());
|
||||
delegate.nickName.addListener((ov, oldValue, newValue) -> validateInput());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ class RestrictionsViewModel extends ActivatableWithDelegate<RestrictionsDataMode
|
|||
|
||||
|
||||
@Inject
|
||||
public RestrictionsViewModel(RestrictionsDataModel model) {
|
||||
super(model);
|
||||
public RestrictionsViewModel(RestrictionsDataModel delegate) {
|
||||
super(delegate);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ class ClosedTradesViewModel extends ActivatableWithDelegate<ClosedTradesDataMode
|
|||
|
||||
|
||||
@Inject
|
||||
public ClosedTradesViewModel(ClosedTradesDataModel model, BSFormatter formatter) {
|
||||
super(model);
|
||||
public ClosedTradesViewModel(ClosedTradesDataModel delegate, BSFormatter formatter) {
|
||||
super(delegate);
|
||||
|
||||
this.formatter = formatter;
|
||||
}
|
||||
|
|
|
@ -31,8 +31,8 @@ class OffersViewModel extends ActivatableWithDelegate<OffersDataModel> implement
|
|||
|
||||
|
||||
@Inject
|
||||
public OffersViewModel(OffersDataModel model, BSFormatter formatter) {
|
||||
super(model);
|
||||
public OffersViewModel(OffersDataModel delegate, BSFormatter formatter) {
|
||||
super(delegate);
|
||||
|
||||
this.formatter = formatter;
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ import javafx.collections.ObservableList;
|
|||
class PreferencesViewModel extends ActivatableWithDelegate<PreferencesDataModel> implements ViewModel {
|
||||
|
||||
@Inject
|
||||
public PreferencesViewModel(PreferencesDataModel model) {
|
||||
super(model);
|
||||
public PreferencesViewModel(PreferencesDataModel delegate) {
|
||||
super(delegate);
|
||||
}
|
||||
|
||||
public ObservableList<String> getBtcDenominationItems() {
|
||||
|
|
|
@ -93,19 +93,19 @@ class CreateOfferViewModel extends ActivatableWithDelegate<CreateOfferDataModel>
|
|||
|
||||
|
||||
@Inject
|
||||
public CreateOfferViewModel(CreateOfferDataModel model, FiatValidator fiatValidator, BtcValidator btcValidator,
|
||||
public CreateOfferViewModel(CreateOfferDataModel delegate, FiatValidator fiatValidator, BtcValidator btcValidator,
|
||||
BSFormatter formatter) {
|
||||
super(model);
|
||||
super(delegate);
|
||||
|
||||
this.fiatValidator = fiatValidator;
|
||||
this.btcValidator = btcValidator;
|
||||
this.formatter = formatter;
|
||||
|
||||
paymentLabel.set(BSResources.get("createOffer.fundsBox.paymentLabel", model.getOfferId()));
|
||||
paymentLabel.set(BSResources.get("createOffer.fundsBox.paymentLabel", delegate.getOfferId()));
|
||||
|
||||
if (model.getAddressEntry() != null) {
|
||||
addressAsString.set(model.getAddressEntry().getAddress().toString());
|
||||
address.set(model.getAddressEntry().getAddress());
|
||||
if (delegate.getAddressEntry() != null) {
|
||||
addressAsString.set(delegate.getAddressEntry().getAddress().toString());
|
||||
address.set(delegate.getAddressEntry().getAddress());
|
||||
}
|
||||
|
||||
setupBindings();
|
||||
|
|
|
@ -87,14 +87,14 @@ class TakeOfferViewModel extends ActivatableWithDelegate<TakeOfferDataModel> imp
|
|||
|
||||
|
||||
@Inject
|
||||
public TakeOfferViewModel(TakeOfferDataModel model, BtcValidator btcValidator, BSFormatter formatter) {
|
||||
super(model);
|
||||
public TakeOfferViewModel(TakeOfferDataModel delegate, BtcValidator btcValidator, BSFormatter formatter) {
|
||||
super(delegate);
|
||||
|
||||
this.btcValidator = btcValidator;
|
||||
this.formatter = formatter;
|
||||
|
||||
this.offerFee = formatter.formatCoinWithCode(model.offerFeeAsCoin.get());
|
||||
this.networkFee = formatter.formatCoinWithCode(model.networkFeeAsCoin.get());
|
||||
this.offerFee = formatter.formatCoinWithCode(delegate.offerFeeAsCoin.get());
|
||||
this.networkFee = formatter.formatCoinWithCode(delegate.networkFeeAsCoin.get());
|
||||
|
||||
setupBindings();
|
||||
setupListeners();
|
||||
|
|
Loading…
Add table
Reference in a new issue