use of javafx.scene.control.TextField in project Gargoyle by callakrsos.
the class AutoCompletionTextBindingExam method start.
/* (non-Javadoc)
* @see javafx.application.Application#start(javafx.stage.Stage)
*/
@Override
public void start(Stage primaryStage) throws Exception {
TextField textField = new TextField();
List<String> asList = Arrays.asList("sssss", "aaaaa");
AutoCompletionTextFieldBinding<String> autoCompletionTextFieldBinding = new AutoCompletionTextFieldBinding<>(textField, new Callback<ISuggestionRequest, Collection<String>>() {
@Override
public Collection<String> call(ISuggestionRequest param) {
String userText = param.getUserText();
return asList.stream().filter(v -> v.startsWith(userText)).collect(Collectors.toList());
}
});
autoCompletionTextFieldBinding.setVisibleRowCount(10);
primaryStage.setScene(new Scene(new BorderPane(textField)));
primaryStage.show();
}
use of javafx.scene.control.TextField in project bitsquare by bitsquare.
the class AliPayForm method addFormForDisplayAccount.
@Override
public void addFormForDisplayAccount() {
gridRowFrom = gridRow;
addLabelTextField(gridPane, gridRow, "Account name:", aliPayAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
addLabelTextField(gridPane, ++gridRow, "Payment method:", BSResources.get(aliPayAccount.getPaymentMethod().getId()));
TextField field = addLabelTextField(gridPane, ++gridRow, "Account no.:", aliPayAccount.getAccountNr()).second;
field.setMouseTransparent(false);
addLabelTextField(gridPane, ++gridRow, "Currency:", aliPayAccount.getSingleTradeCurrency().getNameAndCode());
addAllowedPeriod();
}
use of javafx.scene.control.TextField in project bitsquare by bitsquare.
the class BankForm method addHolderNameAndIdForDisplayAccount.
protected void addHolderNameAndIdForDisplayAccount() {
String countryCode = bankAccountContractData.getCountryCode();
if (BankUtil.isHolderIdRequired(countryCode)) {
Tuple4<Label, TextField, Label, TextField> tuple = addLabelTextFieldLabelTextField(gridPane, ++gridRow, "Account holder name:", BankUtil.getHolderIdLabel(countryCode));
TextField holderNameTextField = tuple.second;
holderNameTextField.setText(bankAccountContractData.getHolderName());
holderNameTextField.setMinWidth(300);
tuple.forth.setText(bankAccountContractData.getHolderTaxId());
} else {
addLabelTextField(gridPane, ++gridRow, "Account holder name:", bankAccountContractData.getHolderName());
}
}
use of javafx.scene.control.TextField in project bitsquare by bitsquare.
the class CashDepositForm method addHolderNameAndIdForDisplayAccount.
protected void addHolderNameAndIdForDisplayAccount() {
String countryCode = cashDepositAccountContractData.getCountryCode();
if (BankUtil.isHolderIdRequired(countryCode)) {
Tuple4<Label, TextField, Label, TextField> tuple = addLabelTextFieldLabelTextField(gridPane, ++gridRow, "Account holder name:", BankUtil.getHolderIdLabel(countryCode));
TextField holderNameTextField = tuple.second;
holderNameTextField.setText(cashDepositAccountContractData.getHolderName());
holderNameTextField.setMinWidth(300);
tuple.forth.setText(cashDepositAccountContractData.getHolderTaxId());
} else {
addLabelTextField(gridPane, ++gridRow, "Account holder name:", cashDepositAccountContractData.getHolderName());
}
}
use of javafx.scene.control.TextField in project bitsquare by bitsquare.
the class OKPayForm method addFormForDisplayAccount.
@Override
public void addFormForDisplayAccount() {
gridRowFrom = gridRow;
addLabelTextField(gridPane, gridRow, "Account name:", okPayAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
addLabelTextField(gridPane, ++gridRow, "Payment method:", BSResources.get(okPayAccount.getPaymentMethod().getId()));
TextField field = addLabelTextField(gridPane, ++gridRow, "Wallet ID:", okPayAccount.getAccountNr()).second;
field.setMouseTransparent(false);
addAllowedPeriod();
addCurrenciesGrid(false);
}
Aggregations