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);
}
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);
}
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();
}
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;
}
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;
}
Aggregations