Search in sources :

Example 11 with FlowPane

use of javafx.scene.layout.FlowPane in project JFoenix by jfoenixadmin.

the class ColorPickerDemo method start.

@Override
public void start(Stage stage) {
    FlowPane main = new FlowPane();
    main.setVgap(20);
    main.setHgap(20);
    javafx.scene.control.ColorPicker picker = new javafx.scene.control.ColorPicker(Color.RED);
    picker.getStyleClass().add("button");
    //		picker.getStyleClass().add("split-button");		 
    main.getChildren().add(picker);
    main.getChildren().add(new JFXColorPicker());
    StackPane pane = new StackPane();
    pane.getChildren().add(main);
    StackPane.setMargin(main, new Insets(100));
    pane.setStyle("-fx-background-color:WHITE");
    final Scene scene = new Scene(pane, 800, 200);
    //		scene.getStylesheets().add(ButtonDemo.class.getResource("/resources/css/jfoenix-components.css").toExternalForm());
    stage.setTitle("JFX Button Demo");
    stage.setScene(scene);
    stage.show();
}
Also used : JFXColorPicker(com.jfoenix.controls.JFXColorPicker) Insets(javafx.geometry.Insets) JFXColorPicker(com.jfoenix.controls.JFXColorPicker) FlowPane(javafx.scene.layout.FlowPane) Scene(javafx.scene.Scene) StackPane(javafx.scene.layout.StackPane)

Example 12 with FlowPane

use of javafx.scene.layout.FlowPane in project bitsquare by bitsquare.

the class OKPayForm method addCurrenciesGrid.

private void addCurrenciesGrid(boolean isEditable) {
    Label label = addLabel(gridPane, ++gridRow, "Supported currencies:", 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 CheckBox(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 : Insets(javafx.geometry.Insets) CheckBox(javafx.scene.control.CheckBox) Tooltip(javafx.scene.control.Tooltip) Label(javafx.scene.control.Label) FlowPane(javafx.scene.layout.FlowPane)

Example 13 with FlowPane

use of javafx.scene.layout.FlowPane in project bitsquare by bitsquare.

the class DisputeSummaryWindow method addCheckboxes.

private void addCheckboxes() {
    Label evidenceLabel = addLabel(gridPane, ++rowIndex, "Evidence:", 10);
    GridPane.setValignment(evidenceLabel, VPos.TOP);
    CheckBox tamperProofCheckBox = new CheckBox("Tamper proof evidence");
    CheckBox idVerificationCheckBox = new CheckBox("ID Verification");
    CheckBox screenCastCheckBox = new CheckBox("Video/Screencast");
    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 : Insets(javafx.geometry.Insets) FlowPane(javafx.scene.layout.FlowPane)

Example 14 with FlowPane

use of javafx.scene.layout.FlowPane in project bitsquare by bitsquare.

the class AwesomeFontDemo method start.

@Override
public void start(Stage primaryStage) {
    Pane root = new FlowPane();
    List<AwesomeIcon> values = new ArrayList<>(Arrays.asList(AwesomeIcon.values()));
    values.sort(new Comparator<AwesomeIcon>() {

        @Override
        public int compare(AwesomeIcon o1, AwesomeIcon o2) {
            return o1.name().compareTo(o2.name());
        }
    });
    for (AwesomeIcon icon : values) {
        Label label = new Label();
        Button button = new Button(icon.name(), label);
        AwesomeDude.setIcon(label, icon);
        root.getChildren().add(button);
    }
    primaryStage.setScene(new Scene(root, 900, 850));
    primaryStage.show();
}
Also used : Button(javafx.scene.control.Button) ArrayList(java.util.ArrayList) Label(javafx.scene.control.Label) FlowPane(javafx.scene.layout.FlowPane) Scene(javafx.scene.Scene) FlowPane(javafx.scene.layout.FlowPane) Pane(javafx.scene.layout.Pane) AwesomeIcon(de.jensd.fx.fontawesome.AwesomeIcon)

Aggregations

FlowPane (javafx.scene.layout.FlowPane)14 Insets (javafx.geometry.Insets)12 Scene (javafx.scene.Scene)11 StackPane (javafx.scene.layout.StackPane)8 Label (javafx.scene.control.Label)4 JFXButton (com.jfoenix.controls.JFXButton)2 JFXHamburger (com.jfoenix.controls.JFXHamburger)2 HamburgerBackArrowBasicTransition (com.jfoenix.transitions.hamburger.HamburgerBackArrowBasicTransition)2 Button (javafx.scene.control.Button)2 CheckBox (javafx.scene.control.CheckBox)2 Pane (javafx.scene.layout.Pane)2 JFXNodesAnimation (com.jfoenix.animation.JFXNodesAnimation)1 JFXCheckBox (com.jfoenix.controls.JFXCheckBox)1 JFXColorPicker (com.jfoenix.controls.JFXColorPicker)1 JFXDatePicker (com.jfoenix.controls.JFXDatePicker)1 JFXDrawer (com.jfoenix.controls.JFXDrawer)1 JFXDrawersStack (com.jfoenix.controls.JFXDrawersStack)1 JFXRippler (com.jfoenix.controls.JFXRippler)1 JFXTimePicker (com.jfoenix.controls.JFXTimePicker)1 TextFieldEditorBuilder (com.jfoenix.controls.cells.editors.TextFieldEditorBuilder)1