Search in sources :

Example 21 with AutoTooltipLabel

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

the class TakeOfferView method addAmountPriceFields.

private void addAmountPriceFields() {
    // amountBox
    Tuple3<HBox, InputTextField, Label> amountValueCurrencyBoxTuple = getAmountCurrencyBox(Res.get("takeOffer.amount.prompt"));
    HBox amountValueCurrencyBox = amountValueCurrencyBoxTuple.first;
    amountTextField = amountValueCurrencyBoxTuple.second;
    amountCurrency = amountValueCurrencyBoxTuple.third;
    Tuple2<Label, VBox> amountInputBoxTuple = getTradeInputBox(amountValueCurrencyBox, model.getAmountDescription());
    amountDescriptionLabel = amountInputBoxTuple.first;
    VBox amountBox = amountInputBoxTuple.second;
    // x
    Label xLabel = new AutoTooltipLabel("x");
    xLabel.setFont(Font.font("Helvetica-Bold", 20));
    xLabel.setPadding(new Insets(14, 3, 0, 3));
    // price
    Tuple3<HBox, TextField, Label> priceValueCurrencyBoxTuple = getNonEditableValueCurrencyBox();
    HBox priceValueCurrencyBox = priceValueCurrencyBoxTuple.first;
    priceTextField = priceValueCurrencyBoxTuple.second;
    priceCurrencyLabel = priceValueCurrencyBoxTuple.third;
    Tuple2<Label, VBox> priceInputBoxTuple = getTradeInputBox(priceValueCurrencyBox, Res.get("takeOffer.amountPriceBox.priceDescription"));
    priceDescriptionLabel = priceInputBoxTuple.first;
    VBox priceBox = priceInputBoxTuple.second;
    // =
    Label resultLabel = new AutoTooltipLabel("=");
    resultLabel.setFont(Font.font("Helvetica-Bold", 20));
    resultLabel.setPadding(new Insets(14, 2, 0, 2));
    // volume
    Tuple3<HBox, TextField, Label> volumeValueCurrencyBoxTuple = getNonEditableValueCurrencyBox();
    HBox volumeValueCurrencyBox = volumeValueCurrencyBoxTuple.first;
    volumeTextField = volumeValueCurrencyBoxTuple.second;
    volumeCurrencyLabel = volumeValueCurrencyBoxTuple.third;
    Tuple2<Label, VBox> volumeInputBoxTuple = getTradeInputBox(volumeValueCurrencyBox, model.volumeDescriptionLabel.get());
    volumeDescriptionLabel = volumeInputBoxTuple.first;
    VBox volumeBox = volumeInputBoxTuple.second;
    HBox hBox = new HBox();
    hBox.setSpacing(5);
    hBox.setAlignment(Pos.CENTER_LEFT);
    hBox.getChildren().addAll(amountBox, xLabel, priceBox, resultLabel, volumeBox);
    GridPane.setRowIndex(hBox, gridRow);
    GridPane.setColumnIndex(hBox, 1);
    GridPane.setMargin(hBox, new Insets(Layout.FIRST_ROW_AND_GROUP_DISTANCE, 10, 0, 0));
    GridPane.setColumnSpan(hBox, 2);
    gridPane.getChildren().add(hBox);
}
Also used : HBox(javafx.scene.layout.HBox) Insets(javafx.geometry.Insets) InputTextField(bisq.desktop.components.InputTextField) AutoTooltipLabel(bisq.desktop.components.AutoTooltipLabel) Label(javafx.scene.control.Label) BalanceTextField(bisq.desktop.components.BalanceTextField) InputTextField(bisq.desktop.components.InputTextField) TextField(javafx.scene.control.TextField) FundsTextField(bisq.desktop.components.FundsTextField) AddressTextField(bisq.desktop.components.AddressTextField) AutoTooltipLabel(bisq.desktop.components.AutoTooltipLabel) VBox(javafx.scene.layout.VBox)

Example 22 with AutoTooltipLabel

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

the class TakeOfferView method getTradeInputBox.

private Tuple2<Label, VBox> getTradeInputBox(HBox amountValueBox, String promptText) {
    Label descriptionLabel = new AutoTooltipLabel(promptText);
    descriptionLabel.setId("input-description-label");
    descriptionLabel.setPrefWidth(190);
    VBox box = new VBox();
    box.setSpacing(4);
    box.getChildren().addAll(descriptionLabel, amountValueBox);
    return new Tuple2<>(descriptionLabel, box);
}
Also used : Tuple2(bisq.common.util.Tuple2) AutoTooltipLabel(bisq.desktop.components.AutoTooltipLabel) Label(javafx.scene.control.Label) AutoTooltipLabel(bisq.desktop.components.AutoTooltipLabel) VBox(javafx.scene.layout.VBox)

Example 23 with AutoTooltipLabel

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

the class Overlay method addHeadLine.

protected void addHeadLine() {
    if (headLine != null) {
        ++rowIndex;
        headLineLabel = new AutoTooltipLabel(headLine);
        headLineLabel.setMouseTransparent(true);
        if (headlineStyle != null)
            headLineLabel.setStyle(headlineStyle);
        GridPane.setHalignment(headLineLabel, HPos.LEFT);
        GridPane.setRowIndex(headLineLabel, rowIndex);
        GridPane.setColumnSpan(headLineLabel, 2);
        gridPane.getChildren().addAll(headLineLabel);
    }
}
Also used : AutoTooltipLabel(bisq.desktop.components.AutoTooltipLabel)

Example 24 with AutoTooltipLabel

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

the class Overlay method addMessage.

protected void addMessage() {
    if (message != null) {
        messageLabel = new AutoTooltipLabel(truncatedMessage);
        messageLabel.setMouseTransparent(true);
        messageLabel.setWrapText(true);
        GridPane.setHalignment(messageLabel, HPos.LEFT);
        GridPane.setHgrow(messageLabel, Priority.ALWAYS);
        GridPane.setMargin(messageLabel, new Insets(3, 0, 0, 0));
        GridPane.setRowIndex(messageLabel, ++rowIndex);
        GridPane.setColumnIndex(messageLabel, 0);
        GridPane.setColumnSpan(messageLabel, 2);
        gridPane.getChildren().add(messageLabel);
    }
}
Also used : Insets(javafx.geometry.Insets) AutoTooltipLabel(bisq.desktop.components.AutoTooltipLabel)

Example 25 with AutoTooltipLabel

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

the class QRCodeWindow method show.

@Override
public void show() {
    createGridPane();
    addHeadLine();
    addSeparator();
    addMessage();
    GridPane.setRowIndex(qrCodeImageView, ++rowIndex);
    GridPane.setColumnSpan(qrCodeImageView, 2);
    GridPane.setHalignment(qrCodeImageView, HPos.CENTER);
    gridPane.getChildren().add(qrCodeImageView);
    String request = bitcoinURI.replace("%20", " ").replace("?", "\n?").replace("&", "\n&");
    Label infoLabel = new AutoTooltipLabel(Res.get("qRCodeWindow.request", request));
    infoLabel.setMouseTransparent(true);
    infoLabel.setWrapText(true);
    infoLabel.setId("popup-qr-code-info");
    GridPane.setHalignment(infoLabel, HPos.CENTER);
    GridPane.setHgrow(infoLabel, Priority.ALWAYS);
    GridPane.setMargin(infoLabel, new Insets(3, 0, 0, 0));
    GridPane.setRowIndex(infoLabel, ++rowIndex);
    GridPane.setColumnIndex(infoLabel, 0);
    GridPane.setColumnSpan(infoLabel, 2);
    gridPane.getChildren().add(infoLabel);
    addCloseButton();
    applyStyles();
    display();
}
Also used : Insets(javafx.geometry.Insets) Label(javafx.scene.control.Label) AutoTooltipLabel(bisq.desktop.components.AutoTooltipLabel) AutoTooltipLabel(bisq.desktop.components.AutoTooltipLabel)

Aggregations

AutoTooltipLabel (bisq.desktop.components.AutoTooltipLabel)90 Label (javafx.scene.control.Label)55 Insets (javafx.geometry.Insets)45 HBox (javafx.scene.layout.HBox)29 TableCell (javafx.scene.control.TableCell)27 TableColumn (javafx.scene.control.TableColumn)27 VBox (javafx.scene.layout.VBox)23 AutoTooltipButton (bisq.desktop.components.AutoTooltipButton)22 Button (javafx.scene.control.Button)22 ImageView (javafx.scene.image.ImageView)19 Res (bisq.core.locale.Res)18 InputTextField (bisq.desktop.components.InputTextField)18 Popup (bisq.desktop.main.overlays.popups.Popup)17 FxmlView (bisq.desktop.common.view.FxmlView)16 Callback (javafx.util.Callback)16 Inject (javax.inject.Inject)16 Coin (org.bitcoinj.core.Coin)16 Tooltip (javafx.scene.control.Tooltip)15 TableView (javafx.scene.control.TableView)14 BSFormatter (bisq.desktop.util.BSFormatter)13