schemaRowChildren = inRow(schemaRow); fieldType.setItems(getDbmsTypes() .collect(toCollection(FXCollections::observableArrayList)) );
/** * Constructor */ public InputCombobox() { super(); combobox.getStyleClass().add("audience-selector-combobox"); combobox.setItems(items); }
private void setupControls() { ObservableList<FootstepPlannerType> plannerTypeOptions = FXCollections.observableArrayList(FootstepPlannerType.values); plannerTypeComboBox.setItems(plannerTypeOptions); plannerTypeComboBox.setValue(FootstepPlannerType.A_STAR); }
public void setupControls() { ObservableList<DisplayType> displayTypeOptions = FXCollections.observableArrayList(DisplayType.values()); displayTypeComboBox.setItems(displayTypeOptions); displayTypeComboBox.setValue(DisplayType.PLANE); ObservableList<ColoringType> coloringTypeOptions = FXCollections.observableArrayList(ColoringType.values()); coloringTypeComboBox.setItems(coloringTypeOptions); coloringTypeComboBox.setValue(ColoringType.REGION); bufferSizeSlider.setLabelFormatter(StringConverterTools.thousandRounding(true)); }
/** * Setup a combo box * * @param comboBox * the combo box * @param items * the items * @param labelExtractor * function to extract the label * @return the combo box passed in */ public static <T> ComboBox<T> setupCombo(ComboBox<T> comboBox, ObservableList<T> items, @NonNull Function<@Nullable T, @Nullable CharSequence> labelExtractor) { comboBox.setCellFactory(v -> new SimpleListCell<T>(labelExtractor)); comboBox.setButtonCell(new SimpleListCell<>(labelExtractor)); comboBox.setItems(items); return comboBox; }
public static final <T> PropertyEditor<?> createChoiceEditor( Item property, final Collection<T> choices ) { return new AbstractPropertyEditor<T, ComboBox<T>>(property, new ComboBox<T>()) { { getEditor().setItems(FXCollections.observableArrayList(choices)); } @Override protected ObservableValue<T> getObservableValue() { return getEditor().getSelectionModel().selectedItemProperty(); } @Override public void setValue(T value) { getEditor().getSelectionModel().select(value); } }; }
zoomModel.add( "75%" ); //NOI18N zoomModel.add( "50%" ); //NOI18N comboZoom.setItems( FXCollections.observableList( zoomModel ) ); comboZoom.setEditable( true ); comboZoom.setValue( "100%" ); //NOI18N
private void populate(List<EngineSetting> engineSettings) { final VBox displayPane = new VBox(); displayPane.getStyleClass().add(CONFIGURATION_PANE_CSS_CLASS); final GridPane displayContentPane = new GridPane(); displayContentPane.getStyleClass().add("grid"); int row = 0; for (EngineSetting setting : engineSettings) { final ComboBox<String> comboBox = new ComboBox<>(); comboBox.setMaxWidth(Double.MAX_VALUE); ObservableList<String> items = FXCollections.observableArrayList(setting.getOptions()); comboBox.setItems(items); comboBox.setValue(setting.getCurrentOption(this.container.getName())); comboBox.valueProperty().addListener((observable, oldValue, newValue) -> Platform.runLater(() -> { this.lockAll(); setting.setOption(this.container.getName(), items.indexOf(newValue)); this.unlockAll(); })); displayContentPane.add(new TextWithStyle(setting.getText(), CAPTION_TITLE_CSS_CLASS), 0, row); displayContentPane.add(comboBox, 1, row); lockableElements.add(comboBox); ++row; } Region spacer = new Region(); GridPane.setHgrow(spacer, Priority.ALWAYS); displayContentPane.add(spacer, 2, 0); displayPane.getChildren().addAll(displayContentPane); this.setContent(displayPane); }
private void setupControls() { startXPosition.setValueFactory(createStartGoalPositionValueFactory()); startYPosition.setValueFactory(createStartGoalPositionValueFactory()); startZPosition.setValueFactory(createStartGoalPositionValueFactory()); goalXPosition.setValueFactory(createStartGoalPositionValueFactory()); goalYPosition.setValueFactory(createStartGoalPositionValueFactory()); goalZPosition.setValueFactory(createStartGoalPositionValueFactory()); startYaw.setValueFactory(createStartGoalOrientationValueFactory()); goalYaw.setValueFactory(createStartGoalOrientationValueFactory()); ObservableList<us.ihmc.footstepPlanning.FootstepPlannerType> plannerTypeOptions = FXCollections.observableArrayList(FootstepPlannerType.values); plannerType.setItems(plannerTypeOptions); plannerType.setValue(FootstepPlannerType.A_STAR); timeout.setValueFactory(createTimeoutValueFactory()); horizonLength.setValueFactory(createHorizonValueFactory()); }
/** * {@inheritDoc} */ @Override public void setupValueChangedListeners() { super.setupValueChangedListeners(); field.itemsProperty().addListener((observable, oldValue, newValue) -> comboBox.setItems(field.getItems())); field.selectionProperty().addListener((observable, oldValue, newValue) -> { if (field.getSelection() != null) { comboBox.getSelectionModel().select(field.getItems().indexOf(field.getSelection())); } else { comboBox.getSelectionModel().clearSelection(); } }); field.errorMessagesProperty().addListener((observable, oldValue, newValue) -> toggleTooltip(comboBox)); field.tooltipProperty().addListener((observable, oldValue, newValue) -> toggleTooltip(comboBox)); comboBox.focusedProperty().addListener((observable, oldValue, newValue) -> toggleTooltip(comboBox)); }
datePickerTarget.getChildren().add(dateTimePicker.createContent()); storageDetailMinutes.setItems(storageDetailMinutesOptions);
grid.add(tf5, 5, 2); ComboBox<String> ecombo5 = new ComboBox<String>(); ecombo5.setItems(items); ecombo5.setEditable(true); ecombo5.setPromptText("select"); grid.add(ecombo5, 6, 2); ComboBox<String> combo5 = new ComboBox<String>(); combo5.setItems(items); combo5.setPromptText("select"); AquaFx.createComboBoxStyler().setSizeVariant(ControlSizeVariant.REGULAR).style(combo5); grid.add(tf6, 5, 3); ComboBox<String> ecombo6 = new ComboBox<String>(); ecombo6.setItems(items); ecombo6.setEditable(true); ecombo6.setPromptText("select"); grid.add(ecombo6, 6, 3); ComboBox<String> combo6 = new ComboBox<String>(); combo6.setItems(items); combo6.setPromptText("select"); AquaFx.createComboBoxStyler().setSizeVariant(ControlSizeVariant.SMALL).style(combo6); grid.add(tf7, 5, 4); ComboBox<String> ecombo7 = new ComboBox<String>(); ecombo7.setItems(items); ecombo7.setEditable(true); ecombo7.setPromptText("select");