public static Tuple2<Button, Button> add2ButtonsAfterGroup( GridPane gridPane, int rowIndex, String title1, String title2, double top) { HBox hBox = new HBox(); hBox.setSpacing(10); Button button1 = new Button(title1); button1.setDefaultButton(true); Button button2 = new Button(title2); hBox.getChildren().addAll(button1, button2); GridPane.setRowIndex(hBox, rowIndex); GridPane.setColumnIndex(hBox, 1); GridPane.setMargin(hBox, new Insets(top, 10, 0, 0)); gridPane.getChildren().add(hBox); return new Tuple2<>(button1, button2); }
public static Tuple3<HBox, InputTextField, Label> getValueCurrencyBox(String promptText) { InputTextField input = new InputTextField(); input.setPrefWidth(170); input.setAlignment(Pos.CENTER_RIGHT); input.setId("text-input-with-currency-text-field"); input.setPromptText(promptText); Label currency = new Label(); currency.setId("currency-info-label"); HBox box = new HBox(); box.getChildren().addAll(input, currency); return new Tuple3<>(box, input, currency); }
public static Tuple2<Button, CheckBox> addButtonCheckBox( GridPane gridPane, int rowIndex, String buttonTitle, String checkBoxTitle, double top) { Button button = new Button(buttonTitle); button.setDefaultButton(true); CheckBox checkBox = new CheckBox(checkBoxTitle); HBox.setMargin(checkBox, new Insets(6, 0, 0, 0)); HBox hBox = new HBox(); hBox.setSpacing(20); hBox.getChildren().addAll(button, checkBox); GridPane.setRowIndex(hBox, rowIndex); GridPane.setColumnIndex(hBox, 1); hBox.setPadding(new Insets(top, 0, 0, 0)); gridPane.getChildren().add(hBox); return new Tuple2<>(button, checkBox); }
public static Tuple3<Label, InputTextField, CheckBox> addLabelInputTextFieldCheckBox( GridPane gridPane, int rowIndex, String title, String checkBoxTitle) { Label label = addLabel(gridPane, rowIndex, title, 0); InputTextField inputTextField = new InputTextField(); CheckBox checkBox = new CheckBox(checkBoxTitle); checkBox.setPadding(new Insets(6, 0, 0, 0)); HBox hBox = new HBox(); hBox.setSpacing(10); hBox.getChildren().addAll(inputTextField, checkBox); GridPane.setRowIndex(hBox, rowIndex); GridPane.setColumnIndex(hBox, 1); gridPane.getChildren().add(hBox); return new Tuple3<>(label, inputTextField, checkBox); }
public static Tuple3<Label, ComboBox, ComboBox> addLabelComboBoxComboBox( GridPane gridPane, int rowIndex, String title, double top) { Label label = addLabel(gridPane, rowIndex, title, top); HBox hBox = new HBox(); hBox.setSpacing(10); ComboBox comboBox1 = new ComboBox(); ComboBox comboBox2 = new ComboBox(); hBox.getChildren().addAll(comboBox1, comboBox2); GridPane.setRowIndex(hBox, rowIndex); GridPane.setColumnIndex(hBox, 1); // GridPane.setMargin(hBox, new Insets(15, 0, 0, 0)); gridPane.getChildren().add(hBox); return new Tuple3<>(label, comboBox1, comboBox2); }
public static Tuple3<Label, ComboBox, Button> addLabelComboBoxButton( GridPane gridPane, int rowIndex, String title, String buttonTitle, double top) { Label label = addLabel(gridPane, rowIndex, title, top); HBox hBox = new HBox(); hBox.setSpacing(10); Button button = new Button(buttonTitle); button.setDefaultButton(true); ComboBox comboBox = new ComboBox(); hBox.getChildren().addAll(comboBox, button); GridPane.setRowIndex(hBox, rowIndex); GridPane.setColumnIndex(hBox, 1); GridPane.setMargin(hBox, new Insets(15, 0, 0, 0)); gridPane.getChildren().add(hBox); return new Tuple3<>(label, comboBox, button); }
public static Tuple3<Button, ProgressIndicator, Label> addButtonWithStatus( GridPane gridPane, int rowIndex, String buttonTitle, double top) { HBox hBox = new HBox(); hBox.setSpacing(10); Button button = new Button(buttonTitle); button.setDefaultButton(true); ProgressIndicator progressIndicator = new ProgressIndicator(0); progressIndicator.setPrefHeight(24); progressIndicator.setPrefWidth(24); progressIndicator.setVisible(false); Label label = new Label(); label.setPadding(new Insets(5, 0, 0, 0)); hBox.getChildren().addAll(button, progressIndicator, label); GridPane.setRowIndex(hBox, rowIndex); GridPane.setColumnIndex(hBox, 1); GridPane.setMargin(hBox, new Insets(top, 0, 0, 0)); gridPane.getChildren().add(hBox); return new Tuple3<>(button, progressIndicator, label); }