mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-20 04:44:30 -04: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
|
@Inject
|
||||||
public FiatAccountViewModel(FiatAccountDataModel model, BankAccountNumberValidator bankAccountNumberValidator) {
|
public FiatAccountViewModel(FiatAccountDataModel delegate, BankAccountNumberValidator bankAccountNumberValidator) {
|
||||||
super(model);
|
super(delegate);
|
||||||
this.bankAccountNumberValidator = bankAccountNumberValidator;
|
this.bankAccountNumberValidator = bankAccountNumberValidator;
|
||||||
|
|
||||||
// input
|
// input
|
||||||
title.bindBidirectional(model.title);
|
title.bindBidirectional(delegate.title);
|
||||||
holderName.bindBidirectional(model.holderName);
|
holderName.bindBidirectional(delegate.holderName);
|
||||||
primaryID.bindBidirectional(model.primaryID);
|
primaryID.bindBidirectional(delegate.primaryID);
|
||||||
secondaryID.bindBidirectional(model.secondaryID);
|
secondaryID.bindBidirectional(delegate.secondaryID);
|
||||||
type.bindBidirectional(model.type);
|
type.bindBidirectional(delegate.type);
|
||||||
country.bindBidirectional(model.country);
|
country.bindBidirectional(delegate.country);
|
||||||
currency.bindBidirectional(model.currency);
|
currency.bindBidirectional(delegate.currency);
|
||||||
|
|
||||||
primaryIDPrompt.bind(model.primaryIDPrompt);
|
primaryIDPrompt.bind(delegate.primaryIDPrompt);
|
||||||
secondaryIDPrompt.bind(model.secondaryIDPrompt);
|
secondaryIDPrompt.bind(delegate.secondaryIDPrompt);
|
||||||
|
|
||||||
selectionPrompt.set("No bank account available");
|
selectionPrompt.set("No bank account available");
|
||||||
selectionDisable.set(true);
|
selectionDisable.set(true);
|
||||||
|
|
||||||
model.title.addListener((ov, oldValue, newValue) -> validateInput());
|
delegate.title.addListener((ov, oldValue, newValue) -> validateInput());
|
||||||
holderName.addListener((ov, oldValue, newValue) -> validateInput());
|
holderName.addListener((ov, oldValue, newValue) -> validateInput());
|
||||||
primaryID.addListener((ov, oldValue, newValue) -> validateInput());
|
primaryID.addListener((ov, oldValue, newValue) -> validateInput());
|
||||||
secondaryID.addListener((ov, oldValue, newValue) -> validateInput());
|
secondaryID.addListener((ov, oldValue, newValue) -> validateInput());
|
||||||
|
|
|
@ -49,16 +49,16 @@ class IrcAccountViewModel extends ActivatableWithDelegate<IrcAccountDataModel> i
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public IrcAccountViewModel(IrcAccountDataModel model, BankAccountNumberValidator nickNameValidator) {
|
public IrcAccountViewModel(IrcAccountDataModel delegate, BankAccountNumberValidator nickNameValidator) {
|
||||||
super(model);
|
super(delegate);
|
||||||
this.nickNameValidator = nickNameValidator;
|
this.nickNameValidator = nickNameValidator;
|
||||||
|
|
||||||
// input
|
// input
|
||||||
ircNickName.bindBidirectional(model.nickName);
|
ircNickName.bindBidirectional(delegate.nickName);
|
||||||
type.bindBidirectional(model.type);
|
type.bindBidirectional(delegate.type);
|
||||||
currency.bindBidirectional(model.currency);
|
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
|
@Inject
|
||||||
public RestrictionsViewModel(RestrictionsDataModel model) {
|
public RestrictionsViewModel(RestrictionsDataModel delegate) {
|
||||||
super(model);
|
super(delegate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@ class ClosedTradesViewModel extends ActivatableWithDelegate<ClosedTradesDataMode
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public ClosedTradesViewModel(ClosedTradesDataModel model, BSFormatter formatter) {
|
public ClosedTradesViewModel(ClosedTradesDataModel delegate, BSFormatter formatter) {
|
||||||
super(model);
|
super(delegate);
|
||||||
|
|
||||||
this.formatter = formatter;
|
this.formatter = formatter;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,8 +31,8 @@ class OffersViewModel extends ActivatableWithDelegate<OffersDataModel> implement
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public OffersViewModel(OffersDataModel model, BSFormatter formatter) {
|
public OffersViewModel(OffersDataModel delegate, BSFormatter formatter) {
|
||||||
super(model);
|
super(delegate);
|
||||||
|
|
||||||
this.formatter = formatter;
|
this.formatter = formatter;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,8 @@ import javafx.collections.ObservableList;
|
||||||
class PreferencesViewModel extends ActivatableWithDelegate<PreferencesDataModel> implements ViewModel {
|
class PreferencesViewModel extends ActivatableWithDelegate<PreferencesDataModel> implements ViewModel {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public PreferencesViewModel(PreferencesDataModel model) {
|
public PreferencesViewModel(PreferencesDataModel delegate) {
|
||||||
super(model);
|
super(delegate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObservableList<String> getBtcDenominationItems() {
|
public ObservableList<String> getBtcDenominationItems() {
|
||||||
|
|
|
@ -93,19 +93,19 @@ class CreateOfferViewModel extends ActivatableWithDelegate<CreateOfferDataModel>
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public CreateOfferViewModel(CreateOfferDataModel model, FiatValidator fiatValidator, BtcValidator btcValidator,
|
public CreateOfferViewModel(CreateOfferDataModel delegate, FiatValidator fiatValidator, BtcValidator btcValidator,
|
||||||
BSFormatter formatter) {
|
BSFormatter formatter) {
|
||||||
super(model);
|
super(delegate);
|
||||||
|
|
||||||
this.fiatValidator = fiatValidator;
|
this.fiatValidator = fiatValidator;
|
||||||
this.btcValidator = btcValidator;
|
this.btcValidator = btcValidator;
|
||||||
this.formatter = formatter;
|
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) {
|
if (delegate.getAddressEntry() != null) {
|
||||||
addressAsString.set(model.getAddressEntry().getAddress().toString());
|
addressAsString.set(delegate.getAddressEntry().getAddress().toString());
|
||||||
address.set(model.getAddressEntry().getAddress());
|
address.set(delegate.getAddressEntry().getAddress());
|
||||||
}
|
}
|
||||||
|
|
||||||
setupBindings();
|
setupBindings();
|
||||||
|
|
|
@ -87,14 +87,14 @@ class TakeOfferViewModel extends ActivatableWithDelegate<TakeOfferDataModel> imp
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public TakeOfferViewModel(TakeOfferDataModel model, BtcValidator btcValidator, BSFormatter formatter) {
|
public TakeOfferViewModel(TakeOfferDataModel delegate, BtcValidator btcValidator, BSFormatter formatter) {
|
||||||
super(model);
|
super(delegate);
|
||||||
|
|
||||||
this.btcValidator = btcValidator;
|
this.btcValidator = btcValidator;
|
||||||
this.formatter = formatter;
|
this.formatter = formatter;
|
||||||
|
|
||||||
this.offerFee = formatter.formatCoinWithCode(model.offerFeeAsCoin.get());
|
this.offerFee = formatter.formatCoinWithCode(delegate.offerFeeAsCoin.get());
|
||||||
this.networkFee = formatter.formatCoinWithCode(model.networkFeeAsCoin.get());
|
this.networkFee = formatter.formatCoinWithCode(delegate.networkFeeAsCoin.get());
|
||||||
|
|
||||||
setupBindings();
|
setupBindings();
|
||||||
setupListeners();
|
setupListeners();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue