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);
}
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);
}
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);
}
}
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);
}
}
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();
}
Aggregations