Java Code Examples for javafx.scene.control.TextField#setMouseTransparent()

The following examples show how to use javafx.scene.control.TextField#setMouseTransparent() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FormBuilder.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
public static Tuple3<Label, TextField, Button> addTopLabelTextFieldButton(GridPane gridPane,
                                                                          int rowIndex,
                                                                          String title,
                                                                          String buttonTitle,
                                                                          double top) {

    TextField textField = new BisqTextField();
    textField.setEditable(false);
    textField.setMouseTransparent(true);
    textField.setFocusTraversable(false);
    Button button = new AutoTooltipButton(buttonTitle);
    button.setDefaultButton(true);

    HBox hBox = new HBox();
    hBox.setSpacing(10);
    hBox.getChildren().addAll(textField, button);
    HBox.setHgrow(textField, Priority.ALWAYS);

    final Tuple2<Label, VBox> labelVBoxTuple2 = addTopLabelWithVBox(gridPane, rowIndex, title, hBox, top);

    return new Tuple3<>(labelVBoxTuple2.first, textField, button);
}
 
Example 2
Source File: FormBuilder.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
public static Tuple4<Label, TextField, Label, TextField> addCompactTopLabelTextFieldTopLabelTextField(GridPane gridPane,
                                                                                                      int rowIndex,
                                                                                                      String title1,
                                                                                                      String title2) {
    TextField textField1 = new BisqTextField();
    textField1.setEditable(false);
    textField1.setMouseTransparent(true);
    textField1.setFocusTraversable(false);

    final Tuple2<Label, VBox> topLabelWithVBox1 = getTopLabelWithVBox(title1, textField1);

    TextField textField2 = new BisqTextField();
    textField2.setEditable(false);
    textField2.setMouseTransparent(true);
    textField2.setFocusTraversable(false);

    final Tuple2<Label, VBox> topLabelWithVBox2 = getTopLabelWithVBox(title2, textField2);

    HBox hBox = new HBox();
    hBox.setSpacing(10);
    hBox.getChildren().addAll(topLabelWithVBox1.second, topLabelWithVBox2.second);
    GridPane.setRowIndex(hBox, rowIndex);
    gridPane.getChildren().add(hBox);

    return new Tuple4<>(topLabelWithVBox1.first, textField1, topLabelWithVBox2.first, textField2);
}
 
Example 3
Source File: FormBuilder.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
public static <T> Tuple3<Label, ComboBox<T>, TextField> addLabelComboBoxLabel(GridPane gridPane,
                                                                              int rowIndex,
                                                                              String title,
                                                                              String textFieldText,
                                                                              double top) {
    Label label = addLabel(gridPane, rowIndex, title, top);

    HBox hBox = new HBox();
    hBox.setSpacing(10);

    ComboBox<T> comboBox = new JFXComboBox<>();
    TextField textField = new TextField(textFieldText);
    textField.setEditable(false);
    textField.setMouseTransparent(true);
    textField.setFocusTraversable(false);

    hBox.getChildren().addAll(comboBox, textField);
    GridPane.setRowIndex(hBox, rowIndex);
    GridPane.setColumnIndex(hBox, 1);
    GridPane.setMargin(hBox, new Insets(top, 0, 0, 0));
    gridPane.getChildren().add(hBox);

    return new Tuple3<>(label, comboBox, textField);
}
 
Example 4
Source File: SwishForm.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"),
            swishAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
            Res.get(swishAccount.getPaymentMethod().getId()));
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.owner"),
            swishAccount.getHolderName());
    TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.mobile"),
            swishAccount.getMobileNr()).second;
    field.setMouseTransparent(false);
    TradeCurrency singleTradeCurrency = swishAccount.getSingleTradeCurrency();
    String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), nameAndCode);
    addLimitations(true);
}
 
Example 5
Source File: ChaseQuickPayForm.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"),
            chaseQuickPayAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
            Res.get(chaseQuickPayAccount.getPaymentMethod().getId()));
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.owner"),
            chaseQuickPayAccount.getHolderName());
    TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.email"),
            chaseQuickPayAccount.getEmail()).second;
    field.setMouseTransparent(false);
    TradeCurrency singleTradeCurrency = chaseQuickPayAccount.getSingleTradeCurrency();
    String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), nameAndCode);
    addLimitations(true);
}
 
