Search in sources :

Example 6 with TitledGroupBg

use of bisq.desktop.components.TitledGroupBg in project bisq-desktop by bisq-network.

the class TradeSubView method buildViews.

private void buildViews() {
    addLeftBox();
    addContentPane();
    leftGridPane = new GridPane();
    leftGridPane.setPrefWidth(340);
    leftGridPane.setHgap(Layout.GRID_GAP);
    leftGridPane.setVgap(Layout.GRID_GAP);
    VBox.setMargin(leftGridPane, new Insets(0, 10, 10, 10));
    leftVBox.getChildren().add(leftGridPane);
    leftGridPaneRowIndex = 0;
    tradeProcessTitledGroupBg = FormBuilder.addTitledGroupBg(leftGridPane, leftGridPaneRowIndex, 1, Res.get("portfolio.pending.tradeProcess"));
    addWizards();
    TitledGroupBg noticeTitledGroupBg = FormBuilder.addTitledGroupBg(leftGridPane, leftGridPaneRowIndex, 1, "", Layout.GROUP_DISTANCE);
    Label label = FormBuilder.addMultilineLabel(leftGridPane, leftGridPaneRowIndex, "", Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    openDisputeButton = FormBuilder.addButtonAfterGroup(leftGridPane, ++leftGridPaneRowIndex, Res.get("portfolio.pending.openDispute"));
    GridPane.setColumnIndex(openDisputeButton, 0);
    openDisputeButton.setId("open-dispute-button");
    notificationGroup = new NotificationGroup(noticeTitledGroupBg, label, openDisputeButton);
    notificationGroup.setLabelAndHeadlineVisible(false);
    notificationGroup.setButtonVisible(false);
}
Also used : GridPane(javafx.scene.layout.GridPane) Insets(javafx.geometry.Insets) Label(javafx.scene.control.Label) TitledGroupBg(bisq.desktop.components.TitledGroupBg)

Example 7 with TitledGroupBg

use of bisq.desktop.components.TitledGroupBg in project bisq-desktop by bisq-network.

the class CreateOfferView method addPaymentGroup.

private void addPaymentGroup() {
    TitledGroupBg titledGroupBg = addTitledGroupBg(gridPane, gridRow, 2, Res.get("shared.selectTradingAccount"));
    GridPane.setColumnSpan(titledGroupBg, 3);
    // noinspection unchecked
    paymentAccountsComboBox = addLabelComboBox(gridPane, gridRow, Res.getWithCol("shared.tradingAccount"), Layout.FIRST_ROW_DISTANCE).second;
    paymentAccountsComboBox.setPromptText(Res.get("shared.selectTradingAccount"));
    paymentAccountsComboBox.setMinWidth(300);
    editOfferElements.add(paymentAccountsComboBox);
    // we display either currencyComboBox (multi currency account) or currencyTextField (single)
    Tuple2<Label, ComboBox> currencyComboBoxTuple = addLabelComboBox(gridPane, ++gridRow, Res.getWithCol("shared.currency"));
    currencyComboBoxLabel = currencyComboBoxTuple.first;
    editOfferElements.add(currencyComboBoxLabel);
    // noinspection unchecked
    currencyComboBox = currencyComboBoxTuple.second;
    editOfferElements.add(currencyComboBox);
    currencyComboBox.setPromptText(Res.get("list.currency.select"));
    currencyComboBox.setConverter(new StringConverter<TradeCurrency>() {

        @Override
        public String toString(TradeCurrency tradeCurrency) {
            return tradeCurrency.getNameAndCode();
        }

        @Override
        public TradeCurrency fromString(String s) {
            return null;
        }
    });
    Tuple2<Label, TextField> currencyTextFieldTuple = addLabelTextField(gridPane, gridRow, Res.getWithCol("shared.currency"), "", 5);
    currencyTextFieldLabel = currencyTextFieldTuple.first;
    editOfferElements.add(currencyTextFieldLabel);
    currencyTextField = currencyTextFieldTuple.second;
    editOfferElements.add(currencyTextField);
}
Also used : TradeCurrency(bisq.core.locale.TradeCurrency) ComboBox(javafx.scene.control.ComboBox) AutoTooltipLabel(bisq.desktop.components.AutoTooltipLabel) Label(javafx.scene.control.Label) BalanceTextField(bisq.desktop.components.BalanceTextField) InputTextField(bisq.desktop.components.InputTextField) InfoInputTextField(bisq.desktop.components.InfoInputTextField) TextField(javafx.scene.control.TextField) FundsTextField(bisq.desktop.components.FundsTextField) AddressTextField(bisq.desktop.components.AddressTextField) TitledGroupBg(bisq.desktop.components.TitledGroupBg)

Example 8 with TitledGroupBg

use of bisq.desktop.components.TitledGroupBg 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();
}
Also used : Insets(javafx.geometry.Insets) TitledGroupBg(bisq.desktop.components.TitledGroupBg) ImageView(javafx.scene.image.ImageView) AutoTooltipLabel(bisq.desktop.components.AutoTooltipLabel) VBox(javafx.scene.layout.VBox)

