use of bisq.desktop.components.AutoTooltipLabel in project bisq-desktop by bisq-network.
the class AltCoinAccountsView method buildForm.
// /////////////////////////////////////////////////////////////////////////////////////////
// Base form
// /////////////////////////////////////////////////////////////////////////////////////////
private void buildForm() {
addTitledGroupBg(root, gridRow, 1, Res.get("shared.manageAccounts"));
Tuple2<Label, ListView> tuple = addLabelListView(root, gridRow, Res.get("account.altcoin.yourAltcoinAccounts"), Layout.FIRST_ROW_DISTANCE);
GridPane.setValignment(tuple.first, VPos.TOP);
// noinspection unchecked
paymentAccountsListView = tuple.second;
paymentAccountsListView.setPrefHeight(2 * Layout.LIST_ROW_HEIGHT + 14);
paymentAccountsListView.setCellFactory(new Callback<ListView<PaymentAccount>, ListCell<PaymentAccount>>() {
@Override
public ListCell<PaymentAccount> call(ListView<PaymentAccount> list) {
return new ListCell<PaymentAccount>() {
final Label label = new AutoTooltipLabel();
final ImageView icon = ImageUtil.getImageViewById(ImageUtil.REMOVE_ICON);
final Button removeButton = new AutoTooltipButton("", icon);
final AnchorPane pane = new AnchorPane(label, removeButton);
{
label.setLayoutY(5);
removeButton.setId("icon-button");
AnchorPane.setRightAnchor(removeButton, 0d);
}
@Override
public void updateItem(final PaymentAccount item, boolean empty) {
super.updateItem(item, empty);
if (item != null && !empty) {
label.setText(item.getAccountName());
removeButton.setOnAction(e -> onDeleteAccount(item));
setGraphic(pane);
} else {
setGraphic(null);
}
}
};
}
});
Tuple3<Button, Button, Button> tuple3 = add3ButtonsAfterGroup(root, ++gridRow, Res.get("shared.addNewAccount"), Res.get("shared.ExportAccounts"), Res.get("shared.importAccounts"));
addAccountButton = tuple3.first;
exportButton = tuple3.second;
importButton = tuple3.third;
}
use of bisq.desktop.components.AutoTooltipLabel in project bisq-desktop by bisq-network.
the class FormBuilder method getEditableValueCurrencyBoxWithInfo.
public static Tuple3<HBox, InfoInputTextField, Label> getEditableValueCurrencyBoxWithInfo(String promptText) {
InfoInputTextField infoInputTextField = new InfoInputTextField();
InputTextField input = infoInputTextField.getTextField();
input.setPrefWidth(170);
input.setAlignment(Pos.CENTER_RIGHT);
input.setId("text-input-with-currency-text-field");
input.setPromptText(promptText);
Label currency = new AutoTooltipLabel(Res.getBaseCurrencyCode());
currency.setId("currency-info-label");
HBox box = new HBox();
box.getChildren().addAll(infoInputTextField, currency);
return new Tuple3<>(box, infoInputTextField, currency);
}
use of bisq.desktop.components.AutoTooltipLabel in project bisq-desktop by bisq-network.
the class FormBuilder method getNonEditableValueCurrencyBox.
public static Tuple3<HBox, TextField, Label> getNonEditableValueCurrencyBox() {
TextField textField = new InputTextField();
textField.setPrefWidth(190);
textField.setAlignment(Pos.CENTER_RIGHT);
textField.setId("text-input-with-currency-text-field");
textField.setMouseTransparent(true);
textField.setEditable(false);
textField.setFocusTraversable(false);
Label currency = new AutoTooltipLabel(Res.getBaseCurrencyCode());
currency.setId("currency-info-label-disabled");
HBox box = new HBox();
box.getChildren().addAll(textField, currency);
return new Tuple3<>(box, textField, currency);
}
use of bisq.desktop.components.AutoTooltipLabel in project bisq-desktop by bisq-network.
the class FormBuilder method addMultilineLabel.
public static Label addMultilineLabel(GridPane gridPane, int rowIndex, String text, double top) {
Label label = new AutoTooltipLabel(text);
label.setWrapText(true);
GridPane.setHalignment(label, HPos.LEFT);
GridPane.setRowIndex(label, rowIndex);
GridPane.setColumnSpan(label, 2);
GridPane.setMargin(label, new Insets(top, 0, 0, 0));
gridPane.getChildren().add(label);
return label;
}
use of bisq.desktop.components.AutoTooltipLabel in project bisq-desktop by bisq-network.
the class FormBuilder method getTradeInputBox.
public static Tuple2<Label, VBox> getTradeInputBox(HBox amountValueBox, String descriptionText) {
Label descriptionLabel = new AutoTooltipLabel(descriptionText);
descriptionLabel.setId("input-description-label");
descriptionLabel.setPrefWidth(170);
VBox box = new VBox();
box.setSpacing(2);
box.getChildren().addAll(descriptionLabel, amountValueBox);
return new Tuple2<>(descriptionLabel, box);
}
Aggregations