use of bisq.desktop.components.AutoTooltipLabel in project bisq-desktop by bisq-network.
the class CreateOfferView method addAmountPriceGroup.
private void addAmountPriceGroup() {
TitledGroupBg titledGroupBg = addTitledGroupBg(gridPane, ++gridRow, 2, Res.get("createOffer.setAmountPrice"), Layout.GROUP_DISTANCE);
GridPane.setColumnSpan(titledGroupBg, 3);
imageView = new ImageView();
imageView.setPickOnBounds(true);
directionLabel = new AutoTooltipLabel();
directionLabel.setAlignment(Pos.CENTER);
directionLabel.setPadding(new Insets(-5, 0, 0, 0));
directionLabel.setId("direction-icon-label");
VBox imageVBox = new VBox();
imageVBox.setAlignment(Pos.CENTER);
imageVBox.setSpacing(12);
imageVBox.getChildren().addAll(imageView, directionLabel);
GridPane.setRowIndex(imageVBox, gridRow);
GridPane.setRowSpan(imageVBox, 2);
GridPane.setMargin(imageVBox, new Insets(Layout.FIRST_ROW_AND_GROUP_DISTANCE, 10, 10, 10));
gridPane.getChildren().add(imageVBox);
addAmountPriceFields();
addSecondRow();
}
use of bisq.desktop.components.AutoTooltipLabel in project bisq-desktop by bisq-network.
the class CreateOfferView method addSecondRow.
private void addSecondRow() {
// price as fiat
Tuple3<HBox, InputTextField, Label> priceValueCurrencyBoxTuple = getEditableValueCurrencyBox(Res.get("createOffer.price.prompt"));
HBox priceValueCurrencyBox = priceValueCurrencyBoxTuple.first;
fixedPriceTextField = priceValueCurrencyBoxTuple.second;
fixedPriceTextField.setPrefWidth(200);
editOfferElements.add(fixedPriceTextField);
priceCurrencyLabel = priceValueCurrencyBoxTuple.third;
editOfferElements.add(priceCurrencyLabel);
Tuple2<Label, VBox> priceInputBoxTuple = getTradeInputBox(priceValueCurrencyBox, "");
priceDescriptionLabel = priceInputBoxTuple.first;
priceDescriptionLabel.setPrefWidth(200);
getSmallIconForLabel(MaterialDesignIcon.LOCK, priceDescriptionLabel);
editOfferElements.add(priceDescriptionLabel);
fixedPriceBox = priceInputBoxTuple.second;
marketBasedPriceTextField.setPromptText(Res.get("shared.enterPercentageValue"));
marketBasedPriceLabel.setText("%");
marketBasedPriceLabel.getStyleClass().add("percentage-label");
Tuple3<HBox, InputTextField, Label> amountValueCurrencyBoxTuple = getEditableValueCurrencyBox(Res.get("createOffer.amount.prompt"));
HBox amountValueCurrencyBox = amountValueCurrencyBoxTuple.first;
minAmountTextField = amountValueCurrencyBoxTuple.second;
editOfferElements.add(minAmountTextField);
Label minAmountBtcLabel = amountValueCurrencyBoxTuple.third;
editOfferElements.add(minAmountBtcLabel);
Tuple2<Label, VBox> amountInputBoxTuple = getTradeInputBox(amountValueCurrencyBox, Res.get("createOffer.amountPriceBox.minAmountDescription"));
Label xLabel = new AutoTooltipLabel("x");
xLabel.setFont(Font.font("Helvetica-Bold", 20));
xLabel.setPadding(new Insets(14, 3, 0, 3));
// we just use it to get the same layout as the upper row
xLabel.setVisible(false);
secondRowHBox = new HBox();
secondRowHBox.setSpacing(5);
secondRowHBox.setAlignment(Pos.CENTER_LEFT);
secondRowHBox.getChildren().addAll(amountInputBoxTuple.second, xLabel, fixedPriceBox, priceTypeToggleButton);
GridPane.setRowIndex(secondRowHBox, ++gridRow);
GridPane.setColumnIndex(secondRowHBox, 1);
GridPane.setMargin(secondRowHBox, new Insets(0, 10, 0, 0));
GridPane.setColumnSpan(secondRowHBox, 2);
gridPane.getChildren().add(secondRowHBox);
}
use of bisq.desktop.components.AutoTooltipLabel in project bisq-desktop by bisq-network.
the class TakeOfferView method addOfferAvailabilityLabel.
private void addOfferAvailabilityLabel() {
offerAvailabilityBusyAnimation = new BusyAnimation();
offerAvailabilityLabel = new AutoTooltipLabel(Res.get("takeOffer.fundsBox.isOfferAvailable"));
HBox hBox = new HBox();
hBox.setSpacing(10);
hBox.setAlignment(Pos.CENTER_LEFT);
hBox.getChildren().addAll(nextButton, cancelButton1, offerAvailabilityBusyAnimation, offerAvailabilityLabel);
GridPane.setRowIndex(hBox, ++gridRow);
GridPane.setColumnIndex(hBox, 1);
GridPane.setMargin(hBox, new Insets(-30, 0, 0, 0));
gridPane.getChildren().add(hBox);
}
use of bisq.desktop.components.AutoTooltipLabel in project bisq-desktop by bisq-network.
the class TakeOfferView method addPayInfoEntry.
private void addPayInfoEntry(GridPane infoGridPane, int row, String labelText, String value) {
Label label = new AutoTooltipLabel(labelText);
TextField textField = new TextField(value);
textField.setMinWidth(500);
textField.setEditable(false);
textField.setFocusTraversable(false);
textField.setId("payment-info");
GridPane.setConstraints(label, 0, row, 1, 1, HPos.RIGHT, VPos.CENTER);
GridPane.setConstraints(textField, 1, row);
infoGridPane.getChildren().addAll(label, textField);
}
use of bisq.desktop.components.AutoTooltipLabel in project bisq-desktop by bisq-network.
the class TransactionsView method setDetailsColumnCellFactory.
private void setDetailsColumnCellFactory() {
detailsColumn.setCellValueFactory((addressListItem) -> new ReadOnlyObjectWrapper<>(addressListItem.getValue()));
detailsColumn.setCellFactory(new Callback<TableColumn<TransactionsListItem, TransactionsListItem>, TableCell<TransactionsListItem, TransactionsListItem>>() {
@Override
public TableCell<TransactionsListItem, TransactionsListItem> call(TableColumn<TransactionsListItem, TransactionsListItem> column) {
return new TableCell<TransactionsListItem, TransactionsListItem>() {
private HyperlinkWithIcon field;
@Override
public void updateItem(final TransactionsListItem item, boolean empty) {
super.updateItem(item, empty);
if (item != null && !empty) {
if (item.getDetailsAvailable()) {
field = new HyperlinkWithIcon(item.getDetails(), AwesomeIcon.INFO_SIGN);
field.setOnAction(event -> openDetailPopup(item));
field.setTooltip(new Tooltip(Res.get("tooltip.openPopupForDetails")));
setGraphic(field);
} else {
setGraphic(new AutoTooltipLabel(item.getDetails()));
}
} else {
setGraphic(null);
if (field != null)
field.setOnAction(null);
}
}
};
}
});
}
Aggregations