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