Search in sources :

Example 26 with Label

use of javafx.scene.control.Label in project aic-praise by aic-sri-international.

the class SGSolverDemoController method configureSettingsContent.

private Node configureSettingsContent() {
    VBox configureMenu = new VBox(2);
    configureMenu.setPadding(new Insets(3, 3, 3, 3));
    HBox displayPrecisionHBox = newButtonHBox();
    displayPrecisionSpinner.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(1, 80, _displayPrecision.get()));
    displayPrecisionSpinner.setPrefWidth(60);
    _displayPrecision.bind(displayPrecisionSpinner.valueProperty());
    displayPrecisionHBox.getChildren().addAll(new Label("Display Numeric Precision:"), displayPrecisionSpinner);
    displayExactCheckBox.setSelected(_isDisplayExact.get());
    displayExactCheckBox.setText("Display Numerics Exactly");
    _isDisplayExact.bind(displayExactCheckBox.selectedProperty());
    HBox displayScientificHBox = newButtonHBox();
    displayScientificGreater.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(2, 80, _displayScientificGreater.get()));
    displayScientificGreater.setPrefWidth(60);
    _displayScientificGreater.bind(displayScientificGreater.valueProperty());
    displayScientificAfter.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(2, 80, _displayScientificAfter.get()));
    displayScientificAfter.setPrefWidth(60);
    _displayScientificAfter.bind(displayScientificAfter.valueProperty());
    displayScientificHBox.getChildren().addAll(new Label("Use Scientific When Outside Range:"), displayScientificGreater, new Label("."), displayScientificAfter);
    debugModeCheckBox.setSelected(_inDebugMode.get());
    debugModeCheckBox.setText("In Debug Mode");
    _inDebugMode.bind(debugModeCheckBox.selectedProperty());
    configureMenu.getChildren().addAll(displayPrecisionHBox, displayScientificHBox, displayExactCheckBox, new Separator(Orientation.HORIZONTAL), debugModeCheckBox);
    return configureMenu;
}
Also used : HBox(javafx.scene.layout.HBox) Insets(javafx.geometry.Insets) Label(javafx.scene.control.Label) VBox(javafx.scene.layout.VBox) Separator(javafx.scene.control.Separator) SpinnerValueFactory(javafx.scene.control.SpinnerValueFactory)

Example 27 with Label

use of javafx.scene.control.Label in project bitsquare by bitsquare.

the class AltCoinAccountsView method buildForm.

///////////////////////////////////////////////////////////////////////////////////////////
// Base form
///////////////////////////////////////////////////////////////////////////////////////////
private void buildForm() {
    addTitledGroupBg(root, gridRow, 1, "Manage accounts");
    Tuple2<Label, ListView> tuple = addLabelListView(root, gridRow, "Your altcoin accounts:", Layout.FIRST_ROW_DISTANCE);
    GridPane.setValignment(tuple.first, VPos.TOP);
    paymentAccountsListView = tuple.second;
    paymentAccountsListView.setPrefHeight(2 * Layout.LIST_ROW_HEIGHT + 14);
    paymentAccountsListView.setCellFactory(new Callback<ListView<PaymentAccount>, ListCell<PaymentAccount>>() {

        @Override
        public ListCell<PaymentAccount> call(ListView<PaymentAccount> list) {
            return new ListCell<PaymentAccount>() {

                final Label label = new Label();

                final ImageView icon = ImageUtil.getImageViewById(ImageUtil.REMOVE_ICON);

                final Button removeButton = new Button("", icon);

                final AnchorPane pane = new AnchorPane(label, removeButton);

                {
                    label.setLayoutY(5);
                    removeButton.setId("icon-button");
                    AnchorPane.setRightAnchor(removeButton, 0d);
                }

                @Override
                public void updateItem(final PaymentAccount item, boolean empty) {
                    super.updateItem(item, empty);
                    if (item != null && !empty) {
                        label.setText(item.getAccountName());
                        removeButton.setOnAction(e -> onDeleteAccount(item));
                        setGraphic(pane);
                    } else {
                        setGraphic(null);
                    }
                }
            };
        }
    });
    Tuple3<Button, Button, Button> tuple3 = add3ButtonsAfterGroup(root, ++gridRow, "Add new account", "Export Accounts", "Import Accounts");
    addAccountButton = tuple3.first;
    exportButton = tuple3.second;
    importButton = tuple3.third;
}
Also used : Button(javafx.scene.control.Button) PaymentAccountFactory(io.bitsquare.payment.PaymentAccountFactory) PaymentMethod(io.bitsquare.payment.PaymentMethod) Popup(io.bitsquare.gui.main.overlays.popups.Popup) ListView(javafx.scene.control.ListView) ListCell(javafx.scene.control.ListCell) TradeCurrency(io.bitsquare.locale.TradeCurrency) Tuple2(io.bitsquare.common.util.Tuple2) PaymentMethodForm(io.bitsquare.gui.components.paymentmethods.PaymentMethodForm) Inject(javax.inject.Inject) PaymentAccount(io.bitsquare.payment.PaymentAccount) Layout(io.bitsquare.gui.util.Layout) VPos(javafx.geometry.VPos) Callback(javafx.util.Callback) GridPane(javafx.scene.layout.GridPane) BSFormatter(io.bitsquare.gui.util.BSFormatter) Label(javafx.scene.control.Label) CryptoCurrency(io.bitsquare.locale.CryptoCurrency) UserThread(io.bitsquare.common.UserThread) ImageUtil(io.bitsquare.gui.util.ImageUtil) io.bitsquare.gui.util.validation(io.bitsquare.gui.util.validation) ActivatableViewAndModel(io.bitsquare.gui.common.view.ActivatableViewAndModel) TimeUnit(java.util.concurrent.TimeUnit) FormBuilder(io.bitsquare.gui.util.FormBuilder) Tuple3(io.bitsquare.common.util.Tuple3) AnchorPane(javafx.scene.layout.AnchorPane) ImageView(javafx.scene.image.ImageView) CryptoCurrencyForm(io.bitsquare.gui.components.paymentmethods.CryptoCurrencyForm) FxmlView(io.bitsquare.gui.common.view.FxmlView) ChangeListener(javafx.beans.value.ChangeListener) TitledGroupBg(io.bitsquare.gui.components.TitledGroupBg) PaymentAccount(io.bitsquare.payment.PaymentAccount) ListCell(javafx.scene.control.ListCell) Label(javafx.scene.control.Label) ListView(javafx.scene.control.ListView) Button(javafx.scene.control.Button) ImageView(javafx.scene.image.ImageView) AnchorPane(javafx.scene.layout.AnchorPane)

