Search in sources :

Example 6 with AutoTooltipCheckBox

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);
}
Also used : AutoTooltipCheckBox(bisq.desktop.components.AutoTooltipCheckBox) Insets(javafx.geometry.Insets) CheckBox(javafx.scene.control.CheckBox) AutoTooltipCheckBox(bisq.desktop.components.AutoTooltipCheckBox) Tooltip(javafx.scene.control.Tooltip) FormBuilder.addLabel(bisq.desktop.util.FormBuilder.addLabel) Label(javafx.scene.control.Label) FlowPane(javafx.scene.layout.FlowPane)

Example 7 with AutoTooltipCheckBox

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);
}
Also used : AutoTooltipCheckBox(bisq.desktop.components.AutoTooltipCheckBox) Insets(javafx.geometry.Insets) CheckBox(javafx.scene.control.CheckBox) AutoTooltipCheckBox(bisq.desktop.components.AutoTooltipCheckBox) Tuple2(bisq.common.util.Tuple2) AutoTooltipLabel(bisq.desktop.components.AutoTooltipLabel) Label(javafx.scene.control.Label)

Example 8 with AutoTooltipCheckBox

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;
}
Also used : AutoTooltipCheckBox(bisq.desktop.components.AutoTooltipCheckBox) Insets(javafx.geometry.Insets) CheckBox(javafx.scene.control.CheckBox) AutoTooltipCheckBox(bisq.desktop.components.AutoTooltipCheckBox)

Example 9 with AutoTooltipCheckBox

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);
}
Also used : AutoTooltipCheckBox(bisq.desktop.components.AutoTooltipCheckBox) HBox(javafx.scene.layout.HBox) Insets(javafx.geometry.Insets) InputTextField(bisq.desktop.components.InputTextField) InfoInputTextField(bisq.desktop.components.InfoInputTextField) CheckBox(javafx.scene.control.CheckBox) AutoTooltipCheckBox(bisq.desktop.components.AutoTooltipCheckBox) Tuple3(bisq.common.util.Tuple3) AutoTooltipLabel(bisq.desktop.components.AutoTooltipLabel) Label(javafx.scene.control.Label)

Example 10 with AutoTooltipCheckBox

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);
}
Also used : AutoTooltipCheckBox(bisq.desktop.components.AutoTooltipCheckBox) Insets(javafx.geometry.Insets) CheckBox(javafx.scene.control.CheckBox) AutoTooltipCheckBox(bisq.desktop.components.AutoTooltipCheckBox) Label(javafx.scene.control.Label) FlowPane(javafx.scene.layout.FlowPane)

Aggregations

AutoTooltipCheckBox (bisq.desktop.components.AutoTooltipCheckBox)10 CheckBox (javafx.scene.control.CheckBox)10 Insets (javafx.geometry.Insets)9 Label (javafx.scene.control.Label)8 Tooltip (javafx.scene.control.Tooltip)5 AutoTooltipLabel (bisq.desktop.components.AutoTooltipLabel)4 FlowPane (javafx.scene.layout.FlowPane)4 Tuple2 (bisq.common.util.Tuple2)3 Button (javafx.scene.control.Button)3 UserThread (bisq.common.UserThread)2 Res (bisq.core.locale.Res)2 FxmlView (bisq.desktop.common.view.FxmlView)2 AutoTooltipButton (bisq.desktop.components.AutoTooltipButton)2 Popup (bisq.desktop.main.overlays.popups.Popup)2 BooleanProperty (javafx.beans.property.BooleanProperty)2 ReadOnlyObjectWrapper (javafx.beans.property.ReadOnlyObjectWrapper)2 ChangeListener (javafx.beans.value.ChangeListener)2 TableCell (javafx.scene.control.TableCell)2 TableColumn (javafx.scene.control.TableColumn)2 TableView (javafx.scene.control.TableView)2