Refactor: Rename addAllowedPeriod to addLimitations

This commit is contained in:
Manfred Karrer 2017-10-16 17:01:00 -05:00
parent 654270ec94
commit f6c0d02bc3
No known key found for this signature in database
GPG key ID: 401250966A6B2C46
15 changed files with 31 additions and 31 deletions

View file

@ -68,7 +68,7 @@ public class AliPayForm extends PaymentMethodForm {
final TradeCurrency singleTradeCurrency = aliPayAccount.getSingleTradeCurrency();
final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
addAllowedPeriod();
addLimitations();
addAccountNameTextFieldWithAutoFillCheckBox();
}
@ -92,7 +92,7 @@ public class AliPayForm extends PaymentMethodForm {
final TradeCurrency singleTradeCurrency = aliPayAccount.getSingleTradeCurrency();
final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
addAllowedPeriod();
addLimitations();
}
@Override

View file

@ -246,7 +246,7 @@ abstract class BankForm extends PaymentMethodForm {
addLabelTextField(gridPane, ++gridRow, BankUtil.getAccountTypeLabel(countryCode),
bankAccountPayload.getAccountType()).second.setMouseTransparent(false);
addAllowedPeriod();
addLimitations();
}
@Override
@ -492,7 +492,7 @@ abstract class BankForm extends PaymentMethodForm {
}
});
addAllowedPeriod();
addLimitations();
addAccountNameTextFieldWithAutoFillCheckBox();
updateFromInputs();

View file

@ -269,7 +269,7 @@ public class CashDepositForm extends PaymentMethodForm {
textArea.setText(requirements);
}
addAllowedPeriod();
addLimitations();
}
@Override
@ -516,7 +516,7 @@ public class CashDepositForm extends PaymentMethodForm {
updateFromInputs();
});
addAllowedPeriod();
addLimitations();
addAccountNameTextFieldWithAutoFillCheckBox();
updateFromInputs();

View file

@ -79,7 +79,7 @@ public class ChaseQuickPayForm extends PaymentMethodForm {
TradeCurrency singleTradeCurrency = chaseQuickPayAccount.getSingleTradeCurrency();
String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
addAllowedPeriod();
addLimitations();
addAccountNameTextFieldWithAutoFillCheckBox();
}
@ -108,7 +108,7 @@ public class ChaseQuickPayForm extends PaymentMethodForm {
TradeCurrency singleTradeCurrency = chaseQuickPayAccount.getSingleTradeCurrency();
String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
addAllowedPeriod();
addLimitations();
}
@Override

View file

@ -75,7 +75,7 @@ public class ClearXchangeForm extends PaymentMethodForm {
final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"),
nameAndCode);
addAllowedPeriod();
addLimitations();
addAccountNameTextFieldWithAutoFillCheckBox();
}
@ -105,7 +105,7 @@ public class ClearXchangeForm extends PaymentMethodForm {
final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"),
nameAndCode);
addAllowedPeriod();
addLimitations();
}
@Override

View file

@ -86,7 +86,7 @@ public class CryptoCurrencyForm extends PaymentMethodForm {
updateFromInputs();
});
addAllowedPeriod();
addLimitations();
addAccountNameTextFieldWithAutoFillCheckBox();
}
@ -126,7 +126,7 @@ public class CryptoCurrencyForm extends PaymentMethodForm {
final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
addLabelTextField(gridPane, ++gridRow, Res.get("payment.altcoin"),
nameAndCode);
addAllowedPeriod();
addLimitations();
}
@Override

View file

@ -85,7 +85,7 @@ public class FasterPaymentsForm extends PaymentMethodForm {
String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"),
nameAndCode);
addAllowedPeriod();
addLimitations();
addAccountNameTextFieldWithAutoFillCheckBox();
}
@ -114,7 +114,7 @@ public class FasterPaymentsForm extends PaymentMethodForm {
TradeCurrency singleTradeCurrency = fasterPaymentsAccount.getSingleTradeCurrency();
String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
addAllowedPeriod();
addLimitations();
}
@Override

View file

@ -97,7 +97,7 @@ public class InteracETransferForm extends PaymentMethodForm {
String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"),
nameAndCode);
addAllowedPeriod();
addLimitations();
addAccountNameTextFieldWithAutoFillCheckBox();
}
@ -130,7 +130,7 @@ public class InteracETransferForm extends PaymentMethodForm {
String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"),
nameAndCode);
addAllowedPeriod();
addLimitations();
}
@Override

