@Override public void bindBidirectional(Property<U> other) { Bindings.bindBidirectional(this, other); }
/** * Constructor */ public ObjectModel() { addSetDataListener(); Bindings.bindBidirectional(creation, creationDate, new LocalDateTimeStringConverter()); Bindings.bindBidirectional(lastModification, lastModificationDate, new LocalDateTimeStringConverter()); }
public ObjectProperty<Path> configPathProperty() { final ObjectProperty<Path> pathProperty = new SimpleObjectProperty<>(); Bindings.bindBidirectional( stringPropertyOf(CONFIG_PATH, () -> null), pathProperty, PATH_CONVERTER ); return pathProperty; }
default ObjectProperty<OrderType> orderTypeProperty() { final StringProperty orderType = stringPropertyOf(HasOrderType.ORDER_TYPE, () -> null); final StringConverter<OrderType> converter = new StringConverter<OrderType>() { @Override public String toString(OrderType object) { return object == null ? null : object.name(); } @Override public OrderType fromString(String string) { return string == null ? null : OrderType.valueOf(string); } }; final ObjectProperty<OrderType> object = new SimpleObjectProperty<>(converter.fromString(orderType.get())); Bindings.bindBidirectional(orderType, object, converter); return object; }
private void createMaxCount(VBox parent, MaxCountFilterModel maxCountFilterModel) { TextField maxCount = new NumberOnlyTextField(); maxCount.setPrefWidth(100); Bindings.bindBidirectional(maxCount.textProperty(), maxCountFilterModel.maxCount, new IntegerStringConverter()); parent.getChildren().add(createDescriptionVale("limit",maxCount)); }
/** * Returns a property of the current implementation used by this column. * <p> * <em>Warning!</em> The returned object can be both read and written to, * but note that it may be garbage collected unless the caller saves a * reference to it somewhere. * * @return a property of the nullable implementation. */ default ObjectProperty<ImplementAs> nullableImplementationProperty() { final ImplementAs initial = HasNullable.super.getNullableImplementation(); final StringProperty implName = stringPropertyOf(NULLABLE_IMPLEMENTATION, () -> initial.name()); final ObjectProperty<ImplementAs> property = new SimpleObjectProperty<>(initial); Bindings.bindBidirectional(implName, property, new StringConverter<ImplementAs>() { @Override public String toString(ImplementAs object) { if (object == null) return null; else return object.name(); } @Override public ImplementAs fromString(String string) { if (string == null) return null; else return ImplementAs.valueOf(string); } }); return property; }
Bindings.bindBidirectional(owner.currentInternalValueProperty(), datePicker.valueProperty(), datePicker.getConverter());
/** * @{inheritedDoc} */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { final String ispasswordField = configuration.getPropertyValue("passwordField"); newInstance(StringUtils.isNotBlank(ispasswordField) && Boolean.valueOf(ispasswordField)); super.buildFrom(controller, configuration); textField.setId(id); configure(); textField.setText(owner.getInitialInternalValue()); Bindings.bindBidirectional(owner.currentInternalValueProperty(), textField.textProperty(), owner.getConverter()); }
/** * @{inheritedDoc} */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { super.buildFrom(controller, configuration); textArea.setPrefRowCount(2); // prompt prompt.ifPresent(e -> { final String val = controller.getLocalised(prompt.get()); textArea.setPromptText(val); }); // process wizardConfiguration final Optional<VLViewComponentXML> displayConfig = configuration.getComponentById(DISPLAY_CONFIG); displayConfig.ifPresent(d -> { d.booleanPropertyValueOf(XMLConstants.READ_ONLY).ifPresent(e -> { textArea.setDisable(e); }); d.intPropertyValueOf(XMLConstants.COUNTER).ifPresent(e -> { if (e > 0) { // !! not for validation, for counter // textArea.setMaxLength(e); } }); }); textArea.setText(owner.getCurrentInternalValue()); Bindings.bindBidirectional(textArea.textProperty(), owner.currentInternalValueProperty(), owner.getConverter()); }
/** * @{inheritedDoc} */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { super.buildFrom(controller, configuration); AnchorPane.setTopAnchor(iconContainer, -2.0); AnchorPane.setRightAnchor(iconContainer, 8.0); AnchorPane.setTopAnchor(link, 4.0); AnchorPane.setLeftAnchor(link, 0.0); AnchorPane.setRightAnchor(link, 0.0); container.getChildren().addAll(link); container.getChildren().add(label); // buildCircleIcon(); label.getStyleClass().add("ep-countable-button-count"); label.visibleProperty().bind(Bindings.greaterThan(count, 0)); Bindings.bindBidirectional(label.textProperty(), count, NumberFormat.getInstance()); }
/** * @{inheritedDoc} */ @Override public void build(IInputComponentWrapper inputComponentWrapper) { super.build(inputComponentWrapper); NodeHelper.styleClassAddAll(label, getConfiguration(), "viewStyleClass", "form-info-value"); String curVal = inputComponentWrapper.getCurrentInternalValue(); label.setText(curVal); Bindings.bindBidirectional(label.textProperty(), inputComponentWrapper.currentInternalValueProperty(), inputComponentWrapper.getConverter()); }
Bindings.bindBidirectional(choosenFullPath.textProperty(), owner.currentInternalValueProperty(), owner.getConverter());
Bindings.bindBidirectional(choosenFullPath.textProperty(), owner.currentInternalValueProperty(), owner.getConverter());
hbarValue = Var.doubleVar(hbar.valueProperty()); vbarValue = Var.doubleVar(vbar.valueProperty()); Bindings.bindBidirectional(hbarValue, hPosEstimate); Bindings.bindBidirectional(vbarValue, vPosEstimate);