Not set focus to disabled field

This commit is contained in:
Christoph Atteneder 2018-04-26 11:09:49 +02:00
parent a8baead3f9
commit 3adf086650
No known key found for this signature in database
GPG Key ID: CD5DC1C529CDFD3B
2 changed files with 11 additions and 3 deletions

View File

@ -137,9 +137,8 @@ public abstract class EditableOfferView<M extends EditableOfferViewModel> extend
private TitledGroupBg payFundsTitledGroupBg, setDepositTitledGroupBg, paymentTitledGroupBg;
private BusyAnimation waitingForFundsBusyAnimation;
private Button nextButton, cancelButton1, cancelButton2, placeOfferButton, priceTypeToggleButton;
private InputTextField buyerSecurityDepositInputTextField, fixedPriceTextField, marketBasedPriceTextField,
volumeTextField;
protected InputTextField amountTextField, minAmountTextField;
private InputTextField buyerSecurityDepositInputTextField, fixedPriceTextField, marketBasedPriceTextField;
protected InputTextField amountTextField, minAmountTextField, volumeTextField;
private TextField currencyTextField;
private AddressTextField addressTextField;
private BalanceTextField balanceTextField;
@ -202,6 +201,10 @@ public abstract class EditableOfferView<M extends EditableOfferViewModel> extend
paymentAccountsComboBox.setConverter(GUIUtil.getPaymentAccountsComboBoxStringConverter());
doSetFocus();
}
protected void doSetFocus() {
GUIUtil.focusWhenAddedToScene(amountTextField);
}

View File

@ -72,6 +72,11 @@ public class EditOpenOfferView extends EditableOfferView<EditOpenOfferViewModel>
addConfirmEditGroup();
}
@Override
protected void doSetFocus() {
// Don't focus in any field before data was set
}
@Override
protected void doActivate() {
super.doActivate();