View file

@ -75,7 +75,7 @@ public class OKPayForm extends PaymentMethodForm {
});
addCurrenciesGrid(true);
addAllowedPeriod();
addLimitations();
addAccountNameTextFieldWithAutoFillCheckBox();
}
@ -136,7 +136,7 @@ public class OKPayForm extends PaymentMethodForm {
TextField field = addLabelTextField(gridPane, ++gridRow, Res.get("payment.wallet"),
okPayAccount.getAccountNr()).second;
field.setMouseTransparent(false);
addAllowedPeriod();
addLimitations();
addCurrenciesGrid(false);
}

View file

@ -104,7 +104,7 @@ public abstract class PaymentMethodForm {
});
}
public static void addAllowedPeriod(GridPane gridPane, int gridRow,
public static void addLimitations(GridPane gridPane, int gridRow,
@Nullable PaymentAccountPayload paymentAccountPayload,
String dateFromBlocks) {
if (paymentAccountPayload != null) {
@ -126,7 +126,7 @@ public abstract class PaymentMethodForm {
return time;
}
protected void addAllowedPeriod() {
protected void addLimitations() {
long hours = paymentAccount.getPaymentMethod().getMaxTradePeriod() / 3600_000;
final TradeCurrency tradeCurrency;

View file

@ -72,7 +72,7 @@ public class PerfectMoneyForm extends PaymentMethodForm {
currencyComboBox.setItems(FXCollections.observableArrayList(new FiatCurrency("USD"), new FiatCurrency("EUR")));
currencyComboBox.getSelectionModel().select(0);
addAllowedPeriod();
addLimitations();
addAccountNameTextFieldWithAutoFillCheckBox();
}
@ -98,7 +98,7 @@ public class PerfectMoneyForm extends PaymentMethodForm {
final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
addAllowedPeriod();
addLimitations();
}
@Override

View file

@ -158,7 +158,7 @@ public class SepaForm extends PaymentMethodForm {
addEuroCountriesGrid(true);
addNonEuroCountriesGrid(true);
addAllowedPeriod();
addLimitations();
addAccountNameTextFieldWithAutoFillCheckBox();
countryComboBox.setItems(FXCollections.observableArrayList(CountryUtil.getAllSepaCountries()));
@ -350,6 +350,6 @@ public class SepaForm extends PaymentMethodForm {
acceptedCountries.setMouseTransparent(false);
acceptedCountries.setTooltip(tooltip);
}
addAllowedPeriod();
addLimitations();
}
}

View file

@ -83,7 +83,7 @@ public class SwishForm extends PaymentMethodForm {
TradeCurrency singleTradeCurrency = swishAccount.getSingleTradeCurrency();
String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
addAllowedPeriod();
addLimitations();
addAccountNameTextFieldWithAutoFillCheckBox();
}
@ -112,7 +112,7 @@ public class SwishForm extends PaymentMethodForm {
TradeCurrency singleTradeCurrency = swishAccount.getSingleTradeCurrency();
String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
addAllowedPeriod();
addLimitations();
}
@Override

View file

@ -89,7 +89,7 @@ public class USPostalMoneyOrderForm extends PaymentMethodForm {
String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"),
nameAndCode);
addAllowedPeriod();
addLimitations();
addAccountNameTextFieldWithAutoFillCheckBox();
}
@ -119,7 +119,7 @@ public class USPostalMoneyOrderForm extends PaymentMethodForm {
TradeCurrency singleTradeCurrency = usPostalMoneyOrderAccount.getSingleTradeCurrency();
String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode);
addAllowedPeriod();
addLimitations();
}
@Override

View file

@ -175,7 +175,7 @@ public abstract class TradeStepView extends AnchorPane {
else
txIdTextField.cleanup();
PaymentMethodForm.addAllowedPeriod(gridPane, ++gridRow, model.dataModel.getSellersPaymentAccountPayload(),
PaymentMethodForm.addLimitations(gridPane, ++gridRow, model.dataModel.getSellersPaymentAccountPayload(),
model.getDateForOpenDispute());
timeLeftTextField = addLabelTextField(gridPane, ++gridRow, Res.getWithCol("portfolio.pending.remainingTime")).second;