Search in sources :

Example 11 with TextField

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();
}
Also used : BorderPane(javafx.scene.layout.BorderPane) AutoCompletionTextFieldBinding(impl.org.controlsfx.autocompletion.AutoCompletionTextFieldBinding) TextField(javafx.scene.control.TextField) Collection(java.util.Collection) ISuggestionRequest(org.controlsfx.control.textfield.AutoCompletionBinding.ISuggestionRequest) Scene(javafx.scene.Scene)

Example 12 with TextField

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();
}
Also used : InputTextField(io.bitsquare.gui.components.InputTextField) TextField(javafx.scene.control.TextField)

Example 13 with TextField

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());
    }
}
Also used : Label(javafx.scene.control.Label) InputTextField(io.bitsquare.gui.components.InputTextField) TextField(javafx.scene.control.TextField)

Example 14 with TextField

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());
    }
}
Also used : Label(javafx.scene.control.Label) InputTextField(io.bitsquare.gui.components.InputTextField) TextField(javafx.scene.control.TextField)

Example 15 with TextField

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);
}
Also used : InputTextField(io.bitsquare.gui.components.InputTextField) TextField(javafx.scene.control.TextField)

Aggregations

TextField (javafx.scene.control.TextField)218 Label (javafx.scene.control.Label)98 Button (javafx.scene.control.Button)68 Insets (javafx.geometry.Insets)62 HBox (javafx.scene.layout.HBox)45 GridPane (javafx.scene.layout.GridPane)44 Scene (javafx.scene.Scene)42 VBox (javafx.scene.layout.VBox)34 InputTextField (bisq.desktop.components.InputTextField)32 Node (javafx.scene.Node)30 Stage (javafx.stage.Stage)27 List (java.util.List)26 ButtonType (javafx.scene.control.ButtonType)23 CheckBox (javafx.scene.control.CheckBox)23 Tooltip (javafx.scene.control.Tooltip)23 StackPane (javafx.scene.layout.StackPane)22 ArrayList (java.util.ArrayList)21 Dialog (javafx.scene.control.Dialog)21 BorderPane (javafx.scene.layout.BorderPane)19 ImageView (javafx.scene.image.ImageView)18