use of bisq.desktop.components.AutoTooltipCheckBox in project bisq-desktop by bisq-network.
the class OKPayForm method addCurrenciesGrid.
private void addCurrenciesGrid(boolean isEditable) {
Label label = addLabel(gridPane, ++gridRow, Res.get("payment.supportedCurrencies"), 0);
GridPane.setValignment(label, VPos.TOP);
FlowPane flowPane = new FlowPane();
flowPane.setPadding(new Insets(10, 10, 10, 10));
flowPane.setVgap(10);
flowPane.setHgap(10);
if (isEditable)
flowPane.setId("flow-pane-checkboxes-bg");
else
flowPane.setId("flow-pane-checkboxes-non-editable-bg");
CurrencyUtil.getAllOKPayCurrencies().stream().forEach(e -> {
CheckBox checkBox = new AutoTooltipCheckBox(e.getCode());
checkBox.setMouseTransparent(!isEditable);
checkBox.setSelected(okPayAccount.getTradeCurrencies().contains(e));
checkBox.setMinWidth(60);
checkBox.setMaxWidth(checkBox.getMinWidth());
checkBox.setTooltip(new Tooltip(e.getName()));
checkBox.setOnAction(event -> {
if (checkBox.isSelected())
okPayAccount.addCurrency(e);
else
okPayAccount.removeCurrency(e);
updateAllInputsValid();
});
flowPane.getChildren().add(checkBox);
});
GridPane.setRowIndex(flowPane, gridRow);
GridPane.setColumnIndex(flowPane, 1);
gridPane.getChildren().add(flowPane);
}
use of bisq.desktop.components.AutoTooltipCheckBox in project bisq-desktop by bisq-network.
the class FormBuilder method addLabelCheckBox.
public static Tuple2<Label, CheckBox> addLabelCheckBox(GridPane gridPane, int rowIndex, String title, String checkBoxTitle, double top) {
Label label = addLabel(gridPane, rowIndex, title, -3);
GridPane.setMargin(label, new Insets(top, 0, 0, 0));
CheckBox checkBox = new AutoTooltipCheckBox(checkBoxTitle);
GridPane.setRowIndex(checkBox, rowIndex);
GridPane.setColumnIndex(checkBox, 1);
GridPane.setMargin(checkBox, new Insets(top, 0, 0, 0));
gridPane.getChildren().add(checkBox);
return new Tuple2<>(label, checkBox);
}
use of bisq.desktop.components.AutoTooltipCheckBox in project bisq-desktop by bisq-network.
the class FormBuilder method addCheckBox.
public static CheckBox addCheckBox(GridPane gridPane, int rowIndex, String checkBoxTitle, double top) {
CheckBox checkBox = new AutoTooltipCheckBox(checkBoxTitle);
GridPane.setMargin(checkBox, new Insets(top, 0, 0, 0));
GridPane.setRowIndex(checkBox, rowIndex);
GridPane.setColumnIndex(checkBox, 1);
gridPane.getChildren().add(checkBox);
return checkBox;
}
use of bisq.desktop.components.AutoTooltipCheckBox in project bisq-desktop by bisq-network.
the class FormBuilder method addLabelInputTextFieldCheckBox.
// /////////////////////////////////////////////////////////////////////////////////////////
// Label + InputTextField + CheckBox
// /////////////////////////////////////////////////////////////////////////////////////////
public static Tuple3<Label, InputTextField, CheckBox> addLabelInputTextFieldCheckBox(GridPane gridPane, int rowIndex, String title, String checkBoxTitle) {
Label label = addLabel(gridPane, rowIndex, title, 0);
InputTextField inputTextField = new InputTextField();
CheckBox checkBox = new AutoTooltipCheckBox(checkBoxTitle);
HBox.setMargin(checkBox, new Insets(4, 0, 0, 0));
HBox hBox = new HBox();
hBox.setSpacing(10);
hBox.getChildren().addAll(inputTextField, checkBox);
GridPane.setRowIndex(hBox, rowIndex);
GridPane.setColumnIndex(hBox, 1);
gridPane.getChildren().add(hBox);
return new Tuple3<>(label, inputTextField, checkBox);
}
use of bisq.desktop.components.AutoTooltipCheckBox in project bisq-desktop by bisq-network.
the class DisputeSummaryWindow method addCheckboxes.
private void addCheckboxes() {
Label evidenceLabel = addLabel(gridPane, ++rowIndex, Res.get("disputeSummaryWindow.evidence"), 10);
GridPane.setValignment(evidenceLabel, VPos.TOP);
CheckBox tamperProofCheckBox = new AutoTooltipCheckBox(Res.get("disputeSummaryWindow.evidence.tamperProof"));
CheckBox idVerificationCheckBox = new AutoTooltipCheckBox(Res.get("disputeSummaryWindow.evidence.id"));
CheckBox screenCastCheckBox = new AutoTooltipCheckBox(Res.get("disputeSummaryWindow.evidence.video"));
tamperProofCheckBox.selectedProperty().bindBidirectional(disputeResult.tamperProofEvidenceProperty());
idVerificationCheckBox.selectedProperty().bindBidirectional(disputeResult.idVerificationProperty());
screenCastCheckBox.selectedProperty().bindBidirectional(disputeResult.screenCastProperty());
FlowPane checkBoxPane = new FlowPane();
checkBoxPane.setHgap(20);
checkBoxPane.setVgap(5);
checkBoxPane.getChildren().addAll(tamperProofCheckBox, idVerificationCheckBox, screenCastCheckBox);
GridPane.setRowIndex(checkBoxPane, rowIndex);
GridPane.setColumnIndex(checkBoxPane, 1);
GridPane.setMargin(checkBoxPane, new Insets(10, 0, 0, 0));
gridPane.getChildren().add(checkBoxPane);
}
Aggregations