/** * Gets the current {@link PropertyRendererRegistry} instance. * @return The {@link Context}-bound PropertyRendererRegistry instance, if available using {@link #CONTEXT_KEY} as * context key, or the default instance for the default ClassLoader obtained through {@link #getDefault()}. */ static PropertyRendererRegistry get() { return Context.get().resource(CONTEXT_KEY, PropertyRendererRegistry.class).orElse(getDefault()); }
public void input5() { final NumericProperty<Integer> MY_PROPERTY = NumericProperty.integerType("my_property"); // tag::input5[] PropertyRendererRegistry.getDefault() // <1> .forProperty(MY_PROPERTY, InputPropertyRenderer.create(property -> new MyInput())); // <2> // end::input5[] }
public void listing25() { // tag::listing25[] PropertyRendererRegistry.getDefault().forProperty(NAME, // <1> InputPropertyRenderer.create(property -> Input.stringArea().build())); PropertyListing.builder(SUBJECT).editable().build(); // <2> // end::listing25[] }