Search in sources :

Example 1 with InfoTextField

use of bisq.desktop.components.InfoTextField in project bisq-desktop by bisq-network.

the class FormBuilder method addLabelInfoTextfield.

public static Tuple2<Label, InfoTextField> addLabelInfoTextfield(GridPane gridPane, int rowIndex, String labelText, String fieldText, double top) {
    Label label = addLabel(gridPane, rowIndex, labelText, top);
    InfoTextField infoTextField = new InfoTextField();
    infoTextField.setText(fieldText);
    GridPane.setRowIndex(infoTextField, rowIndex);
    GridPane.setColumnIndex(infoTextField, 1);
    GridPane.setMargin(infoTextField, new Insets(top, 0, 0, 0));
    gridPane.getChildren().add(infoTextField);
    return new Tuple2<>(label, infoTextField);
}
Also used : InfoTextField(bisq.desktop.components.InfoTextField) Insets(javafx.geometry.Insets) Tuple2(bisq.common.util.Tuple2) AutoTooltipLabel(bisq.desktop.components.AutoTooltipLabel) Label(javafx.scene.control.Label)

Example 2 with InfoTextField

use of bisq.desktop.components.InfoTextField in project bisq-desktop by bisq-network.

the class TradeStepView method addTradeInfoBlock.

protected void addTradeInfoBlock() {
    tradeInfoTitledGroupBg = FormBuilder.addTitledGroupBg(gridPane, gridRow, 4, Res.get("portfolio.pending.tradeInformation"));
    txIdTextField = FormBuilder.addLabelTxIdTextField(gridPane, gridRow, Res.getWithCol("shared.depositTransactionId"), Layout.FIRST_ROW_DISTANCE).second;
    String id = model.dataModel.txId.get();
    if (!id.isEmpty())
        txIdTextField.setup(id);
    else
        txIdTextField.cleanup();
    if (model.dataModel.getTrade() != null) {
        InfoTextField infoTextField = PaymentMethodForm.addOpenTradeDuration(gridPane, ++gridRow, model.dataModel.getTrade().getOffer());
        infoTextField.setContentForInfoPopOver(createInfoPopover());
    }
    timeLeftTextField = FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("portfolio.pending.remainingTime")).second;
    timeLeftProgressBar = new ProgressBar(0);
    timeLeftProgressBar.setOpacity(0.7);
    timeLeftProgressBar.setMinHeight(9);
    timeLeftProgressBar.setMaxHeight(9);
    timeLeftProgressBar.setMaxWidth(Double.MAX_VALUE);
    GridPane.setRowIndex(timeLeftProgressBar, ++gridRow);
    GridPane.setColumnIndex(timeLeftProgressBar, 1);
    GridPane.setFillWidth(timeLeftProgressBar, true);
    gridPane.getChildren().add(timeLeftProgressBar);
    updateTimeLeft();
}
Also used : InfoTextField(bisq.desktop.components.InfoTextField) ProgressBar(javafx.scene.control.ProgressBar)

Aggregations

InfoTextField (bisq.desktop.components.InfoTextField)2 Tuple2 (bisq.common.util.Tuple2)1 AutoTooltipLabel (bisq.desktop.components.AutoTooltipLabel)1 Insets (javafx.geometry.Insets)1 Label (javafx.scene.control.Label)1 ProgressBar (javafx.scene.control.ProgressBar)1