Example 9 with TitledGroupBg

use of bisq.desktop.components.TitledGroupBg in project bisq-desktop by bisq-network.

the class FormBuilder method addTitledGroupBg.

public static TitledGroupBg addTitledGroupBg(GridPane gridPane, int rowIndex, int rowSpan, String title, double top) {
    TitledGroupBg titledGroupBg = new TitledGroupBg();
    titledGroupBg.setText(title);
    titledGroupBg.prefWidthProperty().bind(gridPane.widthProperty());
    GridPane.setRowIndex(titledGroupBg, rowIndex);
    GridPane.setRowSpan(titledGroupBg, rowSpan);
    GridPane.setColumnSpan(titledGroupBg, 2);
    GridPane.setMargin(titledGroupBg, new Insets(top, -10, -10, -10));
    gridPane.getChildren().add(titledGroupBg);
    return titledGroupBg;
}
Also used : Insets(javafx.geometry.Insets) TitledGroupBg(bisq.desktop.components.TitledGroupBg)

Example 10 with TitledGroupBg

use of bisq.desktop.components.TitledGroupBg in project bisq-desktop by bisq-network.

the class PreferencesView method initializeDisplayOptions.

private void initializeDisplayOptions() {
    TitledGroupBg titledGroupBg = addTitledGroupBg(root, ++gridRow, 4, Res.get("setting.preferences.displayOptions"), Layout.GROUP_DISTANCE);
    GridPane.setColumnSpan(titledGroupBg, 4);
    showOwnOffersInOfferBook = addLabelCheckBox(root, gridRow, Res.get("setting.preferences.showOwnOffers"), "", Layout.FIRST_ROW_AND_GROUP_DISTANCE).second;
    useAnimationsCheckBox = addLabelCheckBox(root, ++gridRow, Res.get("setting.preferences.useAnimations"), "").second;
    // useStickyMarketPriceCheckBox = addLabelCheckBox(root, ++gridRow, "Use sticky market price:", "").second;
    sortMarketCurrenciesNumericallyCheckBox = addLabelCheckBox(root, ++gridRow, Res.get("setting.preferences.sortWithNumOffers"), "").second;
    resetDontShowAgainButton = addLabelButton(root, ++gridRow, Res.get("setting.preferences.resetAllFlags"), Res.get("setting.preferences.reset"), 0).second;
}
Also used : TitledGroupBg(bisq.desktop.components.TitledGroupBg)

Aggregations

TitledGroupBg (bisq.desktop.components.TitledGroupBg)12 Label (javafx.scene.control.Label)8 AutoTooltipLabel (bisq.desktop.components.AutoTooltipLabel)5 Insets (javafx.geometry.Insets)5 InputTextField (bisq.desktop.components.InputTextField)4 FormBuilder.addTitledGroupBg (bisq.desktop.util.FormBuilder.addTitledGroupBg)3 Button (javafx.scene.control.Button)3 ImageView (javafx.scene.image.ImageView)3 BaseCurrencyNetwork (bisq.core.btc.BaseCurrencyNetwork)2 TradeCurrency (bisq.core.locale.TradeCurrency)2 CryptoCurrencyAccountPayload (bisq.core.payment.payload.CryptoCurrencyAccountPayload)2 PaymentAccountPayload (bisq.core.payment.payload.PaymentAccountPayload)2 BusyAnimation (bisq.desktop.components.BusyAnimation)2 TextFieldWithCopyIcon (bisq.desktop.components.TextFieldWithCopyIcon)2 Popup (bisq.desktop.main.overlays.popups.Popup)2 ComboBox (javafx.scene.control.ComboBox)2 UserThread (bisq.common.UserThread)1 DevEnv (bisq.common.app.DevEnv)1 Tuple2 (bisq.common.util.Tuple2)1 Tuple3 (bisq.common.util.Tuple3)1