use of bisq.desktop.components.AutoTooltipButton in project bisq-desktop by bisq-network.
the class BuyerStep4View method addContent.
// /////////////////////////////////////////////////////////////////////////////////////////
// Content
// /////////////////////////////////////////////////////////////////////////////////////////
@SuppressWarnings("PointlessBooleanExpression")
@Override
protected void addContent() {
FormBuilder.addTitledGroupBg(gridPane, gridRow, 5, Res.get("portfolio.pending.step5_buyer.groupTitle"), 0);
FormBuilder.addLabelTextField(gridPane, gridRow, getBtcTradeAmountLabel(), model.getTradeVolume(), Layout.FIRST_ROW_DISTANCE);
FormBuilder.addLabelTextField(gridPane, ++gridRow, getFiatTradeAmountLabel(), model.getFiatVolume());
FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.get("portfolio.pending.step5_buyer.refunded"), model.getSecurityDeposit());
FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.get("portfolio.pending.step5_buyer.tradeFee"), model.getTradeFee());
final String miningFee = model.dataModel.isMaker() ? Res.get("portfolio.pending.step5_buyer.makersMiningFee") : Res.get("portfolio.pending.step5_buyer.takersMiningFee");
FormBuilder.addLabelTextField(gridPane, ++gridRow, miningFee, model.getTxFee());
withdrawTitledGroupBg = FormBuilder.addTitledGroupBg(gridPane, ++gridRow, 1, Res.get("portfolio.pending.step5_buyer.withdrawBTC"), Layout.GROUP_DISTANCE);
FormBuilder.addLabelTextField(gridPane, gridRow, Res.get("portfolio.pending.step5_buyer.amount"), model.getPayoutAmount(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
final Tuple2<Label, InputTextField> tuple2 = FormBuilder.addLabelInputTextField(gridPane, ++gridRow, Res.get("portfolio.pending.step5_buyer.withdrawToAddress"));
withdrawAddressLabel = tuple2.first;
withdrawAddressLabel.setManaged(false);
withdrawAddressLabel.setVisible(false);
withdrawAddressTextField = tuple2.second;
withdrawAddressTextField.setManaged(false);
withdrawAddressTextField.setVisible(false);
HBox hBox = new HBox();
hBox.setSpacing(10);
useSavingsWalletButton = new AutoTooltipButton(Res.get("portfolio.pending.step5_buyer.moveToBisqWallet"));
useSavingsWalletButton.setDefaultButton(false);
Label label = new AutoTooltipLabel(Res.get("shared.OR"));
label.setPadding(new Insets(5, 0, 0, 0));
withdrawToExternalWalletButton = new AutoTooltipButton(Res.get("portfolio.pending.step5_buyer.withdrawExternal"));
withdrawToExternalWalletButton.setDefaultButton(false);
hBox.getChildren().addAll(useSavingsWalletButton, label, withdrawToExternalWalletButton);
GridPane.setRowIndex(hBox, ++gridRow);
GridPane.setColumnIndex(hBox, 1);
GridPane.setMargin(hBox, new Insets(15, 10, 0, 0));
gridPane.getChildren().add(hBox);
useSavingsWalletButton.setOnAction(e -> {
handleTradeCompleted();
model.dataModel.tradeManager.addTradeToClosedTrades(trade);
});
withdrawToExternalWalletButton.setOnAction(e -> onWithdrawal());
String key = "tradeCompleted" + trade.getId();
// noinspection ConstantConditions
if (!DevEnv.isDevMode() && DontShowAgainLookup.showAgain(key)) {
DontShowAgainLookup.dontShowAgain(key, true);
new Notification().headLine(Res.get("notification.tradeCompleted.headline")).notification(Res.get("notification.tradeCompleted.msg")).autoClose().show();
}
}
use of bisq.desktop.components.AutoTooltipButton in project bisq-desktop by bisq-network.
the class FormBuilder method addButtonBusyAnimationLabel.
public static Tuple3<Button, BusyAnimation, Label> addButtonBusyAnimationLabel(GridPane gridPane, int rowIndex, String buttonTitle, double top) {
HBox hBox = new HBox();
hBox.setSpacing(10);
Button button = new AutoTooltipButton(buttonTitle);
button.setDefaultButton(true);
BusyAnimation busyAnimation = new BusyAnimation(false);
Label label = new AutoTooltipLabel();
hBox.setAlignment(Pos.CENTER_LEFT);
hBox.getChildren().addAll(button, busyAnimation, label);
GridPane.setRowIndex(hBox, rowIndex);
GridPane.setColumnIndex(hBox, 1);
GridPane.setMargin(hBox, new Insets(top, 0, 0, 0));
gridPane.getChildren().add(hBox);
return new Tuple3<>(button, busyAnimation, label);
}
use of bisq.desktop.components.AutoTooltipButton in project bisq-desktop by bisq-network.
the class FormBuilder method add3Buttons.
public static Tuple3<Button, Button, Button> add3Buttons(GridPane gridPane, int rowIndex, String title1, String title2, String title3, double top) {
HBox hBox = new HBox();
hBox.setSpacing(10);
Button button1 = new AutoTooltipButton(title1);
button1.setDefaultButton(true);
Button button2 = new AutoTooltipButton(title2);
Button button3 = new AutoTooltipButton(title3);
hBox.getChildren().addAll(button1, button2, button3);
GridPane.setRowIndex(hBox, rowIndex);
GridPane.setColumnIndex(hBox, 1);
GridPane.setMargin(hBox, new Insets(top, 10, 0, 0));
gridPane.getChildren().add(hBox);
return new Tuple3<>(button1, button2, button3);
}
use of bisq.desktop.components.AutoTooltipButton in project bisq-desktop by bisq-network.
the class FormBuilder method addButtonCheckBox.
public static Tuple2<Button, CheckBox> addButtonCheckBox(GridPane gridPane, int rowIndex, String buttonTitle, String checkBoxTitle, double top) {
Button button = new AutoTooltipButton(buttonTitle);
button.setDefaultButton(true);
CheckBox checkBox = new AutoTooltipCheckBox(checkBoxTitle);
HBox.setMargin(checkBox, new Insets(6, 0, 0, 0));
HBox hBox = new HBox();
hBox.setSpacing(20);
hBox.getChildren().addAll(button, checkBox);
GridPane.setRowIndex(hBox, rowIndex);
GridPane.setColumnIndex(hBox, 1);
hBox.setPadding(new Insets(top, 0, 0, 0));
gridPane.getChildren().add(hBox);
return new Tuple2<>(button, checkBox);
}
use of bisq.desktop.components.AutoTooltipButton in project bisq-desktop by bisq-network.
the class FormBuilder method addLabelInputTextFieldButton.
// /////////////////////////////////////////////////////////////////////////////////////////
// Label + InputTextField + Button
// /////////////////////////////////////////////////////////////////////////////////////////
public static Tuple3<Label, InputTextField, Button> addLabelInputTextFieldButton(GridPane gridPane, int rowIndex, String title, String buttonTitle) {
Label label = addLabel(gridPane, rowIndex, title, 0);
InputTextField inputTextField = new InputTextField();
Button button = new AutoTooltipButton(buttonTitle);
button.setDefaultButton(true);
HBox hBox = new HBox();
hBox.setSpacing(10);
hBox.getChildren().addAll(inputTextField, button);
HBox.setHgrow(inputTextField, Priority.ALWAYS);
GridPane.setRowIndex(hBox, rowIndex);
GridPane.setColumnIndex(hBox, 1);
gridPane.getChildren().add(hBox);
return new Tuple3<>(label, inputTextField, button);
}
Aggregations