Example 6
Source File: FasterPaymentsForm.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"),
            fasterPaymentsAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
            Res.get(fasterPaymentsAccount.getPaymentMethod().getId()));
    if (!fasterPaymentsAccount.getHolderName().isEmpty()) {
        addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.owner"),
                fasterPaymentsAccount.getHolderName());
    }
    // do not translate as it is used in English only
    addCompactTopLabelTextField(gridPane, ++gridRow, UK_SORT_CODE, fasterPaymentsAccount.getSortCode());
    TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.accountNr"),
            fasterPaymentsAccount.getAccountNr()).second;
    field.setMouseTransparent(false);
    TradeCurrency singleTradeCurrency = fasterPaymentsAccount.getSingleTradeCurrency();
    String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), nameAndCode);
    addLimitations(true);
}
 
Example 7
Source File: AssetsForm.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"),
            assetAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
            Res.get(assetAccount.getPaymentMethod().getId()));
    Tuple3<Label, TextField, VBox> tuple2 = addCompactTopLabelTextField(gridPane, ++gridRow,
            Res.get("payment.altcoin.address"), assetAccount.getAddress());
    TextField field = tuple2.second;
    field.setMouseTransparent(false);
    final TradeCurrency singleTradeCurrency = assetAccount.getSingleTradeCurrency();
    final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.altcoin"),
            nameAndCode);
    addLimitations(true);
}
 
Example 8
Source File: ClearXchangeForm.java    From bisq with GNU Affero General Public License v3.0 6 votes vote down vote up
@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"),
            clearXchangeAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
            Res.get(clearXchangeAccount.getPaymentMethod().getId()));
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.owner"),
            clearXchangeAccount.getHolderName());
    TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.email.mobile"),
            clearXchangeAccount.getEmailOrMobileNr()).second;
    field.setMouseTransparent(false);
    final TradeCurrency singleTradeCurrency = clearXchangeAccount.getSingleTradeCurrency();
    final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"),
            nameAndCode);
    addLimitations(true);
}
 
Example 9
Source File: HalCashForm.java    From bisq with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"),
            halCashAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
            Res.get(halCashAccount.getPaymentMethod().getId()));
    TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.mobile"),
            halCashAccount.getMobileNr()).second;
    field.setMouseTransparent(false);
    TradeCurrency singleTradeCurrency = halCashAccount.getSingleTradeCurrency();
    String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), nameAndCode);
    addLimitations(true);
}
 
Example 10
Source File: PopmoneyForm.java    From bisq with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"), account.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"), Res.get(account.getPaymentMethod().getId()));
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.owner"),
            account.getHolderName());
    TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.popmoney.accountId"), account.getAccountId()).second;
    field.setMouseTransparent(false);
    final TradeCurrency singleTradeCurrency = account.getSingleTradeCurrency();
    final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), nameAndCode);
    addLimitations(true);
}
 
Example 11
Source File: MoneyBeamForm.java    From bisq with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"), account.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"), Res.get(account.getPaymentMethod().getId()));
    TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.moneyBeam.accountId"), account.getAccountId()).second;
    field.setMouseTransparent(false);
    final TradeCurrency singleTradeCurrency = account.getSingleTradeCurrency();
    final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), nameAndCode);
    addLimitations(true);
}
 
Example 12
Source File: PromptPayForm.java    From bisq with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"),
            promptPayAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
            Res.get(promptPayAccount.getPaymentMethod().getId()));
    TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.promptPay.promptPayId"),
            promptPayAccount.getPromptPayId()).second;
    field.setMouseTransparent(false);
    TradeCurrency singleTradeCurrency = promptPayAccount.getSingleTradeCurrency();
    String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "null";
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), nameAndCode);
    addLimitations(true);
}
 
Example 13
Source File: UpholdForm.java    From bisq with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"),
            upholdAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
            Res.get(upholdAccount.getPaymentMethod().getId()));
    TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.uphold.accountId"),
            upholdAccount.getAccountId()).second;
    field.setMouseTransparent(false);
    addLimitations(true);
    addCurrenciesGrid(false);
}
 
Example 14
Source File: RevolutForm.java    From bisq with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"),
            account.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
            Res.get(account.getPaymentMethod().getId()));
    String accountId = account.getAccountId();
    TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, getTitle(accountId), accountId).second;
    field.setMouseTransparent(false);
    addLimitations(true);
    addCurrenciesGrid(false);
}
 
Example 15
Source File: GeneralAccountNumberForm.java    From bisq with GNU Affero General Public License v3.0 5 votes vote down vote up
private void addFormForAccountNumberDisplayAccount(String accountName, PaymentMethod paymentMethod, String accountNr,
                                                   TradeCurrency singleTradeCurrency) {
    gridRowFrom = gridRow;
    addTopLabelTextField(gridPane, gridRow, Res.get("payment.account.name"), accountName, Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"), Res.get(paymentMethod.getId()));
    TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.no"), accountNr).second;
    field.setMouseTransparent(false);

    final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
    addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), nameAndCode);

    addLimitations(true);
}