Example 28 with Label

use of javafx.scene.control.Label in project bitsquare by bitsquare.

the class AltCoinAccountsView method initialize.

@Override
public void initialize() {
    buildForm();
    paymentAccountChangeListener = (observable, oldValue, newValue) -> {
        if (newValue != null)
            onSelectAccount(newValue);
    };
    Label placeholder = new Label("There are no accounts set up yet");
    placeholder.setWrapText(true);
    paymentAccountsListView.setPlaceholder(placeholder);
}
Also used : Label(javafx.scene.control.Label)

Example 29 with Label

use of javafx.scene.control.Label in project bitsquare by bitsquare.

the class TradeWizardItem method setCompleted.

public void setCompleted() {
    setId("trade-wizard-item-background-completed");
    Label icon = new Label();
    icon.setPadding(new Insets(-3, 6, 0, 0));
    icon.setTextFill(Colors.GREEN);
    AwesomeDude.setIcon(icon, AwesomeIcon.OK);
    setGraphic(icon);
}
Also used : Insets(javafx.geometry.Insets) Label(javafx.scene.control.Label)

Example 30 with Label

use of javafx.scene.control.Label in project bitsquare by bitsquare.

the class BankForm method addHolderNameAndIdForDisplayAccount.

protected void addHolderNameAndIdForDisplayAccount() {
    String countryCode = bankAccountContractData.getCountryCode();
    if (BankUtil.isHolderIdRequired(countryCode)) {
        Tuple4<Label, TextField, Label, TextField> tuple = addLabelTextFieldLabelTextField(gridPane, ++gridRow, "Account holder name:", BankUtil.getHolderIdLabel(countryCode));
        TextField holderNameTextField = tuple.second;
        holderNameTextField.setText(bankAccountContractData.getHolderName());
        holderNameTextField.setMinWidth(300);
        tuple.forth.setText(bankAccountContractData.getHolderTaxId());
    } else {
        addLabelTextField(gridPane, ++gridRow, "Account holder name:", bankAccountContractData.getHolderName());
    }
}
Also used : Label(javafx.scene.control.Label) InputTextField(io.bitsquare.gui.components.InputTextField) TextField(javafx.scene.control.TextField)

Aggregations

Label (javafx.scene.control.Label)138 Insets (javafx.geometry.Insets)47 Button (javafx.scene.control.Button)38 Scene (javafx.scene.Scene)26 HBox (javafx.scene.layout.HBox)26 VBox (javafx.scene.layout.VBox)25 GridPane (javafx.scene.layout.GridPane)20 TextField (javafx.scene.control.TextField)19 BorderPane (javafx.scene.layout.BorderPane)19 Node (javafx.scene.Node)17 ImageView (javafx.scene.image.ImageView)13 ArrayList (java.util.ArrayList)12 InputTextField (io.bitsquare.gui.components.InputTextField)11 List (java.util.List)11 Tooltip (javafx.scene.control.Tooltip)11 Stage (javafx.stage.Stage)11 Map (java.util.Map)9 ObservableList (javafx.collections.ObservableList)9 Image (javafx.scene.image.Image)9 StackPane (javafx.scene.layout.StackPane)9