public void setTypeId(PropertyTypeId typeId) { typeChoiceBox.getSelectionModel().select(typeId); }
@Override public void initialize(URL location, ResourceBundle resources) { languageChoiceBox.getItems().addAll(DesignerUtil.getSupportedLanguageVersions() .stream() .map(LanguageVersion::getLanguage) .distinct() .collect(Collectors.toList())); languageChoiceBox.setConverter(new StringConverter<Language>() { @Override public String toString(Language object) { return object.getTerseName(); } @Override public Language fromString(String string) { return LanguageRegistry.findLanguageByTerseName(string); } }); languageChoiceBox.getSelectionModel().select(LanguageRegistry.getDefaultLanguage()); exportResultArea.setSyntaxHighlighter(new XmlSyntaxHighlighter()); registerListener(nameField.textProperty(), updateResultListener()); registerListener(messageField.textProperty(), updateResultListener()); registerListener(descriptionField.textProperty(), updateResultListener()); registerListener(prioritySlider.valueProperty(), updateResultListener()); registerListener(languageChoiceBox.getSelectionModel().selectedItemProperty(), updateResultListener()); registerListener(xpathExpression, updateResultListener()); updateResultListener().changed(null, null, null); }
private void setFilteredItems(PdfVersion required) { if (nonNull(required)) { PdfVersionComboItem selected = getSelectionModel().getSelectedItem(); setItems(unfilteredItems.filtered(t -> t.isHigherOrEqual(required))); int selecedIndex = getItems().indexOf(selected); if (selecedIndex != -1) { getSelectionModel().select(selecedIndex); } else { getSelectionModel().selectFirst(); } } }
public void setBottomTabIndex(int i) { if (i >= 0 && i < bottomTabPane.getTabs().size()) { bottomTabPane.getSelectionModel().select(i); } }
fieldType.getSelectionModel().select(preferred.get()); } else { final String msg = "Could not find any installed JDBC " +
selectionModel.select(1);
@Override public void restoreStateFrom(Map<String, String> data) { Optional.ofNullable(data.get("rotation")).map(Rotation::valueOf).map(r -> keyEmptyValue(r)) .ifPresent(r -> this.rotation.getSelectionModel().select(r)); Optional.ofNullable(data.get("rotationType")).map(PredefinedSetOfPages::valueOf).map(r -> keyEmptyValue(r)) .ifPresent(r -> this.rotationType.getSelectionModel().select(r)); } }
@Override public void restoreStateFrom(Map<String, String> data) { Optional.ofNullable(data.get("outline")).map(OutlinePolicy::valueOf).map(r -> keyEmptyValue(r)) .ifPresent(r -> this.outline.getSelectionModel().select(r)); Optional.ofNullable(data.get("acroForms")).map(AcroFormPolicy::valueOf).map(r -> keyEmptyValue(r)) .ifPresent(r -> this.acroForms.getSelectionModel().select(r)); Optional.ofNullable(data.get("toc")).map(ToCPolicy::valueOf).map(r -> keyEmptyValue(r)) .ifPresent(r -> this.toc.getSelectionModel().select(r)); blankIfOdd.setSelected(Boolean.valueOf(data.get("blankIfOdd"))); footer.setSelected(Boolean.valueOf(data.get("footer"))); normalize.setSelected(Boolean.valueOf(data.get("normalize"))); } }
@Override public void restoreStateFrom(Map<String, String> data) { version.resetView(); compress.setSelected(Boolean.valueOf(data.get("compress"))); overwrite().setSelected(Boolean.valueOf(data.get("overwrite"))); discardBookmarks.ifPresent(d -> { d.setSelected(Boolean.valueOf(data.get("discardBookmarks"))); }); ofNullable(data.get("version")).map(PdfVersion::valueOf).map(DefaultPdfVersionComboItem::new) .ifPresent(v -> this.version.getSelectionModel().select(v)); }
@Override @SuppressWarnings("unchecked") public void setViewObject(Object value) { ((FxChoiceBox) component).getSelectionModel().select(value); }
/** * select the Vertical Tab with the given tabPaneId * * @param tabPaneId */ public void selectVTab(String tabPaneId) { Tab tab = vTabMap.get(tabPaneId); if (tab == null) throw new IllegalArgumentException( "unknown tabPaneId for vertical tab " + tabPaneId); vTabPane.getSelectionModel().select(tab); }
public void showInstallations() { tabPane.getSelectionModel().select(4); } }
public void createNewTab(Tab tab) { this.libraryTabs.getTabs().add(tab); this.libraryTabs.getSelectionModel().select(tab); if (this.onTabOpened != null) { this.onTabOpened.run(); } }
/** * select a random tab * * @param tabPane */ public Tab selectRandomTab(TabPane tabPane) { Random random = new Random(); SingleSelectionModel<Tab> vsel = tabPane.getSelectionModel(); int tabIndex = random.nextInt(vTabPane.getTabs().size()); vsel.select(tabIndex); return vsel.getSelectedItem(); }
private void updatePoolChoicebox(final ChoiceBox<ProcessorPoolInfo> poolChoicebox, ProcessorPoolInfo newValue) { if (newValue != null) { for (ProcessorPoolInfo pool : poolChoicebox.getItems()) { if (pool != null && pool.getId() != null && pool.getId().equals(newValue.getId())) { poolChoicebox.getSelectionModel().select(pool); } } } else { poolChoicebox.getSelectionModel().clearSelection(); } }
private void updateEngineChoicebox(final ChoiceBox<ProcessingEngineInfo> engineChoicebox, ProcessingEngineInfo newValue) { if (newValue != null) { for (ProcessingEngineInfo processingEngineInfo : engineChoicebox.getItems()) { if (processingEngineInfo.getId() != null && processingEngineInfo.getId().equals(newValue.getId())) { engineChoicebox.getSelectionModel().select(processingEngineInfo); } } } else { engineChoicebox.getSelectionModel().clearSelection(); } }
@Override public void configure(T control) { super.configure(control); control.getProperties().put(PrefixSelectionFeature.ENABLED, ""); new PrefixSelectionFeature<>(control, () -> !control.isEditable(), control::getItems, control.getConverter(), index -> control.getSelectionModel().select(index)) .configure(); }
/** * {@inheritDoc} */ @Override public void initializeParts() { super.initializeParts(); getStyleClass().add("simple-select-control"); fieldLabel = new Label(field.labelProperty().getValue()); readOnlyLabel = new Label(); stack = new StackPane(); comboBox = new ComboBox<>(field.getItems()); comboBox.getSelectionModel().select(field.getItems().indexOf(field.getSelection())); }
@Override public void updateSettings(final RecognitionSettingsImpl settings) { Platform.runLater(() -> { this.udpateRateCombo.getSelectionModel().select(settings.getUpdateRate()); this.sliderRadius.setValue(settings.getDtwRadius() * 10); this.sliderMinThreshold.setValue(settings.getMinDtwThreashold()); this.sliderMaxThreshold.setValue(settings.getMaxDTWThreashold()); this.sliderTimeSeparation.setValue(settings.getMinTimeSeparation()); this.sliderMatchNumber.setValue(settings.getMatchNumber()); }); }